[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420521. cor3ntin added a comment. - Support loose matching - Modifiy the binary format to make it easier to have a root node Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D

[PATCH] D122661: [Clang] Do not warn on unused lifetime-extending vars with side effects...

2022-04-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420530. cor3ntin marked an inline comment as done. cor3ntin added a comment. - Address Aaron's comments. - Add more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122661/new/ https://reviews.llvm.org/D12

[PATCH] D122661: [Clang] Do not warn on unused lifetime-extending vars with side effects...

2022-04-05 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG84f0a36b14bb: [Clang] Do not warn on unused lifetime-extending vars with side effects... (authored by cor3ntin). Changed prior to commit: https://

[PATCH] D122661: [Clang] Do not warn on unused lifetime-extending vars with side effects...

2022-04-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for the review Aaron <3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122661/new/ https://reviews.llvm.org/D122661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D123064: [Clang][C++23][WIP] P2071 Named universal character escapes

2022-04-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 420946. cor3ntin added a comment. - Typo fixes for invalid code points Add a method `NearestMatchesForCodepointName` that will return the N closest valid codepoints, by edit distance. This is used to detect typos in named escape sequences in literals. - Add

[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. Thanks a lot for working on this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130689/new/ https://reviews.llvm.org/D130689 ___ cfe-commits mai

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman @shafik I'm perfectly happy to add isInitCapture in `ValueDecl` if that allows us to make progress on this. Let me know what you think! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://revi

[PATCH] D130416: [Clang] Add support for Unicode identifiers (UAX31) in C2x mode.

2022-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:1490-1492 static const llvm::sys::UnicodeCharSet XIDStartChars(XIDStartRanges); // '_' doesn't have the XID_Start property but is allowed in C++. return C == '_' || XIDStartChars.contains(C); -

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 448524. cor3ntin marked 19 inline comments as done. cor3ntin added a comment. Address most comments, except for lifting isInitCapture into ValueDecl, which I will do separately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 448539. cor3ntin added a comment. Put `isInitCapture` in `ValueDecl`. This allows a few code simplification in the resst of the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 448543. cor3ntin marked 7 inline comments as done. cor3ntin added a comment. Add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 Files: clang-tools-extra/

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 448544. cor3ntin added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp clan

[PATCH] D130750: [Clang] Do not check for underscores in isAllowedInitiallyIDChar

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. isAllowedInitiallyIDChar is only used with non-ASCII codepoints, which are handled by isAsciiIdentifierStart. To make that

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Analysis/AnalysisDeclContext.cpp:173 +ValueDecl *VD = LC.getCapturedVar(); +if (isSelfDecl(dyn_cast(VD))) return dyn_cast(VD); erichkeane wrote: > aaron.ballman wrote: > > This looks dangerous -

[PATCH] D130750: [Clang] Do not check for underscores in isAllowedInitiallyIDChar

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 448581. cor3ntin added a comment. Fix asser message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130750/new/ https://reviews.llvm.org/D130750 Files: clang/lib/Lex/Lexer.cpp Index: clang/lib/Lex/Lexer.cpp

[PATCH] D130750: [Clang] Do not check for underscores in isAllowedInitiallyIDChar

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:1486 static bool isAllowedInitiallyIDChar(uint32_t C, const LangOptions &LangOpts) { + assert(C > 0x7F && "isAllowedInitiallyIDChar called with a non-ASCII codepoint"); if (LangOpts.AsmPreprocessor) { -

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:18399 + if (Diagnose) +diagnoseUncapturableValueReferenceOrBinding(S, Loc, Var); + return false; erichkeane wrote: > first, why are we checking for !CPlusPlus... aren't Bind

[PATCH] D130750: [Clang] Do not check for underscores in isAllowedInitiallyIDChar

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGad16268f1350: [Clang] Do not check for underscores in isAllowedInitiallyIDChar (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130750/n

[PATCH] D130750: [Clang] Do not check for underscores in isAllowedInitiallyIDChar

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thank you both! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130750/new/ https://reviews.llvm.org/D130750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 448726. cor3ntin added a comment. Fix codegen test (Thanks Erich!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 Files: clang-tools-extra/clang-tidy/modernize/Lo

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 448773. cor3ntin added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 449690. cor3ntin added a comment. Missed a comment (s/ValueDecl/auto/ on the LHS of a `cast`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 Files: clang-tools-ex

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 449696. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. Add fixed issues to the release notes + address aaron comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://re

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks @aaron.ballman! I'm gonna wait a bit before merging in case @erichkeane want to do another pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 __

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG44f2baa3804a: [Clang][C++20] Support capturing structured bindings in lambdas (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 449780. cor3ntin added a comment. Fix self-build - The way we tested for unions was broken - It was also redundant, as we do that before in the same function (`isVariableCapturable`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG127bf4438542: [Clang][C++20] Support capturing structured bindings in lambdas (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/ne

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D122768#3700451 , @aeubanks wrote: > in the commit message > > In addition, capturing an anonymous union member, > a bitfield, or a structured binding thereof now has a > better diagnostic. > > "better diagnostic" implie

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D122768#3700738 , @aeubanks wrote: > In D122768#3700486 , @cor3ntin > wrote: > >> In D122768#3700451 , @aeubanks >> wrote: >> >>> in the com

[PATCH] D131202: [Clang] Fix capture of values initialized by bitfields

2022-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes a regression introduced in 127bf44 Rep

[PATCH] D131202: [Clang] Fix capture of values initialized by bitfields

2022-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 450138. cor3ntin added a comment. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Better approach: revert the whole thing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131202/new/ htt

[PATCH] D131202: [Clang] Fix capture of values initialized by bitfields

2022-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa1a71b7dc97b: [Clang] Fix capture of values initialized by bitfiel

[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

2022-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I landed https://github.com/llvm/llvm-project/commit/a1a71b7dc97b35133425a31ede90c40529f1be9e - which reverts entierely the bitfields related changes. It should fix the build issue you are encountering. There are still pre-existing issues with the capture of bit fields

[PATCH] D131351: [C] Default implicit function pointer conversions diagnostic to be an error

2022-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM. I agree that this address potential security issues. I'm curious how many people will be affected, but hopefully by doing that early in the clang 16 cycle we might find out! Thanks f

[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D130689#3706135 , @aaron.ballman wrote: > In D130689#3705131 , @royjacobson > wrote: > >> This seems to have been more disruptive than expected, since an existing >> CMakeCache.txt

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-07-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This implements P2362 , which has not het been approved by the C++ committee, but because wide-multi character literal

[PATCH] D106216: Disallow narrowing conversions to bool in explicit specififers.

2021-07-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Completes the support for P1401R5 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D106216 Files: clang/lib/Sema/SemaOverload.cpp

[PATCH] D106216: Disallow narrowing conversions to bool in explicit specififers.

2021-07-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 359558. cor3ntin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106216/new/ https://reviews.llvm.org/D106216 Files: clang/lib/Sema/SemaOverload.cpp clang/test/SemaCXX/cxx2a-explicit

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-07-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 359559. cor3ntin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106215/new/ https://reviews.llvm.org/D106215 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang/lib/Lex/Lit

[PATCH] D106252: Implement P2092

2021-07-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Simple requierements in requierement body shall not start with requires. A warning was already in place so we just turn this warning into an error. In

[PATCH] D106252: Implement P2092

2021-07-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 359676. cor3ntin added a comment. Fix cxx_status Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106252/new/ https://reviews.llvm.org/D106252 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/l

[PATCH] D106216: Disallow narrowing conversions to bool in explicit specififers.

2021-07-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 359677. cor3ntin added a comment. Fix cxx_status Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106216/new/ https://reviews.llvm.org/D106216 Files: clang/lib/Sema/SemaOverload.cpp clang/test/SemaCXX/cxx2a-

[PATCH] D106252: Implement P2092

2021-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 359824. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106252/new/ https://reviews.llvm.org/D106252 Files: clang/include/clang/Basic/DiagnosticParseKinds.td clang/lib/P

[PATCH] D106302: Implement P1937 consteval in unevaluated contexts

2021-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In an unevaluated contexts, consteval functions should not be immediately evaluated. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/

[PATCH] D106302: Implement P1937 consteval in unevaluated contexts

2021-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Note that I think this was partially implemented as part of https://reviews.llvm.org/D74130 - which has not progressed since October. This PR implements P1937 only Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D106302: Implement P1937 consteval in unevaluated contexts

2021-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 360235. cor3ntin added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106302/new/ https://reviews.llvm.org/D106302 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/cxx2a-cons

[PATCH] D106302: Implement P1937 consteval in unevaluated contexts

2021-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:612 +static_assert(is_same::value); + +} // namespace unevaluated aaron.ballman wrote: > Here's an interesting test case: > ``` > #include > > struct S { > virtual void f(); >

[PATCH] D106302: Implement P1937 consteval in unevaluated contexts

2021-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:612 +static_assert(is_same::value); + +} // namespace unevaluated cor3ntin wrote: > aaron.ballman wrote: > > Here's an interesting test case: > > ``` > > #include > > > > struct

[PATCH] D106435: Fix tests

2021-07-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D106435 Files: clang/test/Lexer/char-escapes-delimited.c Index: clang/test/Lexer/c

[PATCH] D106216: Disallow narrowing conversions to bool in explicit specififers.

2021-07-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 360840. cor3ntin added a comment. It turns out that explicit was doing the right thing (as outlined in P1401 ), but noexcept was not. I've reworked the handling of noexcept so that noexcept and explicit specifier use the same

[PATCH] D106216: Disallow narrowing conversions to bool in explicit specififers.

2021-07-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:5638 ImplicitConversionSequence ICS = - CCE == Sema::CCEK_ExplicitBool - ? TryContextuallyConvertToBool(S, From) - : TryCopyInitialization(S, From, T, -

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added subscribers: s.egerton, simoncook, dschuff. cor3ntin requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. Both C and C++ standard suggest that the macro __STDC_ISO_10646__ should be defined w

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D106577#2897312 , @aaron.ballman wrote: > Can you also add a test that explicitly uses `-fshort-wchar` to verify that > we don't predefine the macro? There is one already! (init.c L288) Comment at: clang

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 360914. cor3ntin added a comment. Remove braces, improve comment (Thanks Aaron) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106577/new/ https://reviews.llvm.org/D106577 Files: clang/lib/Basic/Targets/OSTa

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D106577#2897588 , @aaron.ballman wrote: > In D106577#2897522 , @jyknight > wrote: > >> I'm not sure we should be populating this. >> >> The _value_ is determined by what libc support

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D106577#2898967 , @hubert.reinterpretcast wrote: > In D106577#2897588 , @aaron.ballman > wrote: > >> In D106577#2897522 , @jyknight >> wrot

[PATCH] D106302: Implement P1937 consteval in unevaluated contexts

2021-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:612 +static_assert(is_same::value); + +} // namespace unevaluated aaron.ballman wrote: > cor3ntin wrote: > > cor3ntin wrote: > > > aaron.ballman wrote: > > > > Here's an interestin

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D106577#2899715 , @aaron.ballman wrote: > In D106577#2899711 , @joerg wrote: > >> This patch is certainly wrong for NetBSD as the wchar_t encoding is up to >> the specific locale cha

[PATCH] D106252: Make simple requirements starting with requires ill-formed in in requirement body

2021-07-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 361416. cor3ntin added a comment. - Fix typos - remove the tests about typenames (don't pass yet) - Mark as partial until P2092 is implemented Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D106252: Make simple requirements starting with requires ill-formed in in requirement body

2021-07-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/Parser/cxx2a-concepts-requires-expr.cpp:152-153 +}; +bool r42 = requires(typename S::type i) { + requires requires(typename S::type i) { requires true; }; +}; Quuxplusone wrote: > `s/int/T/` otherwise you mi

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 361639. cor3ntin added a comment. Herald added a project: clang-tools-extra. Fix tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106577/new/ https://reviews.llvm.org/D106577 Files: clang-tools-extra/te

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D106577#2905027 , @aaron.ballman wrote: >> That doesn't help the fact that wide char literals are effectively broken on >> those OSes, but oh well. Maybe someday they'll decide to switch to a >> consistent/documented wchar

[PATCH] D121532: [Clang][WIP] Fix Unevaluated Lambdas

2022-03-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Unlike other types, when lambdas are instanciated, th

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 414880. cor3ntin added a comment. - Rebase - Update cxx_status as we are now targeting clang 15 - Test the pre-C++2b warnings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415041. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. Address Hubert's feedback - Add a diagnostic during constant evaluation when evaluating the declaration of a variable with non-automatic storage duration - Add more tests - Restore

[PATCH] D121532: [Clang][WIP] Fix Unevaluated Lambdas

2022-03-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:12948 + + if (OldClass->isDependentContext()) +getDerived().transformedLocalDecl(OldClass, {Class}); aaron.ballman wrote: > Can you explain why you only do these transformations when

[PATCH] D121532: [Clang][WIP] Fix Unevaluated Lambdas

2022-03-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415187. cor3ntin added a comment. Remove prior attempt at fixing this bug (good catch Aaron!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121532/new/ https://reviews.llvm.org/D121532 Files: clang/include/

[PATCH] D121532: [Clang][WIP] Fix Unevaluated Lambdas

2022-03-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D121532#3380580 , @shafik wrote: > Can you add a test to `ASTImpoterTest.cpp` that checks that we import the > `LambdaDependencyKind` correctly? Sure, if we agree that the direction is sufficiently palatable (I'm not convin

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415240. cor3ntin added a comment. clamg-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagn

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415353. cor3ntin added a comment. Fix test messed up by automatic formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415425. cor3ntin marked 6 inline comments as done. cor3ntin added a comment. Address formatting and style issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 File

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:2132-2136 +for (Stmt *SubStmt : S->children()) + if (SubStmt && + !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts, + Cxx1yLoc, Cxx2aLoc

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx2b.cpp:60-61 + +constexpr int ke = k_evaluated(1); //expected-error {{constexpr variable 'ke' must be initialized by a constant expression}} \ + //expected-not

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:2132-2136 +for (Stmt *SubStmt : S->children()) + if (SubStmt && + !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts, + Cxx1yLoc, Cxx2aLoc

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415438. cor3ntin added a comment. Restore the C++14 tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415464. cor3ntin added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagnosti

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415573. cor3ntin added a comment. - Add tests in lambdas - Do not allow static constexpr: I can't think of a scenario in which that would be problematic *today*, but I agree it would be non-conforming and should be discussed. For example it would affect htt

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415574. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagnos

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415719. cor3ntin added a comment. Add more tests for implicitely constexpr lambdas Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.r

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 415720. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagnos

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @hubert.reinterpretcast I added the tests, please let me know what you think. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 ___

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1904-1906 +if (!SemaRef.LangOpts.CPlusPlus2b && +CheckLiteralType(SemaRef, Kind, VD->getLocation(), VD->getType(), diag::err_constexpr_local_var_non_litera

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416672. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. - Test dcl.constexpr/dtor.cpp in both C++20 and C++23 modes - Make sure j/k are actually called in constant-expression-cxx2b.cpp Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 2 inline comments as done. cor3ntin added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:1 -// RUN: %clang_cc1 -std=c++2a -verify %s hubert.reinterpretcast wrote: > aaron.ballman wrote: > > I think we want to

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:1-3 +// RUN: %clang_cc1 -verify -fcxx-exceptions -triple=x86_64-linux-gnu -std=c++11 -Werror=c++14-extensions -Werror=c++20-extensions -We

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416758. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. - fix typos - add tests for non-literals in lambdas - run lambda tests in c++20 mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416760. cor3ntin added a comment. Add a test for evaluated labels Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/includ

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:17-22 +constexpr int g() { // expected-error {{constexpr function never produces a constant expression}} + goto test;// expected-note {{subexpression not valid in a const

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416792. cor3ntin marked 5 inline comments as done. cor3ntin added a comment. - Tidy up tests - Add comments - Add a test with a non literal variable in dependant context as per Hubert's suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416793. cor3ntin added a comment. - clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Dia

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416835. cor3ntin marked 11 inline comments as done. cor3ntin added a comment. Tidy up the tests again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416838. cor3ntin added a comment. Add ifdef around tests that should not run in c++20 mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/Releas

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416839. cor3ntin added a comment. Switch variable names (non_literal_ko/non_literal_ok) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNo

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417084. cor3ntin added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Dia

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: erichkeane. cor3ntin added a comment. In D111400#3397533 , @hubert.reinterpretcast wrote: > LGTM with minor nit. Thank you. Thanks a lot for the review. I will probably merge tomorrow unless @aaron.ballman or @erichkeane hav

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417320. cor3ntin added a comment. - Add tests for _Thread_local, thread (these should be supported in c++23 constexpr function) - Change /declaration/definition/ in a diagnostic message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I will probably land that soon if there are no further issue According to my notes, i then need to - Cleanup `clang/test/SemaCXX/constant-expression-cxx14.cpp` (remove -Werror, #ifdef) - Add braces in `CheckConstexprFunctionStmt` - We may still miss a compatibility wa

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417341. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Diagnos

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG683e83c56f98: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/n

[PATCH] D122249: [Clang] Add a compatibiliy warning for non-literals in constexpr.

2022-03-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D122249 Files: clang/include/clang/Basic/DiagnosticSema

<    1   2   3   4   5   6   7   8   9   10   >