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

2022-12-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @erichkeane Let me know if you have any insights on that constraint checking issue. I might add a way to get from the CXXRecordDecl to the LambdaExpr and add the captures to the instantiation scope during constraint checking that way, but I'd love your opinion before g

[PATCH] D139172: [clang] Mark CWG554 as N/A

2022-12-02 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. There are many editorial issues that ended up as defect reports, you could probably batch many of them in subsequent PR Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D139095: [clang] Mark CWG405 as a duplicate of CWG218

2022-12-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D139095#3964181 , @Endill wrote: > So I'd like to raise a couple of questions: > > 1. What test for 405 is going to be if not a copy-and-paste of a part of 218 > test? I think this is perfectly fine to have a duplicated test

[PATCH] D139212: [Clang] make_cxx_dr_status download the issue list automatically

2022-12-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. if none is provided Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D139212 Files: clang/www/cxx_dr_s

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added subscribers: hubert.reinterpretcast, cor3ntin. cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM. Triple checking with @hubert.reinterpretcast for conformance but I'm pretty sure that's correct. Repository: rG LLVM

[PATCH] D146140: [clang] Properly parse variable template requires clause in lambda

2023-03-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Do we need a release note for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146140/new/ https://reviews.llvm.org/D146140 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D146187: [docs] Update the status for coroutines

2023-03-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D146187#4201905 , @aaron.ballman wrote: > In D146187#4201223 , @ChuanqiXu > wrote: > >>> but we don't define __cpp_­impl_­coroutine: >>> http://eel.is/c++draft/tab:cpp.predefined.ft

[PATCH] D146420: Document the Clang policies on claiming support for a feature

2023-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/InternalsManual.rst:3285 + * Are there known issues with the feature that reject valid code? + * Are there known issues that fail to reject invalid code? + * Are there known crashes, failed assertions, or miscompilations?

[PATCH] D146420: Document the Clang policies on claiming support for a feature

2023-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/InternalsManual.rst:3285 + * Are there known issues with the feature that reject valid code? + * Are there known issues that fail to reject invalid code? + * Are there known crashes, failed assertions, or miscompilations?

[PATCH] D146420: Document the Clang policies on claiming support for a feature

2023-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/InternalsManual.rst:3285 + * Are there known issues with the feature that reject valid code? + * Are there known issues that fail to reject invalid code? + * Are there known crashes, failed assertions, or miscompilations?

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

2023-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D124351#4207501 , @eandrews wrote: > This patch causes an assertion when the attribute argument is an integer > constant expression - https://godbolt.org/z/osKx5ejMb and has resulted in > test fails downstream since any attr

[PATCH] D146535: [Clang] Fix evaluation of parameters of lambda call operator attributes

2023-03-21 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. Fix a regresion introduced by D124351 . Attributes of lambda call operator were evaluate

[PATCH] D146535: [Clang] Fix evaluation of parameters of lambda call operator attributes

2023-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Whether the assertion itself in `getCurLambda` is still pertinent, despite no test depending on it does require more analysis. This comment in SemaExprCXX.cpp dissuaded to try to do more surgery as part of this fix, and in some way, that assertion firing helped us disc

[PATCH] D146535: [Clang] Fix evaluation of parameters of lambda call operator attributes

2023-03-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D146535#4210198 , @eandrews wrote: >> Attributes of lambda call operator were evaluated in the context of the >> closure object type rather than its operator, > > Just for my understanding, what did this affect with regards t

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

2023-03-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. When using the name of a template variable or concept in places where an expression was expected, Clang would drop the cxx

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

2023-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Compiler explorer link demonstrating the issue this fixes https://godbolt.org/z/Tj3v5jbnq Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146719/new/ https://reviews.llvm.org/D146719 ___

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

2023-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/Parser/cxx-template-template-recovery.cpp:27 + +static_assert(test); //expected-error {{too few template arguments for concept 'C1'}} +static_assert(test); //expected-error {{too few template arguments for concept 'C2'}} --

[PATCH] D146234: [clang] Fix crash when handling nested immediate invocations

