[PATCH] D74684: [Sema][C++] Adopt DR2171 relaxed triviality requirements

2020-02-16 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. When defining a copy constructor or assignment operator as either explicitly defaulted (`= default`) or deleted (`= delete`), it's possible to give it a different p

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-10-17 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 225557. comex marked 2 inline comments as done. comex added a comment. So, I landed this patch but had to revert it as it broke the build on MSVC (and only MSVC). That was almost a month ago, but I haven't gotten back around to this until now – sorry :| In t

[PATCH] D67740: [Consumed] Refactor and improve diagnostics

2019-09-26 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Ping... Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67740/new/ https://reviews.llvm.org/D67740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-26 Thread Nicholas Allegra via Phabricator via cfe-commits
comex marked 2 inline comments as done. comex added inline comments. Comment at: llvm/include/llvm/ADT/iterator_range.h:27-33 +template +constexpr bool is_random_iterator() { + return std::is_same< +typename std::iterator_traits::iterator_category, +std::random_access_i

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-19 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 220926. comex added a comment. In D67647#1674795 , @dblaikie wrote: > Right - I was suggesting that could be changed. Would it be OK to you to > change arguments() to return ArrayRef? Or would you rather avoid that to

[PATCH] D67778: [Consumed] Narrow Subject for some attributes

2019-09-19 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added a reviewer: dblaikie. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is the former second part of https://reviews.llvm.org/D67740 that was split out (and rewritten). Error out when the `callable_when`, `set_typestate` and `tes

[PATCH] D67740: [Consumed] Refactor and improve diagnostics

2019-09-19 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 220918. comex marked 2 inline comments as done. comex edited the summary of this revision. comex added a comment. Addressed feedback. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67740/new/ https://reviews.llvm.org/D67740 Fil

[PATCH] D67740: [Consumed] Refactor and improve diagnostics

2019-09-19 Thread Nicholas Allegra via Phabricator via cfe-commits
comex marked 4 inline comments as done. comex added a comment. In D67740#1675564 , @dblaikie wrote: > Looks like this might benefit from being split into independent changes - the > work related to templates (I haven't looked closely, but I assume that's

[PATCH] D67743: [Consumed] Treat by-value class arguments as consuming by default, like rvalue refs.

2019-09-19 Thread Nicholas Allegra via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372361: [Consumed] Treat by-value class arguments as consuming by default, like rvalue… (authored by comex, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed p

[PATCH] D67743: [Consumed] Treat by-value class arguments as consuming by default, like rvalue refs.

2019-09-19 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. In D67743#1675533 , @dblaikie wrote: > "Also, fix the order of if statements so that an explicit return_typestate > annotation takes precedence over the default behavior for rvalue refs." > > I'd probably have split that out into a

[PATCH] D67740: [Consumed] Refactor and improve diagnostics

2019-09-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 220784. comex added a comment. Fixed a mistake where the diagnostic would print the wrong parameter type. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67740/new/ https://reviews.llvm.org/D67740 Files: include/clang/Analysis

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. In D67647#1674773 , @dblaikie wrote: > I wasn't expecting it to involve all this work - but instead to change > "arguments()" to return ArrayRef. Though perhaps you didn't go that route to > allow future fixes to the strict aliasin

[PATCH] D67743: [Consumed] Treat by-value class arguments as consuming by default, like rvalue refs.

2019-09-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added a reviewer: dblaikie. Herald added a project: clang. Herald added a subscriber: cfe-commits. Also, fix the order of `if` statements so that an explicit `return_typestate` annotation takes precedence over the default behavior for rvalue refs. Note that for

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 220771. comex added a comment. Herald added subscribers: llvm-commits, dexonsmith. Herald added a project: LLVM. Here's a new version of the patch that uses iterator ranges instead of `ArrayRef`, to avoid adding new uses of `CallExpr::getArgs()` in case it has

[PATCH] D67740: [Consumed] Refactor and improve diagnostics

2019-09-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added a reviewer: dblaikie. Herald added a project: clang. Herald added a subscriber: cfe-commits. As suggested by FIXME comments, fix commented-out diagnostic in Sema and remove the equivalent check within the consumed analysis. The diagnostic in question is t

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-17 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Ugh, it looks like `getArgs()` is a massive strict aliasing violation. And it's used in enough different places in Clang that fixing the violation may require extensive refactoring... I've reported the issue as https://bugs.llvm.org/show_bug.cgi?id=43344, but I don't rea

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-16 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added a reviewer: dblaikie. Herald added subscribers: cfe-commits, dmgreen, kristof.beyls. Herald added a project: clang. Currently, `handleCall` takes a `CallExpr` as an argument and retrieves the arguments from there. This changes it to take the argument list

[PATCH] D66830: Consumed checker: various improvements

2019-09-16 Thread Nicholas Allegra via Phabricator via cfe-commits
comex abandoned this revision. comex added a comment. Herald added a subscriber: dmgreen. Sounds good; I'll split this into a few separate patches. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66830/new/ https://reviews.llvm.org/D66830 ___

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-09-16 Thread Nicholas Allegra via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372058: Push lambda scope earlier when transforming lambda expression (authored by comex, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D65694: Properly instantiate a decltype in argument's default initializer

2019-09-16 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Ping. I'm not qualified to review this myself but I'd like to see the bug fixed. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65694/new/ https://reviews.llvm.org/D65694 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D65694: Properly instantiate a decltype in argument's default initializer

2019-08-27 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65694/new/ https://reviews.llvm.org/D65694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D66830: Consumed checker: various improvements

2019-08-27 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added reviewers: delesley, dblaikie, rsmith. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. - Treat arguments to constructor calls the same way as arguments to other calls (fixes 42856). Previously, arguments t

[PATCH] D66404: [CFG] Make destructor calls more accurate

2019-08-26 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Heh, I guess I'll request commit access, although I'm not sure if I have enough of a 'track record of submitting high quality patches'. But for now, can you commit this? Thanks :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66404/new/

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-26 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added inline comments. Comment at: clang/test/SemaTemplate/default-arguments-cxx0x.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s // expected-no-diagnostics lebedev.ri wrote: > Mordante

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-26 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 217230. comex marked 2 inline comments as done. comex added a comment. Addressed review comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66067/new/ https://reviews.llvm.org/D66067 Files: lib/Sema/TreeTransform.h tes

[PATCH] D66404: [CFG] Make destructor calls more accurate

2019-08-21 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 216545. comex marked 9 inline comments as done. comex added a comment. Changes since last version: - Rebased. - Added `ExternallyDestructed` parameter to `VisitExprWithCleanups` and `CFGBuilder::Visit`; removed `VisitExternallyDestructed`. - Changed CFG printi

[PATCH] D66404: [CFG] Make destructor calls more accurate

2019-08-21 Thread Nicholas Allegra via Phabricator via cfe-commits
comex abandoned this revision. comex marked 18 inline comments as done. comex added inline comments. Comment at: lib/Analysis/CFG.cpp:2102 case Stmt::CompoundStmtClass: - return VisitCompoundStmt(cast(S)); + return VisitCompoundStmt(cast(S), /*ExternallyDestructed

[PATCH] D66404: [CFG] Make destructor calls more accurate

2019-08-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added reviewers: dergachev.a, Szelethus, dcoughlin. Herald added a project: clang. Herald added a subscriber: cfe-commits. Note: I don't have commit access. Various changes to reduce discrepancies in destructor calls between the generated CFG and the actual code

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex marked an inline comment as done. comex added inline comments. Comment at: clang/test/SemaTemplate/default-arguments-cxx0x.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s // expected-no-diagnostics -

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-11 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 214572. comex added a comment. Oops, I forgot to re-run `git diff` after fixing the patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66067/new/ https://reviews.llvm.org/D66067 Files: clang/lib/Sema/TreeTransform.h clang/test/SemaTemplate/defa

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-11 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added reviewers: rsmith, faisalv, Mordante. Herald added a project: clang. Herald added a subscriber: cfe-commits. When first parsing a lambda expression, `BuildDeclRefExpr` is called on the parameter declarations with the lambda scope already pushed. But when

[PATCH] D58089: Add missing library dependencies in CMakeLists.txt

2019-02-25 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Ping. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58089/new/ https://reviews.llvm.org/D58089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D58089: Add missing library dependencies in CMakeLists.txt

2019-02-12 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Oh, forgot to mention in the initial submission: I don't have commit access so I'll need someone else to commit this. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58089/new/ https://reviews.llvm.org/D58089 ___

[PATCH] D58089: Add missing library dependencies in CMakeLists.txt

2019-02-11 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added reviewers: jkorous, phosek. Herald added subscribers: cfe-commits, kadircet, arphaman, ioeric, ilya-biryukov, mgorny. Herald added a project: clang. Fixes build in BUILD_SHARED_LIBS mode. Removes the "DEPENDS clangdXpcJsonConversions" line as LINK_LIBS al