[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-27 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked an inline comment as done. ztamas added a comment. In D59870#1444645 , @JonasToth wrote: > I think in general this is a good direction. What do you think about other > heuristics? > E.g. one could say that a vector will not contain more the

[PATCH] D59914: [analyzer] MIGChecker: Add support for more deallocator APIs.

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added a reviewer: dcoughlin. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. Most of these were obtained by invoking $ find . -name '

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/WrapUniqueCheck.h:26 +private: + // std::string getArgs(const SourceManager *SM, const CallExpr *MemExpr); + Please remove obsolete commend and private keyword. Comment at: doc

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-03-27 Thread Ryan Piantedosi via Phabricator via cfe-commits
Dosi-Dough updated this revision to Diff 192541. Dosi-Dough marked 4 inline comments as done. Dosi-Dough added a comment. fixed bracketed return and added updated license CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57435/new/ https://reviews.llvm.org/D57435 Files: clang-tidy/abseil

[PATCH] D53343: [Driver] Default Android toolchains to noexecstack.

2019-03-27 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama accepted this revision. pirama added inline comments. This revision is now accepted and ready to land. Herald added a project: clang. Comment at: include/clang/Driver/ToolChain.h:393 + /// Test whether this toolchaind defaults to non-executable stacks. + virtual bool i

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-27 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. I uh... I also think this is an @rsmith question, I have no idea. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59900/new/ https://reviews.llvm.org/D59900 ___ cfe-commits maili

[PATCH] D55007: [Analyzer] Constraint Manager - Calculate Effective Range for Differences

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. What i was trying to say with my last comment is that i guess i'd rather go for option (1) because with that `getRange()` remains the single source of truth, which is comfy. I agree this shouldn't

[PATCH] D59743: [WebAssembly] Don't use default GetLinkerPath

2019-03-27 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Reverted in rG039be787914610c28cba45c4557454e0a96939ab . Caused a strange error with the waterfall sysroot's build of libcxx: https://logs.chromium.org/logs/wasm/buildbucket/cr-buildbucket.appspot.com/

r357127 - Revert "[WebAssembly] Don't use default GetLinkerPath"

2019-03-27 Thread Derek Schuff via cfe-commits
Author: dschuff Date: Wed Mar 27 15:22:18 2019 New Revision: 357127 URL: http://llvm.org/viewvc/llvm-project?rev=357127&view=rev Log: Revert "[WebAssembly] Don't use default GetLinkerPath" This reverts commit 4dcf3acce6d7455fd079d8e57441906ca2bad254. (reverts LLVM SVN r356953) Modified: cfe/

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-27 Thread Artem Belevich via Phabricator via cfe-commits
tra added subscribers: jlebar, rsmith. tra added a comment. @rsmith, @jlebar I'm out of my depth here and could use some language lawyering help. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59900/new/ https://reviews.llvm.org/D59900 _

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-27 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev updated this revision to Diff 192525. anton-afanasyev marked 10 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58675/new/ https://reviews.llvm.org/D58675 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Driver/Options.td

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-27 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev marked an inline comment as done. anton-afanasyev added inline comments. Comment at: clang/lib/Parse/ParseAST.cpp:154 if (HaveLexer) { +llvm::TimeTraceScope TimeScope("Frontend", StringRef("")); P.Initialize(); takuto.ikuta wrote: > an

[libclc] r357125 - travis: Add LLVM-8 build

2019-03-27 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Mar 27 14:28:31 2019 New Revision: 357125 URL: http://llvm.org/viewvc/llvm-project?rev=357125&view=rev Log: travis: Add LLVM-8 build Reviewer: Tom Stellard Signed-off-by: Jan Vesely Modified: libclc/trunk/.travis.yml Modified: libclc/trunk/.travis.yml URL: http:/

[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2019-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1813 +} + } else if (Arg *A = Args.getLastArg(options::OPT_G)) { +SmallDataLimit = A->getValue(); Why do you we need to set a default? It will cause the optimization to be on now,

[PATCH] D59901: [analyzer] PR41239: Fix a crash on invalid source location in NoStoreFuncVisitor.

2019-03-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Nice solution. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59901/new/ https://reviews.llvm.org/D59901 ___

[PATCH] D59901: [analyzer] PR41239: Fix a crash on invalid source location in NoStoreFuncVisitor.

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, mikhail.ramalho, Szelethus, baloghadamsoftware, Charusso, alexfh. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, a.sidorin, szepet, kristof.beyls, javed.absar. Herald added a project: clang. It

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-27 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: rjmccall, tra, yaxunl. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. - Non-null checking is triggered during prototype substitution from a template instantiation, if expressions in `decltype` c

[PATCH] D59899: gn build: Add some build files for clangd

2019-03-27 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: mbonadei. Herald added subscribers: jdoerfert, jfb, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov, mgorny, srhines. Herald added a project: LLVM. Enough to build the clangd binaries, but this is still missing build files for: -

[PATCH] D59863: [HIP] Support gpu arch gfx906+sram-ecc

2019-03-27 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm requested changes to this revision. arsenm added a comment. This revision now requires changes to proceed. Herald added a subscriber: wdng. This should not be a new device name. This is also not how the features should be passed to the backend. These should be added to the function IR dire

[PATCH] D59861: [analyzer] NFC: Replace Taint API with a usual inter-checker communication API?

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192504. NoQ added a comment. Add a test for taint dumps. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59861/new/ https://reviews.llvm.org/D59861 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h clang/include/clang/S

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:400 + + friend class Factory; + friend class TagVisitor; xazax.hun wrote: > NoQ wrote: > > xazax.hun wrote: >

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192502. NoQ marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58367/new/ https://reviews.llvm.org/D58367 Files: clang/include/clang/Analysis/ProgramPoint.h clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. //*un-forgets to actually post comments*// In D58367#1443830 , @Charusso wrote: > Cool! I have found this message-semantic idea useful in Unity where every > `GameObject` could talk with each other in a very generic way > (https://d

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-27 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:400 + + friend class Factory; + friend class TagVisitor; NoQ wrote: > xazax.hun wrote: > > Isn't this redundant? > It isn't - i made a privat

[PATCH] D59741: [lit] Set shlibpath_var on AIX

2019-03-27 Thread Xing Xue via Phabricator via cfe-commits
xingxue accepted this revision. xingxue added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59741/new/ https://reviews.llvm.org/D59741 ___ cf

[PATCH] D59725: Additions to creduce script

2019-03-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:198 +# Instead of modifying the filename in the test file, just run the command +fd, empty_file = tempfile.mkstemp() +if self.check_expected_output(filename=empty_file): geo

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:600 +public: + typedef std::function + Callback; Szelethus wrote: > Prefer using. Thx!~ Comment at: clang/include/clang/StaticAnaly

[PATCH] D59725: Additions to creduce script

2019-03-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192499. akhuang marked 3 inline comments as done. akhuang added a comment. change `mkstemp` to `NamedTemporaryFile` and add `decode(utf-8)` so it works on python3.5 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192501. NoQ marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58367/new/ https://reviews.llvm.org/D58367 Files: clang/include/clang/Analysis/ProgramPoint.h clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.

[PATCH] D59734: [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-27 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL357114: [clang-tidy] Handle missing yaml module in run-clang-tidy.py (authored by zinovy.nis, committed by ). Herald added

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-27 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D59485#1444673 , @teemperor wrote: > In D59485#1439628 , @martong wrote: > > > In D59485#1439570 , @martong wrote: > > > > > In D59485#1439390

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. Mostly nits and small API questions form my side. This looks very good overall! I'm planning to take a closer look at the handling of macros and various AST nodes in more detail this week, but the approach looks solid

[clang-tools-extra] r357114 - [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-27 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Wed Mar 27 12:21:32 2019 New Revision: 357114 URL: http://llvm.org/viewvc/llvm-project?rev=357114&view=rev Log: [clang-tidy] Handle missing yaml module in run-clang-tidy.py The Yaml module is missing on some systems and on many of clang buildbots. But the test for run-cl

[PATCH] D59457: [analyzer][NFC] Use capital variable names, move methods out-of-line, rename some in CheckerRegistry

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I agree that we shouldn't try real hard to fix our code until we have a clear "party line" on how exactly do we name our variables (and ideally also how do we invalidate our caches), but having vari

[PATCH] D59861: [analyzer] NFC: Replace Taint API with a usual inter-checker communication API?

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 192492. NoQ marked 2 inline comments as done. NoQ added a comment. Address comments. Fix printing taint in state dumps. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59861/new/ https://reviews.llvm.org/D59861 Files: clang/include/clang/StaticAnalyzer

[PATCH] D59861: [analyzer] NFC: Replace Taint API with a usual inter-checker communication API?

2019-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/Taint.h:8 +// +//===--===// +// Charusso wrote: > Outdated header-blurb. Whooops! Thanks!! Comm

[PATCH] D59874: [PR41247] Fixed parsing of private keyword in C++

2019-03-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 192485. Anastasia added a comment. Herald added a subscriber: jdoerfert. Extended test case and explained the intention of the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59874/new/ https://reviews.llvm.org/D59874 Files: lib/Parse/Parse

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-03-27 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D59347#1444819 , @dblaikie wrote: > In D59347#1443051 , @dblaikie wrote: > > > @asmith: Where's the LLVM-side change/review that goes with this, btw? > > > > In D59347#1442970

[PATCH] D59863: [HIP] Support gpu arch gfx906+sram-ecc

2019-03-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/Basic/Cuda.cpp:113 + case CudaArch::GFX906_SRAM_ECC: // TBA +return "gfx906+sram-ecc"; case CudaArch::GFX909: // TBA tra wrote: > Wording nit: > Does it mean `+(SRAM, E

[PATCH] D46140: [coroutines] Add std::experimental::task type

2019-03-27 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter requested changes to this revision. CaseyCarter added a subscriber: mclow.lists. CaseyCarter added inline comments. This revision now requires changes to proceed. Comment at: include/experimental/__memory:80 +{ +return (__s + __a - 1) & ~(__a - 1); +}

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Also, it might be worth adding a third level of struct to the test, to show that it handles arbitrary nesting correctly (which it does). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59873/new/ https://reviews.llvm.org/D59

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-03-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D59347#1443051 , @dblaikie wrote: > @asmith: Where's the LLVM-side change/review that goes with this, btw? > > In D59347#1442970 , @probinson wrote: > > > As a rule I would prefer flags

[PATCH] D58275: [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension

2019-03-27 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rCTE357102: [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension (authored by sammccall, committed by ). Changed prior to commit: https:/

[clang-tools-extra] r357102 - [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension

2019-03-27 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Mar 27 10:47:49 2019 New Revision: 357102 URL: http://llvm.org/viewvc/llvm-project?rev=357102&view=rev Log: [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension Summary: Still some pieces to go here: unit tests for new SourceCode functionality an

[PATCH] D59845: Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. shafik marked an inline comment as done. Closed by commit rL357100: [ASTImporter] Fix IsStructuralMatch specialization for EnumDecl to prevent re… (authored by shafik, committed by ). Herald added a project: LLVM. Herald add

r357100 - [ASTImporter] Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-27 Thread Shafik Yaghmour via cfe-commits
Author: shafik Date: Wed Mar 27 10:47:36 2019 New Revision: 357100 URL: http://llvm.org/viewvc/llvm-project?rev=357100&view=rev Log: [ASTImporter] Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it Summary: We may try and re-import a

[PATCH] D59863: [HIP] Support gpu arch gfx906+sram-ecc

2019-03-27 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Basic/Cuda.cpp:113 + case CudaArch::GFX906_SRAM_ECC: // TBA +return "gfx906+sram-ecc"; case CudaArch::GFX909: // TBA Wording nit: Does it mean `+(SRAM, ECC)` or `+SRAM, -ECC` ? From the rest of the changes I gue

[PATCH] D59457: [analyzer][NFC] Use capital variable names, move methods out-of-line, rename some in CheckerRegistry

2019-03-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59457/new/ https://reviews.llvm.org/D59457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D59874: [PR41247] Fixed parsing of private keyword in C++

2019-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Otherwise LGTM. Comment at: test/SemaOpenCLCXX/private-access-specifier.cpp:2 +// RUN: %clang_cc1 %s -pedantic -verify -fsyntax-only + +struct B { Please include a comment explaining why this test file is in test/SemaOpenCLCXX/ (becau

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Do you need someone to commit this for you? Comment at: clang/test/CodeGenObjC/nontrivial-c-struct-within-struct-name.m:1 +// RUN: %clang_cc1 -triple arm64-apple-ios11 -fobjc-arc -fblocks -fobjc-runtime=ios-11.0 -emit-llvm -o - -DUSESTRUCT -I %S/Input

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59873/new/ https://reviews.llvm.org/D59873 ___

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Tooling/Syntax/TokenBuffer.cpp:323 + PP.getLangOpts(), Tokens); + auto *CB = CBOwner.get(); + ilya-biryukov wrote: > Eugene.Zelenko wrote: > > Return type is

[PATCH] D59845: Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik marked 2 inline comments as done. shafik added inline comments. Comment at: lib/AST/ASTImporter.cpp:1951 + // something we're trying to import while completin ToEnum + Decl *ToOrigin = Importer.GetOriginalDecl(ToEnum); + JDevlieghere wrote: > ``` > if (D

[PATCH] D59845: Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 192466. shafik added a comment. Fixes based on comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59845/new/ https://reviews.llvm.org/D59845 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp =

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 2 inline comments as done. ilya-biryukov added inline comments. Comment at: clang/lib/Tooling/Syntax/TokenBuffer.cpp:323 + PP.getLangOpts(), Tokens); + auto *CB = CBOwner.get(); + Eugene.Zelenko w

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. Amazing work! Thanks! In D58367#1443783 , @NoQ wrote: > Remove memoization for now. Address a few inline comments. I'm mostly done > with this first patch, did i accidentally miss anything? > >

[PATCH] D59615: [AArch64] When creating SISD intrinsic calls widen scalar args into a zero vectors, not undef

2019-03-27 Thread Amara Emerson via Phabricator via cfe-commits
aemerson added a comment. Ping. I've filed PR41260 for the code quality issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59615/new/ https://reviews.llvm.org/D59615 ___ cfe-commits mailing list cfe-

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/TokenBuffer.h:130 + /// result. + llvm::ArrayRef expansions() const { return Expansions; } + /// Tokens of macro directives and top-level macro e

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-27 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. In D59485#1439628 , @martong wrote: > In D59485#1439570 , @martong wrote: > > > In D59485#1439390 , @teemperor > > wrote: > > > > > > Well, I stil

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-27 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D58797#1443856 , @erik.pilkington wrote: > I added it in r357041. LGTM, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58797/new/ https://reviews.llvm.org/D58797 __

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Tooling/Syntax/TokenBuffer.cpp:8 +//===--===// +#include "clang/Tooling/Syntax/TokenBuffer.h" +#include "clang/Basic/Diagnostic.h" Plea

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-27 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think in general this is a good direction. What do you think about other heuristics? E.g. one could say that a vector will not contain more then X GB or similar. That is probably more complicated to figure out though. Comment at: docs/clang-tidy/c

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I'm happy to assess the performance costs of this change if needed (the function is obviously on the hot path), but I hope this won't add any significant performance costs. Also happy to consider alternative approaches to collect the tokens when preprocessing, the

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: gribozavr. Herald added subscribers: jdoerfert, mgorny. Herald added a project: clang. TokenBuffer stores the list of tokens for a file obtained after preprocessing. This is a base building block for syntax trees, see [1] for the

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: rsmith. Herald added a project: clang. By adding a hook to consume all tokens produced by the preprocessor. The intention of this change is to make it possible to consume the expanded tokens without re-runnig the preprocessor wit

[clang-tools-extra] r357082 - [clangd] Bump vscode-clangd v0.0.12.

2019-03-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Mar 27 09:01:25 2019 New Revision: 357082 URL: http://llvm.org/viewvc/llvm-project?rev=357082&view=rev Log: [clangd] Bump vscode-clangd v0.0.12. CHANGELOG: - add an explicit command to activate the extension. - support .cu files (the extension is not activated for .cu fil

[clang-tools-extra] r357078 - [clangd] Fix the inconsistent code indent in vscode extension, NFC.

2019-03-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Mar 27 08:50:33 2019 New Revision: 357078 URL: http://llvm.org/viewvc/llvm-project?rev=357078&view=rev Log: [clangd] Fix the inconsistent code indent in vscode extension, NFC. Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts Modified: c

[PATCH] D59817: [clangd] Add activate command to the vscode extension.

2019-03-27 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357075: [clangd] Add activate command to the vscode extension. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SI

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-27 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59665/new/ https://reviews.llvm.org/D59665 ___ cfe-commits mailing list cfe-commit

[PATCH] D59814: [Testing] Move clangd::Annotations to llvm testing support

2019-03-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This probably needs tests if we're lifting it into `llvm`. Sorry there aren't any today :-( BTW the other similar lib in clang I'm aware of is https://reviews.llvm.org/diffusion/L/browse/cfe/trunk/tools/clang-refactor/TestSupport.h It makes different tradeoffs. We ta

[clang-tools-extra] r357075 - [clangd] Add activate command to the vscode extension.

2019-03-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Mar 27 08:41:59 2019 New Revision: 357075 URL: http://llvm.org/viewvc/llvm-project?rev=357075&view=rev Log: [clangd] Add activate command to the vscode extension. Summary: This would help minizime the annoying part of not activating the extension for .cu file. Reviewers:

[PATCH] D59845: Fix IsStructuralMatch specialization for EnumDecl to prevent re-importing an EnumDecl while trying to complete it

2019-03-27 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59845/new/ https://reviews.llvm.org/D59845 ___ cfe-commits mailing list cfe-commit

[PATCH] D59185: [PowerPC] Set the default PLT mode on musl to Secure PLT

2019-03-27 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits accepted this revision. jhibbits added a comment. This revision is now accepted and ready to land. Looks fine to me. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59185/new/ https://reviews.llvm.org/D59185 _

[PATCH] D59221: [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract.

2019-03-27 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau updated this revision to Diff 192447. pgousseau added a comment. Update patch to reflect changes to the llvm side of the patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59221/new/ https://reviews.llvm.org/D59221 Files: include/clang/Basic/Sanitizers.def include/clang

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:122 +- The :bugprone-too-small-loop-variable + ` now supports :doc prefix and ` is missing. Please also rebase patch from trunk. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59467#1443173 , @Tyker wrote: > @lebedev.ri where are tests for AST serialization are located ? i didn't find > them. They live in clang\tests\PCH. In D59467#1440608 , @Tyker w

[PATCH] D59827: [slh] x86 impl of ARM instrinsic for SLH

2019-03-27 Thread Kristof Beyls via Phabricator via cfe-commits
kristof.beyls added a comment. Thanks for picking this up, Zola! I quickly looked through the patch - comparing it with what I had done under D49070 and D49073 . Apart from the point remarks inline, I had the following immediate

[PATCH] D59859: [clang-tidy] FIXIT for implicit bool conversion now obeys upper case suffixes if enforced.

2019-03-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. We normally add something to the documentation about the checker and/or the release notes to say what had changed Comment at: clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp:48 case CK_IntegralToBoolean: -return

[PATCH] D59879: [ARM][CMSE] Add commandline option and feature macro

2019-03-27 Thread Javed Absar via Phabricator via cfe-commits
javed.absar created this revision. javed.absar added a reviewer: dmgreen. Herald added a subscriber: kristof.beyls. Herald added a project: clang. This is first in series of patches following the RFC http://lists.llvm.org/pipermail/cfe-dev/2019-March/061834.html informing the community about pro

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-27 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta added inline comments. Comment at: clang/lib/Parse/ParseAST.cpp:154 if (HaveLexer) { +llvm::TimeTraceScope TimeScope("Frontend", StringRef("")); P.Initialize(); anton-afanasyev wrote: > takuto.ikuta wrote: > > Remove StringRef? > I use `S

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Dan Zimmerman via Phabricator via cfe-commits
danzimm added a comment. @smeenai please feel free add any reviewers that I might've missed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59873/new/ https://reviews.llvm.org/D59873 ___ cfe-commits mail

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Dan Zimmerman via Phabricator via cfe-commits
danzimm updated this revision to Diff 192436. danzimm added a comment. I forgot to add the test originally, this update contains a test and updates to old tests to make them pass Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59873/new/ https://rev

[PATCH] D59817: [clangd] Add activate command to the vscode extension.

2019-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59817/new/ https://reviews.llvm.org/D59817 _

[PATCH] D59859: [clang-tidy] FIXIT for implicit bool conversion now obeys upper case suffixes if enforced.

2019-03-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: alexfh. aaron.ballman added a subscriber: alexfh. aaron.ballman added a comment. > Intended as my first commit to the llvm-project. Welcome! Thank you for working on this! In D59859#1444176 , @lebedev.ri wrote: > Please al

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Dan Zimmerman via Phabricator via cfe-commits
danzimm added a comment. @lebedev.ri right, sorry about that- I prematurely diff'd (got a few terminals crossed and thought I was finished with the test already). I will be amending with a test and a few other test fixes shortly. Sorry about the miscommunication :/ Repository: rG LLVM Githu

[PATCH] D59603: [PR40707][PR41011][OpenCL] Allow addr space spelling without double underscore in C++ mode

2019-03-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D59603#1443651 , @jsji wrote: > Looks like this may cause some unexpected failures. See > https://bugs.llvm.org/show_bug.cgi?id=41247 for more details. Thanks! I have created a review for the fix: https://reviews.llvm.org/D

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. There is no test here. Tests should probably go into `clang/test/CodeGen`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59873/new/ https://reviews.llvm.org/D59873 ___ cfe-c

[PATCH] D59874: [PR41247] Fixed parsing of private keyword in C++

2019-03-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, jsji. Herald added a subscriber: ebevhan. In C++ `private` shouldn't be parsed as a valid address space keyword. This only fixes C++ part, in OpenCL we should still prevent ICE on the reported code example, but I will fix it s

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-27 Thread Dan Zimmerman via Phabricator via cfe-commits
danzimm created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In https://bugs.llvm.org/show_bug.cgi?id=41206 we observe bad codegen when embedding a non-trivial C struct within a C struct. This is due to the fact that name mangling for non-trivial structs

r357061 - Revert the r348352 "[clang] - Simplify tools::SplitDebugName."

2019-03-27 Thread George Rimar via cfe-commits
Author: grimar Date: Wed Mar 27 04:00:03 2019 New Revision: 357061 URL: http://llvm.org/viewvc/llvm-project?rev=357061&view=rev Log: Revert the r348352 "[clang] - Simplify tools::SplitDebugName." This partially reverts the r348352 (https://reviews.llvm.org/D55006) because of https://bugs.llvm.org

[PATCH] D59861: [analyzer] NFC: Replace Taint API with a usual inter-checker communication API?

2019-03-27 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 added a comment. Thanks, it will make my changes more cleaner. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59861/new/ https://reviews.llvm.org/D59861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-27 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas added a comment. I found a project where the bugprone-too-small-loop-variable was used: https://github.com/openMSX/openMSX/commit/55006063daffa90941d4c3f9b0034e494d9cf45a As the commit message says for 32-bit integers the overflow never happens in practice. Repository: rCTE Clang Tool

[PATCH] D59857: [analyzer] PR37501: Disable the assertion for reverse-engineering logical op short circuits.

2019-03-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59857/new/ https://reviews.llvm.org/D59857 ___ cfe-commits mail

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-27 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas added a comment. I run the check with and without the option on llvm source code. Without the option I found 370 catches, while setting MagnitudeBitsUpperLimit to `30` I found only two catches: /home/zolnai/libreoffice/clang/llvm-project/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp:390

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-27 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas created this revision. Herald added subscribers: cfe-commits, jdoerfert, xazax.hun. Herald added a project: clang. The bugprone-too-small-loop-variable check often catches loop variables which can represent "big enough" values, so we don't actually need to worry about that this variable w

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2019-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. It is best to error-out early. Could you please try this instead: Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:39 } } // namespace ``` AST_MATCHER_P(CXXNewExpr, hasInitializationStyle, CXXNewExpr::Initiali

[PATCH] D59861: [analyzer] NFC: Replace Taint API with a usual inter-checker communication API?

2019-03-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I like the idea to put connecting stuff together in the same file to create more understandable code. LGTM. Comment at: clang/lib/StaticAnalyzer/Checkers/Taint.h:8 +// +

[PATCH] D59859: [clang-tidy] FIXIT for implicit bool conversion now obeys upper case suffixes if enforced.

2019-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a reviewer: aaron.ballman. lebedev.ri added a comment. Please always upload all patches with full context (`-U9`) I'm not sure why we want this? What is wrong with simply applying clang-tidy twice? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://re

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-27 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev marked 3 inline comments as done. anton-afanasyev added inline comments. Comment at: clang/lib/Parse/ParseAST.cpp:154 if (HaveLexer) { +llvm::TimeTraceScope TimeScope("Frontend", StringRef("")); P.Initialize(); takuto.ikuta wrote: > Re

[PATCH] D59857: [analyzer] PR37501: Disable the assertion for reverse-engineering logical op short circuits.

2019-03-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. There is no connection with my reverse-engineering reverted patch: https://reviews.llvm.org/D57410?id=184992 ? It evaluates the left and the right side and may it could help. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59857/new/ htt

  1   2   >