2023-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Sorry for the late review. I think this makes sense generally, i just have one question Comment at: clang/lib/Sema/SemaExpr.cpp:17979 + if (Rec.ImmediateInvocationCandidates.size() > 1 || + SemaRef.FailedImmediateInvocations.size()) { -

[PATCH] D146535: [Clang] Fix evaluation of parameters of lambda call operator attributes

2023-03-23 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 rG82c83d7e4105: [Clang] Fix evaluation of parameters of lambda call operator attributes (authored by cor3ntin). Repository: rG LLVM Github Monorepo

[PATCH] D146535: [Clang] Fix evaluation of parameters of lambda call operator attributes

2023-03-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Sure! I didn't land it sooner because the bots were down. but apparently they were up quite fast. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146535/new/ https://reviews.llvm.org/D146535 ___

[PATCH] D146764: [clang] Make predefined expressions string literals under -fms-extensions

2023-03-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:3586-3591 + // MSVC treats all predefined expressions as string literals rather than char + // arrays. + if (LangOpts.MicrosoftExt) +return SL; + return PredefinedExpr::Create(Context, Loc, ResTy, I

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

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

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

2023-03-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/Parser.cpp:1886-1889 + case Sema::NC_Concept: case Sema::NC_VarTemplate: case Sema::NC_FunctionTemplate: case Sema::NC_UndeclaredTemplate: { aaron.ballman wrote: > Would this change make sense,

[PATCH] D146420: Document the Clang policies on claiming support for a feature

2023-03-25 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 have some minor reservations about defining feature macros on a per-target basis but at the same time, given the current coroutines on 32 bits windows situation - which has been li

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

2023-03-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146719/new/ https://reviews.llvm.org/D146719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

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

2023-03-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Comment at: clang/lib/Parse/Parser.cpp:1886-1889 + case Sema::NC_Concept: case Sema::NC_VarTemplate: case Sema::NC_FunctionTemplate: case Sema::NC_UndeclaredTemplate: { aaron.ballman wrote: > cor3ntin wrote: > > aaron.ballma

[PATCH] D146924: [clang] Add support for dollar sign in ud_suffix of numeric constants

2023-03-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. The commit message is certainly not correct, `$` is not allowed in identifiers by either the C or C++ standard and its support in compiler is hurting future evolution. that being said, given that we already do do use it in identifiers, why not in UCNs. I would like to

[PATCH] D146924: [clang] Add support for dollar sign in ud_suffix of numeric constants

2023-03-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I think it's worth pursuing and investigating as long as - We requires some prefix before the dollar ( like `_`), and `42$ is never valid - `-Wdollar-in-identifier-extension` is emitted - We have a better understanding of the current behavior for the euro sign - logical

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. LGTM except the arguably missing tests. Comment at: clang/lib/Sema/SemaDecl.cpp:11886-11887 + // - an enumerator for an enumeration that is a templated entity, or + // - the closure type of a lambda-expression ([expr.prim.lambda.closure]) +

[PATCH] D147070: Improve requirement clause limitation on non templated function

2023-03-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D147070#4228303 , @erichkeane wrote: > Took Corentin's advice and tried to test the lambda condition. THIS made me > discover that we didn't properly implement this for lambdas at all! So this > patch NOW also implements

[PATCH] D125402: [clang][diag] warn if function returns class type by-const-value

2023-02-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This has been sitting in the queue for a while, sorry about that. I think this makes sense in its current iteration, with the warning always on. Have you tried to build a large project like chrome with it? Comment at: clang/lib/Sema/SemaChecking.cpp:1

[PATCH] D144626: [C++20] [Modules] Trying to compare the trailing require clause of the primary template when performing ODR checking

2023-02-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D144626#4154122 , @ChuanqiXu wrote: > In D144626#4150378 , @erichkeane > wrote: > >> That looks reasonable to me, though I fear all the libcxx failures are going >> to be related to

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

2023-02-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 500866. cor3ntin marked an inline comment as done. cor3ntin added a comment. Address Aaron's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144285/new/ https://reviews.llvm.org/D144285 Files: clang/

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

2023-02-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CXX/drs/dr25xx.cpp:5-14 +#error one +// expected-error@-1 {{one}} +#if 0 +#error skip +#warning skip // expected-error {{skip}} +#endif +#error two aaron.ballman wrote: > What do these tests have to do with t

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

2023-02-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 500928. cor3ntin added a comment. Remove the #error / #warning tests 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

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

2023-02-28 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 rG00e2098bf49f: [Clang] Implement CWG2518 - static_assert(false) (authored by cor3ntin). Changed prior to commit: https://reviews.llvm.org/D144285?v

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

2023-02-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @shafik Can you let me know if you are happy with the changes i made to address your feedback? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124351/new/ https://reviews.llvm.org/D124351 __

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

2023-03-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @rupprecht This expands to template class MyMock { static_assert( static_assert( ::testing::tuple_size >::ArgumentTuple>::value == 2, "This method does not take " "2" " arguments. Parenthesize all types with unprotected commas."); }; (some stuff omitted)

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

2023-03-02 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG93d7002dc464: [Clang] Implement Change scope of lambda trailing-return-type (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124351/new/

[PATCH] D145251: [clang] Treat function parameter scope as an immediate function context

2023-03-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I think this make sense. Maybe we should add a comment quoting [expr.const] p15.1 in both places though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145251/new/ https://reviews.llvm.org/D145251 _

[PATCH] D145251: [clang] Treat function parameter scope as an immediate function context

2023-03-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. Thanks, LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145251/new/ https://reviews.llvm.org/D145251 ___ cfe-commits mailing list cfe-commits

[PATCH] D129951: adds `__disable_adl` attribute

2023-03-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5756 + if (FunctionDecl *F = D->getAsFunction(); + F->isOverloadedOperator() || F->isCXXClassMember()) { +S.Diag(AL.getLoc(), diag::err_disable_adl_no_operators) aaron.ballman w

[PATCH] D129951: adds `__disable_adl` attribute

2023-03-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5756 + if (FunctionDecl *F = D->getAsFunction(); + F->isOverloadedOperator() || F->isCXXClassMember()) { +S.Diag(AL.getLoc(), diag::err_disable_adl_no_operators) aaron.ballman w

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

2023-03-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D144285#4176850 , @rupprecht wrote: > In D144285#4163004 , @cor3ntin > wrote: > >> If however we find this change to disruptive, we should inform WG21. > > Thanks for the explanation,

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

2023-03-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D124351#4175717 , @sammccall wrote: > We're seeing new clang crashes that bisect to this commit, with modules only. > > I have it mostly-reduced and will post shortly, trying to see if I can > simplify any further (since modu

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

2023-03-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: ChuanqiXu. cor3ntin added a comment. In D124351#4178334 , @sammccall wrote: > Sorry for the delay, extracting the repro from the build system seems about > as much work as minimizing it :-) > F26749550: modrepo2.zip

[PATCH] D129951: adds `__disable_adl` attribute

2023-03-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: lewissbaker. cor3ntin added a comment. In D129951#4179596 , @cjdb wrote: > In D129951#4179481 , @ldionne wrote: > >> In D129951#4179467 , @cjd

[PATCH] D144878: __builtin_FILE_NAME()

2023-03-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. > In terms of the encoding question I was asking, that's information we'll have > to figure out (CC @tahonermann and @cor3ntin for text encoding question). My > guess (which needs verification) is that we convert the file name from the > system encoding to UTF-8 intern

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

2023-03-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:295-298 + if (getCurLambda()) { +Diag(SuperLoc, diag::err_super_in_lambda_unsupported); +return true; + } rsmith wrote: > Will this also reject `__super` in a local class in

[PATCH] D153418: Adding iconv support to CharSetConverter class

2023-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153418#4438766 , @efriedma wrote: > This doesn't really address the concerns from > https://discourse.llvm.org/t/rfc-adding-a-charset-converter-to-the-llvm-support-library/69795/17 > about consistency. It's bad if differen

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

2023-06-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. This is a C++ feature that allows the use of `_` to declare multiple variable of that name in the same scope; these variab

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 533743. cor3ntin added a comment. Herald added a subscriber: jdoerfert. As approved by CWG Updates to cxx_status / doc will come later :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://revie

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

2023-06-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/Lexer/unicode.c:30 -int _; +int a; tbaeder wrote: > Are these changes only for the case where we compile as c++? I know lots of C > (and c++?) projects use `_` as GNU gettext identifier to mark a

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

2023-06-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. This covers - P2558R2 (C++, wg21.link/P2558 ) - N2701 (C, https://www.open-std.org/jtc1/s

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

2023-06-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534185. cor3ntin added a comment. - Address Shafik's an Erich's comments - Add missing serialization code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/ https://reviews.llvm.org/D153536 Files: cl

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

2023-06-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 3 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/AST/Decl.cpp:1831 + // Objective-C as an extension. + if (isa(this) && getLangOpts().ObjC) return true; shafik wrote: > It is not obvious to me if this is a dr

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534201. cor3ntin added a comment. Address Shafik's comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: clang-tools-extra/test/clang-tidy/checkers/modern

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

2023-06-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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D153702 Files: clang/docs/ReleaseNotes.rst clang/incl

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

2023-06-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:15 #include "clang/AST/DeclObjC.h" +#include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" ychen wrote: > shafik wrote: > > I saw your adding headers. How did you figure out which ones

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

2023-06-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534329. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/ https://reviews.llvm.org/D153536 Files: clang/docs/ReleaseNotes.

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

2023-06-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534328. cor3ntin added a comment. Rebase and update feature macro tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153702/new/ https://reviews.llvm.org/D153702 Files: clang/docs/ReleaseNotes.rst clang

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

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534455. cor3ntin added a comment. Address ChuanqiXu's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/ https://reviews.llvm.org/D153536 Files: clang/docs/ReleaseNotes.rst clang/include/c

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

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534524. cor3ntin added a comment. Add tests for C++23 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153702/new/ https://reviews.llvm.org/D153702 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basi

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

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:8920 + if (HasValidResult) +CCEDiag(E, diag::note_constexpr_invalid_void_star_cast) +<< SubExpr->getType() << Info.getLangOpts().CPlusPlus26 erichkeane

[PATCH] D153493: [dataflow] avoid more accidental copies of Environment

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This seem to produce build failures /home/cor3ntin/dev/compilers/LLVM/llvm-project/clang/unittests/Analysis/FlowSensitive/RecordOpsTest.cpp:50:27: error: calling a private constructor of class 'clang::dataflow::Environment' Environment Env = getEnvironmentA

[PATCH] D153493: [dataflow] avoid more accidental copies of Environment

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153493#4448851 , @sammccall wrote: > Sorry, this was a mid-air collision with f2123af1e7d75 > , fixed > in 1adc5a781faa >

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

2023-06-26 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 rGf27afedc6c86: [Clang] Implement P2738R1 - constexpr cast from void* (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:200-207 +def warn_c2x_compat_literal_ucn_escape_basic_scs : Warning< + "specifying character '%0' with a universal character name is " + "incompatible with C standards before C2x">, + I

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

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

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534589. cor3ntin added a comment. Add regex in test file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153621/new/ https://reviews.llvm.org/D153621 Files: clang/docs/ReleaseNotes.rst clang/include/clang/B

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

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534592. cor3ntin added a comment. - Fix missed Decl abbreviation change - Fix feature macro test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/ https://reviews.llvm.org/D153536 Files: clang/docs/

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/Preprocessor/ucn-allowed-chars.c:86 +#define AAA\u0024 // expected-error{{character '$' cannot be specified by a universal character name}} \ + // expected-warning{{whitespace}} +#define AAB\u0040 // expecte

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534595. cor3ntin marked an inline comment as done. cor3ntin added a comment. Update comment to match C2x Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153621/new/ https://reviews.llvm.org/D153621 Files: cla

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534602. cor3ntin added a comment. Fix diagnostic test in ucn-pp-identifiers.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153621/new/ https://reviews.llvm.org/D153621 Files: clang/docs/ReleaseNotes.rst

[PATCH] D153737: [clang] __is_trivially_equality_comparable should return false for arrays

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. s/menas/means/ in the commit message. Otherwise LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153737/new/ https://reviews.llvm.org/D153737 ___ cfe-commits mailing list cfe

[PATCH] D153621: [Clang] Correctly handle $, @, and ` when represented as UCN

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/Lexer/utf8-char-literal.cpp:22 char b = u8'\x80'; // ok -char c = u8'\u0080'; // expected-error {{universal character name refers to a control character}} +char c = u8'\u'; // ok char d = u8'\u1234'; // expected-erro

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

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @ychen You probably want to update the description, i think it's updated (you implemented ctad for parenthesized ctrs) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139837/new/ https://reviews.llvm.org/D139837 __

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534613. cor3ntin added a comment. Rename /EscapeValidInUnevaluatedStringLiteral/IsEscapeValidInUnevaluatedStringLiteral Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D1057

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 43 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/AST/Expr.cpp:1165 +unsigned CharByteWidth = mapCharByteWidth(Ctx.getTargetInfo(), Kind); +unsigned ByteLength = Str.size(); +assert((ByteLength % CharByteWidth == 0) && -

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 2 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/AST/Expr.cpp:1140 + case Unevaluated: +return sizeof(char); // Host; +break; aaron.ballman wrote: > shafik wrote: > > Why not grouped w/ `Ordinary` above? >

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 6 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1411 let Documentation = [DeprecatedDocs]; + let ParseArgumentsAsUnevaluated = 1; } aaron.ballman wrote: > What is the plan for non-stand

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

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D139837#4449536 , @ychen wrote: > In D139837#4449327 , @cor3ntin > wrote: > >> @ychen You probably want to update the description, i think it's updated >> (you implemented ctad for p

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534640. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. Address some of Aaron's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files:

[PATCH] D153241: [clang][Diagnostics] Provide source range to invalid casts in const expr

2023-06-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 (modulo failed build / rebase) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153241/new/ https://reviews.llvm.org/D153241

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

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/DeclBase.h:1687 +/// Only used by CXXDeductionGuideDecl. Indicates the kind +/// of the Deduction Guide that is the implicitly generated +/// (used during overload resolution). ===

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:3501-3503 +} else if (!AllowEvaluatedString && tok::isStringLiteral(Tok.getKind())) { + Expr = ParseUnevaluatedStringLiteralExpression(); +} else { aaron.ballman wrote: > cor3n

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:878-879 - if (!isIntOrBool(AL.getArgAsExpr(0))) { + Expr *First = AL.getArgAsExpr(0); + if (isa(First) || !isIntOrBool(First)) { S.Diag(AL.getLoc(), diag::err_attribute_argument_n_type)

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 534999. cor3ntin added a comment. Add tests for pascal strings (which are not a thing in C++ apparently) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: cla

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 535073. cor3ntin added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Parse attribute as unevaluated string if they are declare StringLiteralArgument in the Attr.td file. WIP @aaron.ballman Do we agree on direction before

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

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 14 inline comments as done. cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:135-136 - Compiler flags ``-std=c++2c`` and ``-std=gnu++2c`` have been added for experimental C++2c implementation work. +- Implemented `P2169R4: A nice placehold

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

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 535089. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. Address some of Aarons comments before getting rid of the bit in Decl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/ http

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3048 }]; + let ParseArgumentsAsUnevaluated = 1; } aaron.ballman wrote: > I don't think we should reuse this flag this way. This flag is for the > traditional sense of "unevaluated

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

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 535116. cor3ntin added a comment. - Address more feedback - reword diag - remove diag for unused init capture - Remove the IsPlaceholder bit, as placeholder variables can be determined without data Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2023-06-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 14 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/AST/DeclBase.h:340-342 + /// Whether this declaration denotes a placeholder that can be + /// redefined in the same scope. + unsigned IsPlaceholder : 1;

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

2023-06-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. Please give @aaron.ballman a few days to get another look, but otherwise LGTM Thanks a lot for working on this and your patience during the review. Repository: rG LLVM Github Monorepo C

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 535355. cor3ntin added a comment. Fix tests and handle variadic attributes. - With that all normal attributes are handled. Only attributes with custop parsing code and those specified as an enum are left untouched. Repository: rG LLVM Github Monorepo C

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Note that I have confirmed that all the change attributes require a StringLiteral and go through `checkStringLiteralArgumentAttr` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 535356. cor3ntin added a comment. revert accidental changes to cmake Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: clang-tools-extra/test/clang-tidy/check

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 535373. cor3ntin added a comment. Address Erich's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: clang-tools-extra/test/clang-tidy/checkers/modern

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-06-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:878 - if (!isIntOrBool(AL.getArgAsExpr(0))) { + Expr *First = AL.getArgAsExpr(0); + if (!isIntOrBool(First)) { erichkeane wrote: > Unrelated change here? What is this for? Some test

<    8   9   10   11   12   13   14   15   16   17   >