[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. @hubert.reinterpretcast @aaron.ballman @erichkeane Thanks a lot for the review. I'm working on making PRs for the further changes we agreed to do. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.

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

2022-03-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417376. cor3ntin added a comment. - fix formatting - use cxx2b in the test as per aaron request. This doesn't really matter as this part of the test file is only executed in c++2b mode though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D122265: [Clang][NFC] Cleanup dcl.constexpr/p3 tests

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. - Check for warnings instead of using -Werror, to avoid masking the type of diagnostic emitted - use different -verify l

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

2022-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417534. cor3ntin added a comment. - Check That the type is dependant - Only emit the warning when Kind == Sema::CheckConstexprKind::Diagnose Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122249/new/ https://re

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

2022-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417535. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122249/new/ https://reviews.llvm.org/D122249 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Se

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

2022-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1905 +if (SemaRef.LangOpts.CPlusPlus2b) { + if (!VD->getType()->isLiteralType(SemaRef.Context)) +SemaRef.Diag(VD->getLocation(), hubert.reinterpretcast wrote:

[PATCH] D122278: [clang] Improve diagnostic for reopened inline namespace

2022-03-23 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. This looks good to me, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122278/new/ https://reviews.llvm.org/D122278 _

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

2022-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417586. cor3ntin added a comment. - Fix test - Add a comment explaining why we do not use CheckLiteralType @aaron,ballman I completely missed that...! However, CheckLiteralType does a bunch of tests that we do not need to diagnose *why* a type is not litera

[PATCH] D122265: [Clang][NFC] Cleanup dcl.constexpr/p3 tests

2022-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f63cd763ec8: [Clang][NFC] Cleanup dcl.constexpr/p3 tests (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122265/new/ https://reviews.

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

2022-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1905 +if (SemaRef.LangOpts.CPlusPlus2b) { + if (!VD->getType()->isLiteralType(SemaRef.Context)) +SemaRef.Diag(VD->getLocation(), aaron.ballman wrote: > aaron.b

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

2022-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 417640. cor3ntin added a comment. After talks with Aaron, I'm using CheckLiteralType in all cases, which adds notes about why a type is not literal. We still need to branch on CPlusPlus2b because the diagnostics take a variable number of arguments, and I'd r

[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 420971. cor3ntin added a comment. Recover from valid but loosly matched character names in identifiers more gracefully Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064

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

2022-04-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: aaron.ballman. cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:130-131 def ext_delimited_escape_sequence : Extension< - "delimited escape sequences are a Clang extension">, + "%select{delimited|named}0

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D123298#3435770 , @aaron.ballman wrote: > Changes LGTM, I also don't think we should hit these limits. Perhaps we > should add some assertions to the ctor and the setter functions just to be > sure though? If we are going

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421227. cor3ntin marked 4 inline comments as done. cor3ntin added a comment. Address ChuanqiXu's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: cl

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421228. cor3ntin added a comment. Formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/Basic/

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:1816-1821 + void setLambdaIsDependent(bool IsDependent) { +auto *DD = DefinitionData; +assert(DD && DD->IsLambda && "setting lambda property of non-lambda class"); +auto &DL = static_cast(

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421454. cor3ntin marked 6 inline comments as done. cor3ntin added a comment. Address ChuanqiXu's comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: cla

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421456. cor3ntin added a comment. - Address ChuanqiXu's comments - Add an entry in ReleaseNotes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: clang/docs/R

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/Scope.cpp:72 + // Lambdas have an extra prototype scope that doesn't add any depth + if (flags & FunctionPrototypeScope && !(flags & LambdaScope)) +PrototypeDepth++; ChuanqiXu wrote: > cor3ntin wrot

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421461. cor3ntin added a comment. Add dependent tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/

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

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421562. cor3ntin added a comment. Add fix hint tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421596. cor3ntin marked 6 inline comments as done. cor3ntin added a comment. Address Aaron's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: clang

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421598. cor3ntin added a comment. Missed a comment in Scope.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: clang/docs/ReleaseNotes.rst clang/include/cl

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

2022-04-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421721. cor3ntin added a comment. - Add tests - Cleanups - Optimization of nearestMatchesForCodepointName to only allocate when necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://rev

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

2022-04-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421723. cor3ntin added a comment. Fix in nameToCodepointLoose Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.t

[PATCH] D123456: [C89/C2x] Diagnose calls to a function without a prototype but passes arguments

2022-04-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision as: cor3ntin. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM except a couple of nitpicks Comment at: clang/lib/Sema/SemaExpr.cpp:7052 +// the call, diagnose this as calling a function without a prototype. +

[PATCH] D123456: [C89/C2x] Diagnose calls to a function without a prototype but passes arguments

2022-04-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:7052 +// the call, diagnose this as calling a function without a prototype. +// However, if we found a function declaration, check to see if the strict +// uses without a prototype warning was dis

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

2022-04-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421768. cor3ntin added a comment. Add missing header in generated code to fix windows CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clan

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

2022-04-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421769. cor3ntin added a comment. Fix linking on windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.td

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

2022-04-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421771. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang/include

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

2022-04-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421787. cor3ntin added a comment. A non-existing name could return an engaged value if the whole string matched the node's name, even if that node had no attached value. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

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

2022-04-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421939. cor3ntin added a comment. Add a test for `\o' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clan

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

2022-04-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421956. cor3ntin marked 17 inline comments as done. cor3ntin added a comment. Address Aaron's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang

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

2022-04-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 421958. cor3ntin added a comment. Cleanup generated code header comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123064/new/ https://reviews.llvm.org/D123064 Files: clang/include/clang/Basic/Diagnostic

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

2022-04-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/LiteralSupport.cpp:238 + diag::err_delimited_escape_missing_brace) +<< std::string(1, 'o'); aaron.ballman wrote: > Can you use `"o"` instead of constructing a `std::string` for it

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7702 + def err_lambda_used_before_capture: Error< +"captured variable %0 cannot appear before the end of the lambda's parameter list">; def note_lambda_variable_capture_fixit : N

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 422282. cor3ntin added a comment. After offline discussion with Aaron, we decided that "can not appear here" was a sufficient diagnostic, so I have implemented that. A better solution would be to track which captures fail, and collect the diagnostics to emit

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1127-1132 + auto it = LSI->DelayedCaptures.end(); + if (Var) +it = llvm::find_if(LSI->DelayedCaptures, [&Var](auto &&Pair) { + return Pair.second.Var == Var; +}); + i

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1127-1132 + auto it = LSI->DelayedCaptures.end(); + if (Var) +it = llvm::find_if(LSI->DelayedCaptures, [&Var](auto &&Pair) { + return Pair.second.Var == Var; +}); + i

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 422557. cor3ntin added a comment. Cleanup SemaLambda as discussed with Aaron Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: clang/docs/ReleaseNotes.rst c

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-13 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 rGadff142dc253: [clang] Implement Change scope of lambda trailing-return-type (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman @ChuanqiXu Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 ___ cfe-commits mailing list cfe-comm

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Yes, working on a fix as we speak. The meaning of that code changed (in all c++ language modes), I'm currently trying to find if we have any other issue of that sort and will commit a fix in a few hours Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin reopened this revision. cor3ntin added a comment. This revision is now accepted and ready to land. @rsmith Sorry about that, I will investigate. We found preexisting issues - attributes seem to ODR use when they should maybe not and I could not thing of attributes that would refer to ca

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. > Presumably we should be parsing the attribute in the enclosing context rather > than in the half-way-inside-the-lambda context in which we parse parameters? That's a good question. void f() { int y; (void)[=, x = 1]() __attribute__((diagnose_if(!is_same,

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 422806. cor3ntin added a comment. Properly support GNU Attributes Perform delayed parsing of GNU attributes (using code that already existed to delay the parsing of class methods), so that gnu attributes can refer to captured variables, with the

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:1253-1256 + // Due to a parsing error, we either went over the cached tokens or + // there are still cached tokens left, so we skip the leftover tokens. + wh

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:1486 + if (Tok.isOneOf(tok::kw_mutable, tok::arrow, tok::kw___attribute, + tok::kw___declspec, tok::kw_constexpr, tok::kw_consteval, +

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 422920. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. Address aarons comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 Files: clang/d

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:1397 +for (LateParsedAttribute *Attr : LateParsedAttrs) { + ParseLambdaLexedAttribute(*Attr, Attributes, D); + delete Attr; aaron.ballman wrote: > cor3ntin wrot

[PATCH] D123850: [Clang] Fix Unevaluated Lambdas Backport to Clang 14.0.1

2022-04-15 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] D123850: [Clang] Fix Unevaluated LambdasBackport to Clang 14.0.1

2022-04-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @tstellar I wasn't sure what the procedure was for backporting fixes, so I made a PR. I think your suggestion of keeping the old signature works well. This also modifies the serialized AST, is that an issue for backports? (If it is, I'm not sure i see a way to move forw

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-15 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 rG04000c2f928a: [clang] Implement Change scope of lambda trailing-return-type (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D99893: [WIP] Replace std::forward & std::move by cast expressions during Sema

2022-04-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin abandoned this revision. cor3ntin added a comment. Herald added a project: All. Richard committed a better approach so this is no longer needed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99893/new/ https://reviews.llvm.org/D99893 _

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

2022-04-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423228. cor3ntin added a comment. Fix several conflicrs with the recently committed change to lambda captures (D119136 ). Also add to rewrite the code gen test. I'm not sure what, if anything changed there, and the generated

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-17 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. Partially implement the proposed resolution to CWG2569. D119136 broke some libstdc++ c

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @grandinj Thanks for notifying me of this issue, and sorry for the inconvenience. There is a fix here https://reviews.llvm.org/D123909 Should the review of that linger too long, I'll revert this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:700 + + if (Tok.is(tok::identifier) && NextToken().is(tok::r_paren)) { +SourceLocation TemplateKWLoc; aaron.ballman wrote: > This feels surprisingly restrictive to me, but it's suff

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Sema/Sema.h:5281 + SourceLocation TemplateKwLoc, + bool HasTrailingLParen); + aaron.ballman wrote: > This par

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423363. cor3ntin marked an inline comment as done. cor3ntin added a comment. Address Aaron's feedback - Typos - Remove unused parameters - return ExprError() if ParseUnqualifiedId fails. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:700 + + if (Tok.is(tok::identifier) && NextToken().is(tok::r_paren)) { +SourceLocation TemplateKWLoc; aaron.ballman wrote: > cor3ntin wrote: > > aaron.ballman wrote: > > > This feel

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:700 + + if (Tok.is(tok::identifier) && NextToken().is(tok::r_paren)) { +SourceLocation TemplateKWLoc; aaron.ballman wrote: > cor3ntin wrote: > > aaron.ballman wrote: > > > cor3ntin

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423365. cor3ntin added a comment. - Add a release note - Add tests for lookup errors in decltype expressions in lambda parameters clause Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123909/new/ https://revie

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423367. cor3ntin added a comment. - Use a RAII class to control InMutableAgnosticContext - Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123909/new/ https://reviews.llvm.org/D123909 Files: clang/

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:2703 + UnqualifiedId &Id) { + InMutableAgnosticContext = true; + ExprResult Res = ActOnIdExpression(S, SS, /*TemplateKwLoc*/ erichkeane wrot

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423368. cor3ntin added a comment. Thanks Aaron, let's pretend this did not happen :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123909/new/ https://reviews.llvm.org/D123909 Files: clang/docs/ReleaseNotes

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423370. cor3ntin added a comment. ... and we don't need a local variable anymore either Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123909/new/ https://reviews.llvm.org/D123909 Files: clang/docs/ReleaseNo

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 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 rGdaa6d7b250ed: [Clang] Use of decltype(capture) in parameter-declaration-clause (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman @erichkeane Thanks for the review - I've landed it. Hopefully the remediation should be enough so that libstdc++ is no longer affected but we should still keep an eye out for further issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. The remediation has landed, sorry again for the trouble this caused, I'll keep an eye out for further issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136

[PATCH] D123955: [C2x] Disallow functions without prototypes/functions with identifier lists

2022-04-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for working on this, Just a few comments Comment at: clang/lib/Basic/LangOptions.cpp:119 Opts.Digraphs = Std.hasDigraphs(); + Opts.StrictPrototypes = Std.isCPlusPlus() || Std.isC2x(); Stupid question, we probably don't wan

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D119544#3458848 , @erichkeane wrote: > I went to commit this, and found that a recently lit test now fails with a > crash during constraint instantiation! I'll be looking into that. The > example reduces to: > > templat

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 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. D119136 changed how captures are handled in a lambda call operator declaration, but di

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423653. cor3ntin added a comment. Remove some whitespace only changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124012/new/ https://reviews.llvm.org/D124012 Files: clang/include/clang/Sema/Sema.h cla

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423656. cor3ntin added a comment. Fix whitespace changes (again) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124012/new/ https://reviews.llvm.org/D124012 Files: clang/include/clang/Sema/Sema.h clang/lib

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423657. cor3ntin added a comment. More cleanups and formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124012/new/ https://reviews.llvm.org/D124012 Files: clang/include/clang/Sema/Sema.h clang/lib/

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423671. cor3ntin added a comment. - Get rid of buildLambdaScopeCaptures - Set the call operator inner loc in CompleteLambdaCallOperator (+ tests) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124012/new/ htt

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1378-1383 + CompleteLambdaCallOperator( + Method, Intro.Range.getBegin(), ParamInfo.getTrailingRequiresClause(), + MethodTyInfo, ParamInfo.getDeclSpec().getConstexprSpecifier(), Params, + Ex

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:539-546 void Sema::buildLambdaScope(LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange,

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 423675. cor3ntin marked an inline comment as done. cor3ntin added a comment. Remove `startLambdaDefinition` which is no longer used Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124012/new/ https://reviews.llv

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D119136#3457027 , @rtrieu wrote: > This seems to be acting weird in template instantations. Here's an example > where the lambda only errors inside a template. Thanks for notifying me of that. I will land a fix shortly ht

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @erichkeane I will land that later today to unstuck people relying on main, let me know if you still want to have a look Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124012/new/ https://reviews.llvm.org/D124012

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-20 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 rG69dd89fdcbd8: [Clang] Fix references to captured variables in dependant context. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D124012: [Clang] Fix references to captured variables in dependant context.

2022-04-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @erichkeane @aaron.ballman Thanks! I'll keep an eye out for further issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124012/new/ https://reviews.llvm.org/D124012 ___ cfe-co

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Oh no. Let me know if i can help in any way CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119544/new/ https://reviews.llvm.org/D119544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:13002 + ExprResult NewTrailingRequiresClause = + E->getCallOperator()->getTrailingRequiresClause(); That doesn't look right. At best if you don't transform the trailing return type

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Sorry for the delayed reply. In D119136#3462660 , @aaron.ballman wrote: > In D119136#3462609 , @MaskRay wrote: > >> In D119136#3462579 , >> @a

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D119136#3462707 , @amyk wrote: > In D119136#3459738 , @alanphipps > wrote: > >> We've also been seeing failures in our downstream Arm compiler when running >> the Perennial C++14 com

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @rsmith @aaron.ballman Do you think it's worth resubmitting this patch with a look ahead of the `mutable` keyword (this seems to me a better strategy than other flimsy workaround suggested/tried), or would you rather wait for WG21 to come up with something? Repositor

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D119136#3465403 , @rsmith wrote: > In D119136#3463888 , @cor3ntin > wrote: > >> @rsmith @aaron.ballman Do you think it's worth resubmitting this patch with >> a look ahead of the `mu

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D119136#3465361 , @AaronLiu wrote: > When compile the following valid testcase: > > void foo() > { > int x = [x](int y[sizeof x]){return sizeof x;}(0); > } > > It will complain: > > error: captured variable '

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-02-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Implement P2036R3. Captured variables by copy (explicitely or not), are deduced correctly at the point we

[PATCH] D119225: [clang] Add core papers adopted at the february plenary.

2022-02-08 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. 2 papers are added to the status page, one targeting C++23, the other added to the batch of C++20 concept papers. Repository: rG LLVM Github Monore

[PATCH] D119225: [clang] Add core papers adopted at the february plenary.

2022-02-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 406792. cor3ntin added a comment. I missed that, sorry Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119225/new/ https://reviews.llvm.org/D119225 Files: clang/www/cxx_status.html Index: clang/www/cxx_stat

[PATCH] D117994: [Clang] Implement multidimentional subscript operator

2022-02-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 406841. cor3ntin added a comment. - Rebase - Update cxx_status as we are now targetting clang 15 instead of 14. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117994/new/ https://reviews.llvm.org/D117994 Files

[PATCH] D117994: [Clang] Implement multidimentional subscript operator

2022-02-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @erichkeane Thanks for the review! I had to rebase. I also updated the cxx_status page. @aaron.ballman If it looks good to you to, feel free to commit whenever you can. Thanks :D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D119375: [Clang][Sema] Do not evaluate value-dependent immediate invocations

2022-02-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: erichkeane. cor3ntin added a comment. This looks like the right fix to me but I would prefer @aaron.ballman or @erichkeane to have the final say. Comment at: clang/lib/Sema/SemaExpr.cpp:16731 /*IsImmediateInvocation*/ true); - ExprEvalConte

[PATCH] D112916: Confusable identifiers detection

2022-02-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman Thanks for the ping. One one hand, I agree with you, on the other hand, this tries to stick to TR39, and I think we should stick with that. It might be worth checking with the Unicode consortium what they think of i/l as confusable. I think this is a ra

[PATCH] D119651: [clang] Fix evaluation context type for consteval function calls in instantiations

2022-02-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D119651#3317346 , @erichkeane wrote: > I'm pretty sure @cor3ntin just messed with this quite a bit, so I'd like to > hear his thoughts on this. But this generally looks right on first blush. Probably not as much as you haha

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