[PATCH] D153890: [clang] Fix checking the equality comparator of base classes in __is_trivially_equality_comparable

2023-06-28 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. Oh wow, nice catch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153890/new/ https://reviews.llvm.org/D153890

[PATCH] D151697: [clang] Add test for CWG1710 and related issues

2023-06-28 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. Thanks. These seem like important issues to fix. should we make a github issue to track them? Comment at: clang/test/CXX/drs/dr17xx.cpp:10 +namespace dr1710 { // dr1710:

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D105759#4456864 , @aaron.ballman wrote: > I don't think it's correct to assume that all string arguments to attributes > are unevaluated, but it is hard to tell where to draw the line sometimes. > Backing up a step, as I un

[PATCH] D153702: [Clang] Implement P2738R1 - constexpr cast from void*

2023-06-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CXX/expr/expr.const/p5-26.cpp:13 +(void)static_cast(a); //cxx23-note {{cast from 'void *' is not allowed in a constant expression in C++ standards before C++2c}} +(void)static_cast(a); +(void)static_cast(a);

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-06-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Sorry, I missed the ping on Discord. Thanks for working on this I don't feel qualified to review this, but I don't think there are nearly enough tests. FYI there is a previous attempt at this here https://reviews.llvm.org/D139586 - with some test suggestions Reposito

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-06-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 535846. cor3ntin marked 5 inline comments as done. cor3ntin added a comment. - Address Aaron's feedback - Add more tests - Add a longer description of the feature in the release notes - address nitpicks - Improve error message when using __builtin_offs

[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

2023-06-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks a lot for working on this! Do you need Aaron or myself to commit this for you? If so, which name / mail do you want us to use? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139837/new/ https://reviews.llvm.org/D139

[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

2023-06-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. The changes to clang/www/cxx_status.html got lost during the rebase, can you fix that? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139837/new/ https://reviews.llvm.org/D139837 __

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-06-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It would be great if we could make progress on this for clang 17, I was told it's forcing some people to use other compilers. Are the recent changes to the itanium abi enough to complete this work? Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/ne

[PATCH] D153849: [clang][Diagnostics] Fix diagnostic line numbers

2023-06-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153849#4463001 , @tbaeder wrote: > @cor3ntin Thanks. You're very close to getting on my default reviewer list > though, so be careful ;) Thanks for the heads up, I might add you to mine :D Repository: rG LLVM Github Mon

[PATCH] D153375: [Clang] Fix incorrect use of direct initialization with copy initialization

2023-06-30 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 but can you add a line in Release Notes? Thanks Comment at: clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp:292 + E e; + e = {0}; // expected-error {{cannot

[PATCH] D146719: [Clang] Improve diagnostics when using a concept as template argument

2023-03-30 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 rGabf4a8cb15d4: [Clang] Improve diagnostics when using a concept as template argument (authored by cor3ntin). Changed prior to commit: https://revie

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @KyleFromKitware oups, this fell under the cracks. I think I'm happy with is as-is, do you need help landing it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143099/new/ https://reviews.llvm.org/D143099 ___ cfe-com

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D143099#4233633 , @KyleFromKitware wrote: > In D143099#4233623 , @cor3ntin > wrote: > >> @KyleFromKitware oups, this fell under the cracks. I think I'm happy with is >> as-is, do yo

[PATCH] D143099: [clang][lex] Expose findBeginningOfLine()

2023-03-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/unittests/Lex/LexerTest.cpp:673 + EXPECT_EQ(FindBeginningOfLineOffset("int func1();\nint func2();", 13), 13); + EXPECT_EQ(FindBeginningOfLineOffset("int func1();\nint func2();", 12), 13); + EXPECT_EQ(FindBeginningOfLineOffset("

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks, for working on this Congrats on finding the underlying issue, it must not have been easy! Comment at: clang/lib/Sema/SemaDecl.cpp:15177 : ExprEvalContexts.back().Context); +ExprEvalContexts.back().InImmediateFunct

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 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. I reworked the comment a bit otherwise LGTM. Comment at: clang/lib/Sema/SemaDecl.cpp:15178-15185 + // Each ExpressionEvaluationContextRecord also keeps track on whether

[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

2023-04-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15186 + // different handling. + ExprEvalContexts.back().InImmediateFunctionContext = FD->isConsteval(); + shafik wrote: > I am a bit concerned that we are updating `InImmediateFunctionCont

[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

2023-04-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @ychen Hey! Are you still working on this? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139837/new/ https://reviews.llvm.org/D139837 ___ cfe-commits mailing list cfe-co

[PATCH] D147554: [clang] Mark CWG562 as N/A

2023-04-06 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147554/new/ https://reviews.llvm.org/D147554 ___

[PATCH] D147549: [clang] Add test for CWG255

2023-04-06 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147549/new/ https://reviews.llvm.org/D147549 ___

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-04-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. LGTM. Thanks for completing this :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147717/new/ https://reviews.llvm.org/D147717 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D147925: [Clang] Check type-constraints applied to placeholder types

2023-04-10 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. (and deduced return types) Previously, only type constraints applied to type parameter were semantically checked. A diag

[PATCH] D147925: [Clang] Check type-constraints applied to placeholder types

2023-04-10 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 rG1cdc0e83c8ce: [Clang] Check type-constraints applied to placeholder types (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

2023-04-11 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. Because the comment parser does not support slices, we emit a warning for comments that do contain a splice within their d

[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

2023-04-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 512505. cor3ntin added a comment. Add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148029/new/ https://reviews.llvm.org/D148029 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Raw

[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

2023-04-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D148029#4258800 , @shafik wrote: > Do we have a test that covers valid doxygen comments? I was looking and I > don't see an obvious one. AFAICT, some in `CommentTextTest.cpp` - not that many though. Comme

[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

2023-04-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/RawCommentList.h:122 +StringRef Text = getRawText(SourceMgr); +if (Text.size() < 6 || Text[0] != '/') + return false; aaron.ballman wrote: > Just to double-check, we don't have to wo

[PATCH] D148029: [Clang] Fix crash caused by line splicing in doc comment

2023-04-12 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 rG43575719d0c6: [Clang] Fix crash caused by line splicing in doc comment (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D148136: [clang] Add test for CWG1894 and CWG2199

2023-04-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CXX/drs/dr18xx.cpp:172-227 +namespace dr1894 { // dr1894: 3.8 + // NB: reusing dr407 test + struct S; + typedef struct S S; + void f() { +struct S *p; +{ I think i would prefer re

[PATCH] D148146: [clang] Make make_cxx_dr_status script runnable from anywhere

2023-04-12 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. Great idea, looks good! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148146/new/ https://reviews.llvm.org/D148146

[PATCH] D148136: [clang] Add test for CWG1894 and CWG2199

2023-04-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CXX/drs/dr18xx.cpp:172-227 +namespace dr1894 { // dr1894: 3.8 + // NB: reusing dr407 test + struct S; + typedef struct S S; + void f() { +struct S *p; +{ Endill wrote: > cor3ntin

[PATCH] D148136: [clang] Add test for CWG1894 and CWG2199

2023-04-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/www/cxx_dr_status.html:13004 Typedefs and tags -Unknown +Clang 3.8 I would just say "Yes", i think clang 3.8 predates these issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D148136: [clang] Add test for CWG1894 and CWG2199

2023-04-13 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, thanks! Comment at: clang/www/cxx_dr_status.html:13004 Typedefs and tags -Unknown +Clang 3.8 Endill wrote: > erichkeane wrote: > >

[PATCH] D147920: [clang] Add test for CWG399

2023-05-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I'm seeing test failures on main error: 'error' diagnostics expected but not seen: File /home/cor3ntin/dev/compilers/LLVM/llvm-project/clang/test/CXX/drs/dr3xx.cpp Line 1456: refers to a member in namespace File /home/cor3ntin/dev/compilers/LLVM/llvm-projec

[PATCH] D149276: [Clang] Fix parsing of `(auto(x))`.

2023-05-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 rG1b0ba1c12fcc: [Clang] Fix parsing of `(auto(x))`. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D151094: [clang][wip] Implement P2564 "consteval must propagate up"

2023-05-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/D151094 Files: clang/docs/ReleaseNotes.rst clang/incl

[PATCH] D151094: [clang][wip] Implement P2564 "consteval must propagate up"

2023-05-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 524408. cor3ntin marked 9 inline comments as done. cor3ntin added a comment. Herald added a subscriber: martong. Herald added a reviewer: shafik. - Address Aaron's comments - Track which expressions are immediately escalating to offer better diagnostics Rep

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 524491. cor3ntin added a comment. In FunctionScopeInfo, only track that an immediate-escalating expression has been found rather than which one - as that is recorded on the expression itself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks, It's great to have the complete feature in on PR Comment at: clang/include/clang/Sema/Sema.h:9661 +struct BuildingDeductionGuides {}; +/// Note that we are instantiating an exception specification +/// of a function template. --

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @hubert.reinterpretcast I'll try to look at that but unless I'm mistaken, the wording excludes function parameters > The fourth context is when a temporary object **other than a function > parameter** object is created in the for-range-initializer of a range-based >

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 524656. cor3ntin marked 7 inline comments as done. cor3ntin added a comment. Address some of Mariya's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151094/new/ https://reviews.llvm.org/D151094 Files:

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 524660. cor3ntin added a comment. Remove unecessary evaluation context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151094/new/ https://reviews.llvm.org/D151094 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 2 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/AST/Decl.h:2391 + + bool isImmediateFunction() const; + tbaeder wrote: > Some documentation on the new API would be useful; seems like most calls to > `is

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 524674. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. Improve diagnostic message for immediate calls and add Mariya's examples Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151094/new/ h

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D151094#4364133 , @Fznamznon wrote: > Out of curiosity - does something like these examples - > https://godbolt.org/z/Eqb58Wqoo work as expected? Yes! I added those as tests, thanks! Repository: rG LLVM Github Monorepo

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2b-consteval-propagate.cpp:8 + +namespace examples { + Fznamznon wrote: > These examples exactly match the ones provided by P2564R3, should they be in >

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-05-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 525054. cor3ntin added a comment. Revert unrelated change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151094/new/ https://reviews.llvm.org/D151094 Files: clang/docs/ReleaseNotes.rst clang/include/clang/

[PATCH] D150843: [clang][Diagnostics] Refactor printableTextForNextCharacter

2023-05-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Frontend/TextDiagnostic.cpp:124-128 + if (CharSize == 1 && llvm::isLegalUTF8Sequence(Begin, End) && + llvm::sys::locale::isPrint(*Begin)) { +++(*I); +return std::make_pair(SmallString<16>(Begin, End), true); + }

[PATCH] D151342: [Clang] Correctly handle generic lambda used as default template argument.

2023-05-24 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. Adjust the template pparameter depth when parsing default template arguments as they may introduce generic lambda whose pa

[PATCH] D150843: [clang][Diagnostics] Refactor printableTextForNextCharacter

2023-05-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Give some time for @tahonermann to have an opportunity to review again, but otherwise this looks good to me. Thanks! Comment at: clang/lib/Frontend/TextDiagnostic.cpp:124-128 + if (CharSize == 1 && llvm::isLegalUTF8Sequence(Begin, End) && + llvm

[PATCH] D151553: [clang] Fix consteval operators in template contexts

2023-05-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11940-11943 - ExprResult Callee = getDerived().TransformExpr(E->getCallee()); - if (Callee.isInvalid()) -return ExprError(); - I don't understand why we would not need to transform t

[PATCH] D151342: [Clang] Correctly handle generic lambda used as default template argument.

2023-05-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 526034. cor3ntin added a comment. Address Erich's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151342/new/ https://reviews.llvm.org/D151342 Files: clang/docs/ReleaseNotes.rst clang/lib/Parse/Pa

[PATCH] D151342: [Clang] Correctly handle generic lambda used as default template argument.

2023-05-26 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG75cd8cdbde45: [Clang] Correctly handle generic lambda used as default template argument. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D151607: [AST] Remove unused function removeLocalCVRQualifiers

2023-05-27 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151607/new/ https://reviews.llvm.org/D151607 ___

[PATCH] D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I does think this patch probably makes sense but I agree with Erich that a comment is in order. I'm also wondering whether we can end up in a situation where Tok and NextToken() get replaced by a single annotation in which case this would not work. I don't think so.

[PATCH] D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseTentative.cpp:1553-1554 return TPResult::Error; - if (Tok.isNot(tok::identifier)) + if (NextToken().isNot(tok::identifier)) break; } -

[PATCH] D150122: [Clang] Fix status of P0960

2023-06-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I guess we should land that now @erichkeane ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150122/new/ https://reviews.llvm.org/D150122 ___ cfe-commits mailing list cfe-commits

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-06-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @shafik @Fznamznon @erichkeane gentle ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151094/new/ https://reviews.llvm.org/D151094 ___ cfe-commits mailing list cfe-commits

[PATCH] D151215: [clang][Diagnostics] Split source ranges into line ranges before...

2023-06-01 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. Looks good to me too! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151215/new/ https://reviews.llvm.org/D151215 __

[PATCH] D152002: [clang][wip] Better handling of dependent lambda. This is an attempt to fix GH62916. However, it breaks GH57960 I seem unable to find something that works for both issues.

2023-06-02 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/D152002 Files: clang/lib/Sema/SemaTemplateInstantiate.c

[PATCH] D152009: [clang] Fix assertion while parsing an invalid for loop

2023-06-02 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. with multiple declarations followed by a colon. Fixes #63010 Repository: rG LLVM Github Monorepo https://reviews.llv

[PATCH] D152009: [clang] Fix assertion while parsing an invalid for loop

2023-06-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 527902. cor3ntin added a comment. revert ws changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152009/new/ https://reviews.llvm.org/D152009 Files: clang/docs/ReleaseNotes.rst clang/lib/Parse/ParseExprC

[PATCH] D152009: [clang] Fix assertion while parsing an invalid for loop

2023-06-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:2200 Diag(Tok, diag::err_expected_semi_for); - else -// Skip until semicolon or rparen, don't consume it. shafik wrote: > Can you explain why you removed this? The cur

[PATCH] D150122: [Clang] Fix status of P0960

2023-06-03 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG684f3c968d6b: [Clang] Fix status of P0960 (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150122/new/ https://reviews.llvm.org/D150122

[PATCH] D147717: [C++20][NFC] Claim full support for consteval again

2023-06-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I think we should make sure to land this for clang 17. The rate of consteval bugs is no greater than that of any other feature at this point. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147717/new/ https://reviews.llvm.

[PATCH] D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This makes sense to me, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134334/new/ https://reviews.llvm.org/D134334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

2023-06-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 528205. cor3ntin added a comment. Remove missed and useless llvm:: specifier Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151094/new/ https://reviews.llvm.org/D151094 Files: clang/docs/ReleaseNotes.rst c

[PATCH] D152096: [Clang] Check for abstract parameters only when functions are defined.

2023-06-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. The C++ standard allows abstract parameters in deleted functions and in function declarations > The type of a parameter o

[PATCH] D139837: [Clang] Implements CTAD for aggregates P1816R0 and P2082R1

2023-06-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1059-1062 +case CodeSynthesisContext::BuildingDeductionGuides: + assert( + false && + "failed building deduction guides, add meaningful diagnostics here"); --

[PATCH] D143670: Stop claiming we support [[carries_dependency]]

2023-02-09 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. Thanks for doing this Aaron. Did you look in libc++ if they used it anywhere? (I assume they don't) Comment at: clang/docs/ReleaseNotes.rst:131 +- Clang no longer claims

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 497937. cor3ntin added a comment. Reopen/Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124351/new/ https://reviews.llvm.org/D124351 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/DeclCX

[PATCH] D144100: [clang] Fix a bug that allowed some overflowing octal escape sequences

2023-02-16 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. I wonder if a better fix would be change ResultChar to be a 64 bits integer, although I think it might be over killed (ie, i'm not aware of a good use case for wanting to store values that

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 497994. cor3ntin added a comment. Fix GH60518 by not trying to capture parameters declared in the current context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124351/new/ https://reviews.llvm.org/D124351 F

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-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. This allows `static_assert(false)` to not be ill-formed in template definitions. This change is applied as a DR in all C+

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 498448. cor3ntin added a comment. Forgot to run clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144285/new/ https://reviews.llvm.org/D144285 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/Se

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16805 +// definition, the declaration has no effect. +bool InTemplateDefinition = getLangOpts().CPlusPlus && getTemplateDepth(getCurScope()) != 0; + erichkeane wrote: > Hmm... int

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D144285#4135775 , @Endill wrote: > Thank you for the patch. > Any plans to backport this to 16.x branch? I think that's something we'd need to discuss with more folks but maybe a bit of time to see how this behaves on real c

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 498455. cor3ntin added a comment. - Simplify how we check we are in a dependent context - Fix typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144285/new/ https://reviews.llvm.org/D144285 Files: clang/do

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 2 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16805 +// definition, the declaration has no effect. +bool InTemplateDefinition = getLangOpts().CPlusPlus && getTemplateDepth(getCurScope()) != 0; +

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16806 +bool InTemplateDefinition = +getLangOpts().CPlusPlus && CurContext->isDependentContext(); + erichkeane wrote: > CplusPlus check is now not really beneficial? I'm not su

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 498573. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. - Reword Release note - Restore dependent instantiation tests using Richard's suggestion - Add additional test to check that diagnostics for static_assert are emitted once per insta

[PATCH] D143142: [clang][lex] Enable Lexer to grow its buffer

2023-02-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This is an impressive amount of work. I think it makes sense! Thanks a lot for doing that work. I only have a few nits after a first review of this. Comment at: clang/include/clang/Lex/Lexer.h:89 - // End of the buffer. - const char *BufferEnd; +

[PATCH] D144196: [C2x] Remove the ATOMIC_VAR_INIT macro from stdatomic.h

2023-02-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:80 +- Removed the ``ATOMIC_VAR_INIT`` macro in C2x and later standards modes, which + implements `WG14 N2886 `_ Just confirming

[PATCH] D144334: [Clang] Add C++2b attribute [[assume(expression)]]

2023-02-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Can you add a test to check `__has_cpp_attribute(assume)` ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144334/new/ https://reviews.llvm.org/D144334 ___ cfe-commits mailing li

[PATCH] D144334: [Clang] Add C++2b attribute [[assume(expression)]]

2023-02-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:723-727 +case attr::Assume: { + llvm::Value *ArgValue = EmitScalarExpr(cast(A)->getCond()); + llvm::Function *FnAssume = CGM.getIntrinsic(llvm::Intrinsic::assume); + Builder.CreateCall(FnA

[PATCH] D143840: [clang] Add the check of membership for the issue #58674 and improve the lookup process

2023-02-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for working on this issue. I don't feel confident commenting on this patch's approach (I think @erichkeane is your best bet), but the small typo does make a pretty big difference here! Comment at: clang/include/clang/AST/DeclCXX.h:1549 /// +

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:62 directly rather than instantiating the definition from the standard library. +- Implemented `CWG2518 `_ which allows ``static_assert(false)`` + not to be ill-formed when its

[PATCH] D143891: [Clang] Adjust triviality computation in QualType::isTrivialType to C++20 cases.

2023-02-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This makes sense to me as is. The check `ClassDecl->hasTrivialDefaultConstructor() && !ClassDecl->hasNonTrivialDefaultConstructor()` can only be different from status quo in C++20. Changing `isTrivial` would be a lot more involved change that should not be in scope of

[PATCH] D143891: [Clang] Adjust triviality computation in QualType::isTrivialType to C++20 cases.

2023-02-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D143891#4144161 , @aaron.ballman wrote: > LGTM but we should add a release note for the change. This fixes P0848R3, which is a clang 16 feature. If we backport this we don't need a changelog entry. Repository: rG LLVM Gi

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:19113 +// parameter appertaining to the same declaration as that attribute. +if(auto* Parm = dyn_cast(Var); Parm && Parm->getDeclContext() == DC) + return true; aaron.ballman wr

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/lambda-expressions.cpp:675-676 +StringLiteral(const char (&array)[N]) +__attribute__((enable_if(__builtin_strlen(array) == 2, + "invalid string literal"))); +}; aaron.

[PATCH] D144572: [C++20] Stop claiming full support for consteval (for the moment!)

2023-02-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman is the plan to backport that to clang 16? I think it probably should. We ought to try to improve the situation for clang 17 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144572/new/ https://reviews.llvm.org

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 499754. cor3ntin added a comment. Address Aaron's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124351/new/ https://reviews.llvm.org/D124351 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D144627: [Clang] Fix a crash when taking the address of a consteval lambda

2023-02-23 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. The `_invoke` function of lambdas was not respecting the constexpr/consteval specifier of the call operator, so it was pos

[PATCH] D144627: [Clang] Fix a crash when taking the address of a consteval lambda

2023-02-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 499773. cor3ntin added a comment. Release notes + formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144627/new/ https://reviews.llvm.org/D144627 Files: clang/docs/ReleaseNotes.rst clang/include/cla

[PATCH] D144627: [Clang] Fix a crash when taking the address of a consteval lambda

2023-02-23 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG34abc5b75d9d: [Clang] Fix a crash when taking the address of a consteval lambda (authored by cor3ntin). Changed prior to commit: https://reviews.llvm.org/D144627?vs=499773&id=499831#toc Repository: r

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16824-16841 if (InnerCond && isa(InnerCond)) { // Drill down into concept specialization expressions to see why they // weren't satisfied. Diag(StaticAssertLoc, diag::err_

[PATCH] D144285: [Clang] Implement CWG2518 - static_assert(false)

2023-02-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 499898. cor3ntin added a comment. I played with different diagnostics, we already specialize the literal case, and I didn't find that not saying a static_assert failed improved things. Instead, printing, in addition of that diagnostic, an instantiation stack

[PATCH] D124351: [Clang] Implement Change scope of lambda trailing-return-type

2023-02-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 500117. cor3ntin marked 18 inline comments as done. cor3ntin added a comment. Address Shafik's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124351/new/ https://reviews.llvm.org/D124351 Files: clan

<    9   10   11   12   13   14   15   16   17   >