[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 545374. cor3ntin added a comment. Format + Add FixIt tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156596/new/ https://reviews.llvm.org/D156596 Files: clang/include/clang/Basic/DiagnosticLexKinds.td

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-07-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D140828#4544433 , @Zingam wrote: > Is this going to land soon? There is a libc++ paper I'm interested in that > relies on "deducing this" and I wonder if I should wait for "this" first > before I start working on it? Hard t

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-07-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Basic/Diagnostic.cpp:838-858 + if (UseUCN) +OutStream << "\\u" + << llvm::format_hex_no_prefix(CodepointValue, /*Width=*/4, +/*Upper=*/false); +

[PATCH] D156597: [Clang] Handle static_assert messages with an expression started by a literal

2023-07-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1019 -if (isTokenStringLiteral()) - AssertMessage = ParseUnevaluatedStringLiteralExpression(); -else if (getLangOpts().CPlusPlus26) +bool ParseAsExression = false; +if(getLangOpts(

[PATCH] D156597: [Clang] Handle static_assert messages with an expression started by a literal

2023-07-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 545627. cor3ntin added a comment. Typo + format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156597/new/ https://reviews.llvm.org/D156597 Files: clang/lib/Parse/ParseDeclCXX.cpp clang/test/SemaCXX/static

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-07-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Oups, sorry, the context is this PR https://reviews.llvm.org/D105759#4543246 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156596/new/ https://reviews.llvm.org/D156596 ___ cfe-c

[PATCH] D156546: [Clang][WIP]Experimental implementation of data member packs declarations

2023-07-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:5930-5931 break; +case DeclaratorContext::Member: + // Expand for packed data members. case DeclaratorContext::TemplateParam: cjdb wrote: > dblaikie wrote: > > Perhaps a

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.link/p2.cpp:11-14 +extern u8"C" {} // expected-warning {{encoding prefix 'u8' on an unevaluated string literal has no effect and is incompatible with c++2c}} +extern L"C" {} // expected-warning {{encoding

[PATCH] D156244: [clang] Do not crash on use of a variadic overloaded operator

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/overloaded-operator-decl.cpp:64 +class E {}; +void operator+(E, ...) {} // expected-error{{overloaded 'operator+' cannot be variadic}} +void d() { E() + E(); } aaron.ballman wrote: > Fznamznon wrote:

[PATCH] D156597: [Clang] Handle static_assert messages with an expression started by a literal

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4d494e76d098: [Clang] Handle static_assert messages with an expression started by a literal (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Basic/Diagnostic.cpp:838-858 + if (UseUCN) +OutStream << "\\u" + << llvm::format_hex_no_prefix(CodepointValue, /*Width=*/4, +/*Upper=*/false); +

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I've been thinking about it and I think I have a cleaner design for the printing of characters: We need a `CharToString(unsigned, Qualtype) -> SmallString` method that takes a value and the type. for `char` and `char8_t` we can just return the value. For `wchar_t`, `ch

[PATCH] D156244: [clang] Do not crash on use of a variadic overloaded operator

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/overloaded-operator-decl.cpp:64 +class E {}; +void operator+(E, ...) {} // expected-error{{overloaded 'operator+' cannot be variadic}} +void d() { E() + E(); } aaron.ballman wrote: > cor3ntin wrote:

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:290 + "encoding prefix '%0' on an unevaluated string literal has no effect" + "%select{| and is incompatible with c++2c}1">, + InGroup>; hubert.reinterpretcast wrote: >

[PATCH] D155809: [NFC] [Clang] Fix strict weak ordering in ItaniumVTableBuilder

2023-08-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I think the test we want is a set of classes and virtuaal fuc In D155809#4551686 , @philnik wrote: > @aaron.ballman I think what @danlark means is that when building clang > against a libc++ which has debug assertions enabled,

[PATCH] D155809: [NFC] [Clang] Fix strict weak ordering in ItaniumVTableBuilder

2023-08-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @danlark OH! It make sense now! Thanks for the detailed explanation, having the whole context definitively helps understand the issue. Clang is violating the `sable_sort` preconditions, and that is only observed in some standard library implementations. In that light,

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

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. From yesterday's C++ clang WG meeting - We can land this now - We need to track the debugger issue - We should mention the lack of debugging support in the release notes - We should strive to improve the situation in the 18 time frame but it would not be blocker as few

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This is starting to look pretty good! I'm happy with the general direction, my only concern is that printing a prefix does not seem useful - we are trying to display the value, not how it was produced. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16839

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1901 +inline bool OffsetOf(InterpState &S, CodePtr OpPC, const OffsetOfExpr *E) { + std::vector ArrayIndices; + for (unsigned I = 0; I != E->getNumExpressions(); ++I) Might be useful to u

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1536-1537 + // Cast to Sint64. + if (IndexT != PT_Sint64) { +if (!this->emitCast(IndexT, PT_Sint64, E)) + return false; Shouldn't that be size_t? CHA

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1902 + std::vector ArrayIndices; + for (unsigned I = 0; I != E->getNumExpressions(); ++I) +ArrayIndices.emplace_back(S.Stk.pop()); can you use size_t here? It's already a bug nest but

[PATCH] D156993: [clang] Error on substitution failure within lambda body inside a requires-expression

2023-08-03 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 the PR! Can you add a test in `dr26xx` ? Also, i think the intent is that only the body is in the immediate context. maybe we need a test like cpp requires { decl

[PATCH] D156993: [clang] Error on substitution failure within lambda body inside a requires-expression

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin requested changes to this revision. cor3ntin added a comment. This revision now requires changes to proceed. Oups, I did not meant to accept that, sorry! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156993/new/ https://reviews.llvm.org/D1

[PATCH] D156794: [clang][Interp] Lazily visit unknown global declarations

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:2172-2173 + // Lazily visit global declarations we haven't seen yet. + // This happens in C. + if (const auto *VD = dyn_cast(D); tbaeder wrote: > aaron.ballman wrote: > > Do

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D155610#4557930 , @hazohelet wrote: > One concern from my side is that some unicode characters like `U+FEFF` (I > added in test) are invisible, but it may not be a big concern because we also > display integer representation

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:103-137 +- When describing the failure of static assertion of `==` expression, clang prints the integer + representation of the value as well as its character representation when + the user-provided expres

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:103-137 +- When describing the failure of static assertion of `==` expression, clang prints the integer + representation of the value as well as its character representation when + the user-provided expres

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I added a list of core issues I'm aware of in https://github.com/llvm/llvm-project/issues/59619 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140828/new/ https://reviews.llvm.org/D140828 _

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

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 546910. cor3ntin marked an inline comment as done. cor3ntin added a comment. - Rebase - Address Aaron's comments - Mention the lack of debugging support in the release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Note: we are waiting for feedback from @hubert.reinterpretcast's people before progressing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156596/new/ https://reviews.llvm.org/D156596

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

2023-08-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 546915. cor3ntin added a comment. Fix release notes formatting 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] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2835 if (RHS == 0) { - Info.FFDiag(E, diag::note_expr_divide_by_zero); + Info.FFDiag(E, diag::note_expr_divide_by_zero) << RHSRange; return false; Why not just use `

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

2023-08-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 547206. cor3ntin marked an inline comment as done. cor3ntin added a comment. Fix nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/ https://reviews.llvm.org/D153536 Files: clang/docs/ReleaseNote

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

2023-08-04 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 rGa8bef8865e4a: [Clang] Implement P2169 A nice placeholder with no name (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D156993: [clang] Error on substitution failure within lambda body inside a requires-expression

2023-08-05 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156993/new/ https://reviews.llvm.org/D156993 __

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Interesting case that crashes the compiler, stack overflow cpp struct T{}; struct C { operator T (this int); operator int(); }; void foo(C c) { T d = c; } Not completely sure that this is supposed to be covered by https://eel.is/c++draft

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks a lot for working on this. Can you add tests (to `clang/test/SemaCXX/offsetof.cpp`)? The change will also need an entry in `clang/docs/ReleaseNotes.rst` , in the "C++ Language Changes" section Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D155858: Add a concept AST node.

2023-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/ASTConcept.h:118 /// template arguments. -class ConceptReference { +class ConceptLoc { protected: hokein wrote: > I'm not sure the `ConceptLoc` is a reasonable name for this structure. > 1) In

[PATCH] D157074: [clang][ExprConst] Add RHS source range to div by zero diags

2023-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157074/new/ https://reviews.llvm.org/D157074 ___ cfe-commits mailing list cfe-co

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/Sema/offsetof.c:79 +int x2[__builtin_offsetof(struct X2, X2::a) == 0 ? 1 : -1]; +int x3[__builtin_offsetof(struct X2, X2::X2) == 0 ? 1 : -1]; // expected-error{{no member named 'X2'}} + yichi170 wrote: > Fzn

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/Expr.h:1279 + explicit DeclRefExpr(EmptyShell Empty) : Expr(DeclRefExprClass, Empty) { +DeclRefExprBits.CapturedByCopyInLambdaWithExplicitObjectParameter = false; + } aaron.ballman wrote: >

[PATCH] D157332: [clang] Make init for empty no_unique_address fields a no-op write

2023-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CodeGenCXX/ctor-empty-nounique.cpp:1 +// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -o - %s | FileCheck %s + This should probably get another run line for powerpc64le Repository: rG LLVM Github

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7280 + "a %select{function|lambda}0 with an explicit object parameter cannot " + "%select{be const|be mutable|have reference qualifiers|be volatile}1">; +def err_invalid_explicit_object

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/DeclCXX.cpp:841 const auto *ParamTy = - Method->getParamDecl(0)->getType()->getAs(); + Method->getNonObjectParameter(0)->getType()->getAs(); if (!ParamTy || ParamTy->getPointeeType().isConst

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:4283 + if (HasExplicitObjectParameter) { +const VarDecl *D = cast(CurCodeDecl)->getParamDecl(0); +auto It = LocalDeclMap.find(D); aaron.ba

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11308 + + // There should be a CWG issue for that + if (Name.getNameKind() == DeclarationName::CXXConstructorName || aaron.ballman wrote: > Do

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153914#4570109 , @RIscRIpt wrote: > Rebased onto main, run local lit clang/tests. (bump for @cor3ntin) > As far as I understand this shall be merged into main by maintainers. > Please let me know if something else is expected

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7280 + "a %select{function|lambda}0 with an explicit object parameter cannot " + "%select{be const|be mutable|have reference qualifiers|be volatile}1">; +def err_invalid_explicit_object

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

2023-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: sammccall. cor3ntin added a comment. Looking at the failing test (`clang-tools-extra/clangd/test/crash-preamble.test`), I'd be very surprising if it is related to a front end change like this PR. Any idea @sammccall ? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D155858: Add a concept AST node.

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/ExprConcepts.h:140-143 SourceLocation getBeginLoc() const LLVM_READONLY { -if (auto QualifierLoc = getNestedNameSpecifierLoc()) +if (auto QualifierLoc = CR->getNestedNameSpecifierLoc()) return Q

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 548503. cor3ntin added a comment. Add C tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156596/new/ https://reviews.llvm.org/D156596 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang/lib/Le

[PATCH] D156032: Implement CWG2137 (list-initialization from objects of the same type)

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:1470 + SourceLocation FromLoc; + // C++ [over.ics.list]p6, per DR2137: + // If C is not an initializer-list constructor and the initializer list Can you specify an exact

[PATCH] D156032: Implement CWG2137 (list-initialization from objects of the same type)

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:4329-4330 if (Result) { +// Ambiguity means an initializer list constructor would not be called +// Or a deleted non-initializer-list constructor was to be called +if (CopyElisionPossible && --

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) aaron.ballman wrote: > hiraditya wrote: > > enh wrote: > > > hiraditya wrote: > > > > xbolva00 wr

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Sema/Sema.h:6038 SourceLocation LocStart, LocEnd; bool isBrackets; // true if [expr], false if .ident +bool isQualifier; aaron.ballman wrote: > I think we should combine `isBrackets` a

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @hubert.reinterpretcast It does not, Unicode characters are only escaped in Diagnostics.cpp, and I think this is what we want. Currently, llvm assume UTF-8 terminal, except on Windows where we convert to UTF-16 and use the wide windows APIs (`raw_fd_ostream::write_impl`

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-09 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG20e01167b15a: [Clang] Produce a warning instead of an error in unevaluated strings beforeā€¦ (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D149013: [clang][Interp] Check pointers when accessing base class

2023-08-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/records.cpp:509-512 + constexpr A *a2 = &b + 1; // expected-error {{must be initialized by a constant expression}} \ +// expected-note {{cannot access base class of pointer past the e

[PATCH] D157606: [C2x] Support -std=c23 and -std=gnu23

2023-08-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. `Options.td` defines: `defvar c2x = LangOpts<"C2x">;` Does this need change as well? `UsersManual.rst` also needs an update, but that can be another patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157606/new/ https:/

[PATCH] D157606: [C2x] Support -std=c23 and -std=gnu23

2023-08-10 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. Fair enough! the rest looked sensible to me :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157606/new/ https://reviews.llvm.org/D157606 _

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-09-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. LGTM, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155064/new/ https://reviews.llvm.org/D155064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 556209. cor3ntin added a comment. Add the test case that caused a build failure Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159126/new/ https://reviews.llvm.org/D159126 Files: clang/docs/ReleaseNotes.rst

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-07 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @erichkeane Ok, I added a test! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159126/new/ https://reviews.llvm.org/D159126 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D157526: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

2023-09-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. LGTM, but please wait a few days for @erichkeane CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157526/new/ https://reviews.llvm.org/D157526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-08 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 rG3ed9e9e3ace6: [Clang] Add captures to the instantiation scope of lambda call operators (authored by cor3ntin). Repository: rG LLVM Github Monorepo

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-09-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. LGTM, thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156400/new/ https://reviews.llvm.org/D156400 ___ cfe-commits mailing list c

[PATCH] D156057: [Clang][Sema] Diagnose indeterminately sequenced accesses

2023-09-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman that's been waiting for a while - i don't feel comfortable reviewing it, mind looking at it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156057/new/ https://reviews.llvm.org/D156057 ___ cfe-commits

[PATCH] D64087: [clang] Correct source locations for instantiations of out-of-line defaulted special member functions. (PR25683)

2023-09-11 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 (assuming rebase goes well) @tahonermann ping folks in the future, and apologies for taking... 4 years! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

[PATCH] D135341: adds `__reference_constructs_from_temporary`

2023-09-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:33 #include "clang/Basic/TypeTraits.h" +#include "clang/Basic/TokenKinds.h" #include "clang/Lex/Preprocessor.h" Superfluous change Comment at: clang/lib/Sema/SemaExprC

[PATCH] D135341: adds `__reference_constructs_from_temporary`

2023-09-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5515 + QualType UPtr = S.BuiltinAddPointer(S.BuiltinRemoveReference(U, UnaryTransformType::RemoveCVRef, {}), {}); + return EvaluateBinaryTypeTrait(S, TypeTrait::BTT_IsConvertibleTo, UPtr, TPtr,

[PATCH] D135341: adds `__reference_constructs_from_temporary`

2023-09-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5515 + QualType UPtr = S.BuiltinAddPointer(S.BuiltinRemoveReference(U, UnaryTransformType::RemoveCVRef, {}), {}); + return EvaluateBinaryTypeTrait(S, TypeTrait::BTT_IsConvertibleTo, UPtr, TPtr,

[PATCH] D135341: adds `__reference_constructs_from_temporary`

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

[PATCH] D156794: [clang][Interp] Lazily visit unknown global declarations

2023-09-14 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156794/new/ https://reviews.llvm.org/D156794 ___ cfe-commits mailing list cfe-commi

[PATCH] D134654: [clang] Detect header loops

2023-09-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman @urnathan What is the status of this PR? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134654/new/ https://reviews.llvm.org/D134654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D155475: [Clang][Sema] Add -Wctad-selects-copy to diagnose copy deduction candidate

2023-09-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added subscribers: philnik, ldionne, cor3ntin. cor3ntin added a comment. I have a couple questions but overall I think this is a great warning to add. Sorry it took us a while to get to your PR Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1384 +def CTADSel

[PATCH] D154893: [Clang] Fix some triviality computations

2023-09-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @royjacobson ^ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154893/new/ https://reviews.llvm.org/D154893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

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

2023-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It would be nice to figure out a plan for this PR in the next few weeks, before we get kicked out of Phab! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140996/new/ https://reviews.llvm.org/D140996 ___ cfe-commits m

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2023-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. We should take a decision on this before the move off Phab. Generally the changes look sensible to me so I'm not sure there are blockers left Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ https://reviews.llvm.

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added subscribers: hubert.reinterpretcast, rsmith, cor3ntin. cor3ntin added a comment. @hubert.reinterpretcast @rsmith Opinions on that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159351/new/ https://reviews.llvm.org/D159351 __

[PATCH] D158595: [clang][Interp] Allow zero-init of primitives with an empty init list

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

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/static-assert-cxx26.cpp:304 +static_assert('\u{9}' == (char)1, ""); // expected-error {{failed}} \ + // expected-note {{evaluates to ''\t' (0x09, 9) == '' (0x01, 1)'}} +static_as

[PATCH] D154290: [WIP][Clang] Implement P2741R3 - user-generated static_assert messages Note that a few test fails because this patch depends on https://reviews.llvm.org/D105759 There are some issue

2023-07-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a subscriber: arphaman. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ...data are evaluated in the same evaluation context and that cleanup occurs once th

[PATCH] D154290: [WIP][Clang] Implement P2741R3 - user-generated static_assert messages

2023-07-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 536570. cor3ntin edited the summary of this revision. cor3ntin added a comment. Add feature test macro and complete ODRDiagsEmitter change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154290/new/ https://revi

[PATCH] D154290: [WIP][Clang] Implement P2741R3 - user-generated static_assert messages

2023-07-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 536571. cor3ntin added a comment. Make EvaluateCharPointerAsString parameters const. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154290/new/ https://reviews.llvm.org/D154290 Files: clang/docs/ReleaseNotes

[PATCH] D154290: [WIP][Clang] Implement P2741R3 - user-generated static_assert messages

2023-07-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:16384 + Expr *SizeExpression, + Expr *PtrExpression, ASTContext &Ctx, + EvalResult &Status)

[PATCH] D154368: [Clang] Fix constraint checking of non-generic lambdas.

2023-07-03 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. A lambda call operator can be a templated entity - and therefore have constraints while not being a function template t

[PATCH] D154368: [Clang] Fix constraint checking of non-generic lambdas.

2023-07-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 536976. cor3ntin added a comment. - Move the check for lambda conversion operator in CheckFunmctionConstraints so that it is always performed. - Add tests of constraints referring to parameters of the lambda Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D154475: [clang][Interp] Fix ignoring MaterializeTemporaryExprs

2023-07-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Can you describe the problems? Otherwise, this looks reasonable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154475/new/ https://reviews.llvm.org/D154475 ___ cfe-commits mail

[PATCH] D154474: [clang][Interp] Fix ignoring Integral- and IntegralToBoolean casts

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

[PATCH] D154486: [Clang] Fix a crash when trying to initialize an invalid aggregate.

2023-07-05 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. We did not return an error when failing to producing a valid expression when performing the initialization of an aggregate

[PATCH] D154492: [Clang] Fix handling of using declarations in for loop init statements.

2023-07-05 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 type was never saved, and therefore never transformed in dependent contexts. Repository: rG LLVM Github Monorepo

[PATCH] D154486: [Clang] Fix a crash when trying to initialize an invalid aggregate.

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 537319. cor3ntin added a comment. Address Aaron's Feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154486/new/ https://reviews.llvm.org/D154486 Files: clang/lib/Sema/SemaInit.cpp clang/test/SemaCXX/

[PATCH] D154486: [Clang] Fix a crash when trying to initialize an invalid aggregate.

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1bc7f3fb9367: [Clang] Fix a crash when trying to initialize an invalid aggregate. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHA

[PATCH] D154492: [Clang] Fix handling of using declarations in for loop init statements.

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx23-init-statement.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -verify=expected -std=c++23 -Wall %s + aaron.ballman wrote: > This should suffice, yes? Yep! Repository: rG LLVM Github Monorepo CHANG

[PATCH] D154492: [Clang] Fix handling of using declarations in for loop init statements.

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1077a3439111: [Clang] Fix handling of using declarations in for loop init statements. (authored by cor3ntin). Changed prior to commit: https://rev

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: hubert.reinterpretcast. cor3ntin added a comment. Some tests with lldb (lldb) b main Breakpoint 1: where = placeholder`main + 4 at debug_placeholder.cpp:2:9, address = 0x5134 (lldb) run Process 4044833 launched: '/home/cor3ntin/dev/compilers/LLVM

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { hubert.reinterpretcast wrote: > hubert.reinterpretcast wrote:

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153536#4474733 , @dblaikie wrote: > Maybe try testing with more different values, to demonstrate which entities > the debugger is finding? > > int _ = 1; > int _ = 2; > { > int _ = 3; > int _ = 7; > } > > Or

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153536#4475240 , @dblaikie wrote: > In D153536#4475199 , @cor3ntin > wrote: > >> In D153536#4474733 , @dblaikie >> wrote: >> >>> Maybe try

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153536#4475215 , @philnik wrote: > Would it be possible to make `__` also a placeholder, so standard libraries > can use this before C++26? Or is `_` already a reserved identifier? (I don't > think so) I don't see an issue

<    5   6   7   8   9   10   11   12   13   14   >