r360537 - Fix handling of objects under construction during constant expression

2019-05-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun May 12 01:57:59 2019 New Revision: 360537 URL: http://llvm.org/viewvc/llvm-project?rev=360537&view=rev Log: Fix handling of objects under construction during constant expression evaluation. It's not enough to just track the LValueBase that we're evaluating, we need to als

r360538 - Reject attempts to call non-static member functions on objects outside

2019-05-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun May 12 02:39:08 2019 New Revision: 360538 URL: http://llvm.org/viewvc/llvm-project?rev=360538&view=rev Log: Reject attempts to call non-static member functions on objects outside their lifetime in constant expressions. This is undefined behavior per [class.cdtor]p2. We c

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

2019-05-12 Thread Luboš Luňák via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360539: make -ftime-trace also print template arguments (authored by llunak, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61822/new/ https://reviews.llvm.

[clang-tools-extra] r360540 - [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-05-12 Thread Tamas Zolnai via cfe-commits
Author: ztamas Date: Sun May 12 05:23:56 2019 New Revision: 360540 URL: http://llvm.org/viewvc/llvm-project?rev=360540&view=rev Log: [clang-tidy] new check: bugprone-unhandled-self-assignment Summary: This check searches for copy assignment operators which might not handle self-assignment proper

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-05-12 Thread Tamás Zolnai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360540: [clang-tidy] new check: bugprone-unhandled-self-assignment (authored by ztamas, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I question the general utility of this patch, and I don't really think this does anything we want the build system doing. If you specify `STATIC` and `SHARED` to `llvm_add_library` it creates the shared library target as the one that everything links against, which is ex

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. As an additional note, Arch linux should not be building clang with `BUILD_SHARED_LIBS` nor should it be distributing those ,so files. That isn't a supported configuration for Clang deployment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. In D61804#1499259 , @beanz wrote: > I question the general utility of this patch, and I don't really think this > does anything we want the build system doing. When you say you don't think the build system should do this, wh

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Wink Saville via Phabricator via cfe-commits
winksaville marked an inline comment as done. winksaville added a comment. In D61804#1499267 , @beanz wrote: > As an additional note, Arch linux should not be building clang with > `BUILD_SHARED_LIBS` nor should it be distributing those ,so files. That is

[PATCH] D61804: Support building shared and static libraries simultaneously

2019-05-12 Thread Wink Saville via Phabricator via cfe-commits
winksaville updated this revision to Diff 199172. winksaville added a comment. Change default to be CLANG_ENABLE_STATIC_LIBRARIES=ON CLANG_ENABLE_SHARED_LIBRARIeS=OFF Suggested by @beanz Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61804/new/ ht

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

2019-05-12 Thread Torbjörn Klatt via Phabricator via cfe-commits
torbjoernk 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); hintonda wrote: > I think y

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

2019-05-12 Thread Torbjörn Klatt via Phabricator via cfe-commits
torbjoernk added a comment. In D61827#1499184 , @lebedev.ri wrote: > In D61827#1499183 , @hintonda wrote: > > > In D61827#1499160 , @lebedev.ri > > wrote: > > > > > This wil

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

2019-05-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D61827#1499303 , @torbjoernk wrote: > In D61827#1499184 , @lebedev.ri > wrote: > > > In D61827#1499183 , @hintonda > > wrote: > > > > > In D6

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

2019-05-12 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D61827#1499303 , @torbjoernk wrote: > In D61827#1499184 , @lebedev.ri > wrote: > > > In D61827#1499183 , @hintonda > > wrote: > > > > > In D618

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-05-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This caused a regression when including mingw-w64 headers (in a case where they happen to include redundant/duplicate attribute specifications), triggering asserts. See https://bugs.llvm.org/show_bug.cgi?id=41852 for details. Repository: rC Clang CHANGES SINCE LAST

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

2019-05-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D61827#1499306 , @hintonda wrote: > In D61827#1499303 , @torbjoernk > wrote: > > > In D61827#1499184 , @lebedev.ri > > wrote: > > > > > In D6

[PATCH] D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D61834 Files: include/clang/AST/ASTNodeTraverser.h Index: include/clang/AST/ASTNodeTraverser.h

[PATCH] D61835: Extract ASTDumper to a header file

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. This class has member APIs which are useful to clients. Make it possible to use those APIs without adding them to dump() member functions. Doing so doe

[PATCH] D61836: Move TraversalKind enum to ast_type_traits

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: klimek, aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. Make it usable outside of ASTMatchFinder. This will make it possible to use this enum to control whether certain implicit nodes are skipped while

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

2019-05-12 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D61827#1499309 , @lebedev.ri wrote: > In D61827#1499306 , @hintonda wrote: > > > In D61827#1499303 , @torbjoernk > > wrote: > > > > > In D61827#

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

2019-05-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D61827#1499333 , @hintonda wrote: > In D61827#1499309 , @lebedev.ri > wrote: > > > In D61827#1499306 , @hintonda > > wrote: > > > > > In D618

[PATCH] D61836: Move TraversalKind enum to ast_type_traits

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. This is part of the work I demo'd at EuroLLVM for ignoring invisible AST nodes during AST Matching and dumping: http://ce.steveire.com/z/lHYwEH Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61836/new/ https://reviews.llvm.org/D61836

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: klimek, aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. This will eventually allow traversal of an AST while ignoring invisible AST nodes. Currently it depends on the available enum values for Traversa

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @klimek This includes a test for the memoization case you were interested in at EuroLLVM. In this iteration of the API, the traversal kind is changed by using a new `traverse` matcher, which gives the user control over whether invisible/implicit nodes are skipped or n

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 199181. steveire added a comment. Format Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61837/new/ https://reviews.llvm.org/D61837 Files: include/clang/AST/ASTContext.h include/clang/AST/ASTNodeTraverser.h include/clan

[PATCH] D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 199178. steveire added a comment. Format Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61834/new/ https://reviews.llvm.org/D61834 Files: include/clang/AST/ASTNodeTraverser.h Index: include/clang/AST/ASTNodeTraverser.h =

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

2019-05-12 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D61827#1499335 , @lebedev.ri wrote: > In D61827#1499333 , @hintonda wrote: > > > When I asked for a test above, I understood you to say you couldn't provide > > one, but If I misunderst

[PATCH] D61836: Move TraversalKind enum to ast_type_traits

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 199180. steveire added a comment. Format Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61836/new/ https://reviews.llvm.org/D61836 Files: include/clang/AST/ASTTypeTraits.h include/clang/ASTMatchers/ASTMatchersInternal.h

[PATCH] D61835: Extract ASTDumper to a header file

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 199179. steveire added a comment. Format Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61835/new/ https://reviews.llvm.org/D61835 Files: include/clang/AST/ASTDumper.h lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp

[PATCH] D60910: [WIP] Dumping the AST to JSON

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: include/clang/AST/DeclBase.h:1139 + void dump(raw_ostream &Out, bool Deserialize = false, +ASTDumpOutputFormat OutputFormat = ADOF_Default) const; aaron.ballman wrote: > steveire wrote: > > I think we've

[PATCH] D61838: [Sema] Suppress additional warnings for C's zero initializer

2019-05-12 Thread Alex James via Phabricator via cfe-commits
al3xtjames created this revision. al3xtjames added a reviewer: cfe-commits. Herald added a project: clang. r314499 relaxed some checks for assigning { 0 } to a structure for all C standards, but it failed to handle structures with non-integer subobjects. Relax -Wmissing-braces checks for such stru

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

2019-05-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D61827#1499347 , @hintonda wrote: > In D61827#1499335 , @lebedev.ri > wrote: > > > In D61827#1499333 , @hintonda > > wrote: > > > > > When I

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 199185. steveire added a comment. Format Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61837/new/ https://reviews.llvm.org/D61837 Files: include/clang/AST/ASTContext.h include/clang/AST/ASTNodeTraverser.h include/clan

r360544 - Fix for P41852 where builtin attributes were being caught by FindLocsWithCommonFileID().

2019-05-12 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Sun May 12 14:50:01 2019 New Revision: 360544 URL: http://llvm.org/viewvc/llvm-project?rev=360544&view=rev Log: Fix for P41852 where builtin attributes were being caught by FindLocsWithCommonFileID(). Added: cfe/trunk/test/Driver/mingw-macro-qualified-type.c Modifie

[PATCH] D61769: [clang] Regenerate AST matcher docs 📖

2019-05-12 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360545: [clang] Regenerate AST matcher docs 📖 (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-05-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D51329#1499307 , @mstorsjo wrote: > This caused a regression when including mingw-w64 headers (in a case where > they happen to include redundant/duplicate attribute specifications), > triggering asserts. See https://bugs.

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

2019-05-12 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. I pulled down you patch, compiled and ran it. Once I fixed the two problems I mentioned, it ran clean, e.g.: $ bin/llvm-lit -vv ../../llvm-project/clang-tools-extra/test/clang-tidy/modernize-loop-convert-[be]*.cpp -- Testing: 2 tests, 2 threads -- PASS: Clang To

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

2019-05-12 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D61827#1499368 , @lebedev.ri wrote: > In D61827#1499347 , @hintonda wrote: > > > > >> Are you saying this patch is a regression? > > Not in general, no. This is most certainly an im

r360548 - Fix test to use -cc1.

2019-05-12 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Sun May 12 15:44:46 2019 New Revision: 360548 URL: http://llvm.org/viewvc/llvm-project?rev=360548&view=rev Log: Fix test to use -cc1. Added: cfe/trunk/test/Sema/mingw-macro-qualified-type.c Removed: cfe/trunk/test/Driver/mingw-macro-qualified-type.c Removed: cfe

[PATCH] D57858: [analyzer] Add a new frontend flag to display all checker options

2019-05-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 199188. Szelethus added a comment. - Make the educated observation that the code for formatted output is duplicated for `-analyzer-checker-help`, `-analyzer-config-help` and this patch, reuse it via the new static function `AnalyzerOptions::printFormatted

[PATCH] D57858: [analyzer] Add a new frontend flag to display all checker options

2019-05-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D57858#1498651 , @NoQ wrote: > Also, for CodeChecker purposes wouldn't you rather have a machine-readable > dump? My main purpose was readability in the terminal, but I will need to think about that eventually. The current

[PATCH] D61838: [Sema] Suppress additional warnings for C's zero initializer

2019-05-12 Thread Alex James via Phabricator via cfe-commits
al3xtjames updated this revision to Diff 199192. al3xtjames edited the summary of this revision. al3xtjames added a comment. Formatting changes. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61838/new/ https://reviews.llvm.org/D61838 Files: clang/lib/AST/Expr.

[PATCH] D61839: [analyzer][WIP] Hide developer-only checker/package options by default

2019-05-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, dcoughlin, xazax.hun, rnkovacs, Charusso, a_sidorin, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Szeleth

[PATCH] D57858: [analyzer] Add a new frontend flag to display all checker options

2019-05-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a subscriber: o.gyorgy. Szelethus added a comment. In D57858#1498640 , @NoQ wrote: > So, like, the global picture is as follows. In our case the Driver (i.e., > --analyze) is not much more user facing than frontend flags. It's still > fai

[PATCH] D60953: [clangd] Respect clang-tidy suppression comments

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Friendly review ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60953/new/ https://reviews.llvm.org/D60953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D61841: [clangd] Respect WarningsAsErrors configuration for clang-tidy

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. This completes the fix for https://bugs.llvm.org/show_bug.cgi?id=41218. Repository: rG LLVM Github Monorepo https:/

[PATCH] D61842: [WIP] [Not ready for review] Semantic highlighting

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, javed.absar, mgorny. Herald added a project: clang. nridge planned changes to this revision. Done: - Basic plumbing - Encoding of semantic highlighting tokens into the protocol format - Comp

[PATCH] D61842: [clangd] [WIP] [Not ready for review] Semantic highlighting

2019-05-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 199202. nridge added a comment. Add [clangd] to title Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61842/new/ https://reviews.llvm.org/D61842 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extr

[PATCH] D61663: [clang-format] Fix a JavaScript import order bug.

2019-05-12 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Generally, upload patches with the full file as context (that will prevent Phabricator's "Context not available") But this change looks good. Thank you. Repository: rC Clang CHANGES SINC

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

2019-05-12 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre marked 2 inline comments as done. mgehre 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; }; JonasToth wrote:

[PATCH] D61845: [builtin] Fixed definitions of builtins that rely on the int/long long type is 32/64 bits

2019-05-12 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka created this revision. Ka-Ka added reviewers: dylanmckay, spatel, rsmith. Herald added a subscriber: kristina. Herald added a project: clang. The definition of the builtins __builtin_bswap32, __builtin_bitreverse32, __builtin_rotateleft32 and __builtin_rotateright32 rely on that the int typ