r360531 - Revert rL360499 and rL360464 from cfe/trunk:

2019-05-11 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Sat May 11 13:21:59 2019 New Revision: 360531 URL: http://llvm.org/viewvc/llvm-project?rev=360531&view=rev Log: Revert rL360499 and rL360464 from cfe/trunk: Reject attempts to call non-static member functions on objects outside their lifetime in constant expressions. This is

[PATCH] D61827: [clang-tidy] modernize-loop-convert: impl const cast iter

2019-05-11 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D61827#1499160 , @lebedev.ri wrote: > This will now trigger on https://godbolt.org/z/9oFMcB right? > Just want to point out that this will then have "false-positives" when that > loop > is an OpenMP for loop, since range-for

[PATCH] D61827: [clang-tidy] modernize-loop-convert: impl const cast iter

2019-05-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D61827#1499183 , @hintonda wrote: > In D61827#1499160 , @lebedev.ri > wrote: > > > This will now trigger on https://godbolt.org/z/9oFMcB right? > > Just want to point out that this w

[PATCH] D61827: [clang-tidy] modernize-loop-convert: impl const cast iter

2019-05-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This will now trigger on https://godbolt.org/z/9oFMcB right? Just want to point out that this will then have "false-positives" when that loop is an OpenMP for loop, since range-for loop is not available until OpenMP 5. I don't think this false-positive can be avoided t

[PATCH] D61827: [clang-tidy] modernize-loop-convert: impl const cast iter

2019-05-11 Thread Don Hinton via Phabricator via cfe-commits
hintonda added inline comments. Comment at: clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp:273 + for (S::const_iterator It = Ss.begin(), E = Ss.end(); It != E; ++It) { +printf("s has value %d\n", (*It).X); I think you need to fix the c

[PATCH] D61827: [clang-tidy] modernize-loop-convert: impl const cast iter

2019-05-11 Thread Torbjörn Klatt via Phabricator via cfe-commits
torbjoernk created this revision. torbjoernk added reviewers: dergachev.a, hintonda, alexfh. torbjoernk added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. modernize-loop-convert was not detecting implicit casts to const_iterator as

[PATCH] D53072: [clang-format] Create a new tool for IDEs based on clang-format

2019-05-11 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 199151. yvvan added a comment. Some misleading reformatting fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53072/new/ https://reviews.llvm.org/D53072 Files: clang/include/clang/Format/Format.h clang/lib/Format/ContinuationIndenter.cpp cla

[PATCH] D53072: [clang-format] Create a new tool for IDEs based on clang-format

2019-05-11 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 199150. yvvan added a comment. Sorry for unrelated formatting changes - that's clang-format's work :) I've removed the extra executable. I don't know how to force that behavior only for the given line (for that I need someone who can help) but in our usecase

[PATCH] D61814: [CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *, make it a variant class instead.

2019-05-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. The conversion operator indeed looks non-evident. Comment at: clang/include/clang/Analysis/CFG.h:513 public: - CFGTerminator() = default; - CFGTerminator(Stmt *S, bo

[PATCH] D61815: [CFG] NFC: Modernize test/Analysis/initializers-cfg-output.cpp.

2019-05-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Wow, this is a cool idea! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61815/new/ https://reviews.llvm.org/D61815 ___

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2019-05-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Thank you for digging into this! Feel free to ask me if you encounter any problems with the patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44100/new/ https://reviews.llvm.org/D44100

[PATCH] D61786: [ASTImporter] Separate unittest files

2019-05-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Hi Gabor, I like this change! LGTM, just a few nits. Comment at: clang/unittests/AST/ASTImporterGenericRedeclTest.cpp:20 + +// FIXME put these structs and the tests rel

[PATCH] D61822: make -ftime-trace also print template arguments

2019-05-11 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev accepted this revision. anton-afanasyev added a comment. This revision is now accepted and ready to land. LGTM Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61822/new/ https://reviews.llvm.org/D61822 ___ cfe-commits

[PATCH] D53072: [clang-format] Create a new tool for IDEs based on clang-format

2019-05-11 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @sammccall I can't avoid adding extra formatting options because my first attempt to introduce an ordinary clang-format option faced resistance because of not fitting the clang-format purpose to format files. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53072/n

[PATCH] D61822: make -ftime-trace also print template arguments

2019-05-11 Thread Luboš Luňák via Phabricator via cfe-commits
llunak updated this revision to Diff 199133. llunak added a comment. Removed the parse case, getNameForDiagnostic() apparently prints nothing there. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61822/new/ https://reviews.llvm.org/D61822 Files: lib/CodeGen/CodeGenModule.cpp lib/Sem

r360515 - ConstantLValueEmitter::tryEmitAbsolute - remove unused variable. NFCI.

2019-05-11 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Sat May 11 04:01:46 2019 New Revision: 360515 URL: http://llvm.org/viewvc/llvm-project?rev=360515&view=rev Log: ConstantLValueEmitter::tryEmitAbsolute - remove unused variable. NFCI. Duplicate getOffset() call. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp Modifie

[PATCH] D61749: [clang-tidy] initial version of readability-static-const-method

2019-05-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/test/clang-tidy/readability-static-const-method.cpp:209 +void KeepLambdas() { + auto F = +[]() { return 0; }; + auto F2 = []() { return 0; }; Does it pass here? I looks a bit weird, shouldnt the la

[PATCH] D61749: [clang-tidy] initial version of readability-static-const-method

2019-05-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a subscriber: shuaiwang. JonasToth added a comment. Hey, I do like your check! I think it would be great to implement this analysis in `utils/` as roman suggested. Then we have bigger flexibility. The `ExprMutAnalyzer` was requested to be moved to `clang/Analysis/` as the CSA fo

[PATCH] D61822: make -ftime-trace also print template arguments

2019-05-11 Thread Luboš Luňák via Phabricator via cfe-commits
llunak created this revision. llunak added a reviewer: anton-afanasyev. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without this, I get e.g. 'PerformPendingInstantiations' -> 'std::fill', now I get 'std::fill'. Repository: rC Clang https://reviews.llvm.org/D61822

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-05-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Mostly looks good, I have two slightly related nits. Comment at: include/clang/CrossTU/CrossTranslationUnit.h:127 + StringRef IndexName, bool DisplayCTUProgress, + unsigned CTULoadThreshold); -