[PATCH] D119646: [clang] Allow consteval functions in default arguments

2022-02-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. There is also https://reviews.llvm.org/D74130 which tries to address the same issue in a very different way. I don't really understand the different approaches yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119646/new/

[PATCH] D119664: Check for the overloadable attribute in all the appropriate syntactic locations

2022-02-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 (I didn't know `can_overload_4` was a valid place to put a C attribute) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119664/new/ https

[PATCH] D119670: [clang] Warn on unqualified calls to std::move and std::forward

2022-02-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This adds a diagnostic when an unqualified call is resolved to std::move or std::forward. This follows some C++ committee discussions where some peopl

[PATCH] D119670: [clang] Warn on unqualified calls to std::move and std::forward

2022-02-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. There may be some things worth considering here: - libc++ own tests and build is affected, I have not addressed these yet. - other standard libs are affected but because they are considered system headers, no warning is emitted I think this is a worth while first appro

[PATCH] D119670: [clang] Warn on unqualified calls to std::move and std::forward

2022-02-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:6437 + NamedDecl *D = dyn_cast_or_null(Call->getCalleeDecl()); + if (!D || !D->isInStdNamespace()) +return; erichkeane wrote: > Quuxplusone wrote: > > erichkeane wrote: > > > Do we real

[PATCH] D119670: [clang] Warn on unqualified calls to std::move and std::forward

2022-02-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:6437 + NamedDecl *D = dyn_cast_or_null(Call->getCalleeDecl()); + if (!D || !D->isInStdNamespace()) +return; Quuxplusone wrote: > cor3ntin wrote: > > erichkeane wrote: > > > Quuxplusone

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

2022-02-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. > I like the idea of the assert, can we do it as a part of this? That way when > we run into it it becomes more obvious/linked to this discussion. I think that's a good idea too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2022-02-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D110641#3064200 , @erichkeane wrote: > Ping! Does anyone have any feedback on this? I'd really like to start > getting us caught up on standards implementation, and this seems like it > might be an easy win (unless someon

[PATCH] D124258: [C89/C2x] Change the behavior of implicit int diagnostics

2022-04-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:534 + /// Returns true if implicit int is supported at all. + bool implicitIntEnabled() const { return !CPlusPlus && !C2x; } + erichkeane wrote: > This name seems inverse of wha

[PATCH] D124258: [C89/C2x] Change the behavior of implicit int diagnostics

2022-04-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:534 + /// Returns true if implicit int is supported at all. + bool implicitIntEnabled() const { return !CPlusPlus && !C2x; } + aaron.ballman wrote: > erichkeane wrote: > > cor3n

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

2022-04-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 reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This implements P2036R3 with the changes proposed by D2579R0 applied. That is

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

2022-04-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Hey folks. I do not intend this to be merge but if there is anyway this can be battle tested against internal codebases, i think it could be helpful to help guide how WG21 proceed with this feature. Here is a paper listing the failures encountered when we merged the pre

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

2022-05-02 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. note to self. @aaron.ballman noticed this patch doesn't handle leading attributes correctly constexpr int asp = 5; [=] [[gnu::regparm(asp)]] () {}; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124351/new/ https://rev

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-07-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 443699. cor3ntin added a comment. Fix crash on PowerPC (I forgot to removed a non-sense line that could cause the CurPtr to move incorrectly past a / in the ALTIVEC code path). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-07-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 rGcc309721d20c: [Clang] Add a warning on invalid UTF-8 in comments. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-07-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:5444 +if (TST1->getNumArgs()) { + const TemplateArgument &TA1 = TST1->template_arguments().back(); + if (TA1.getKind() == TemplateArgument::Pack) { aaron.ballman wr

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-07-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D128059#3646695 , @JDevlieghere wrote: > I had to revert this because it breaks a bunch of LLDB tests: > https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/45288/#showFailuresLink. > It looks like this causes an erro

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-07-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 444118. cor3ntin added a comment. This turned out to be an interesting bug. The SSE code tried to be clever and skip over valid ascii code units when finding invalid UTF-8. In doing so, it could run over the end of a comment entirely if - there was a short

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd4892a168f51: [Clang] Add a warning on invalid UTF-8 in comments. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 444283. cor3ntin added a comment. - Rename `diagnoseUncapturableValueReferenceOr` => `diagnoseUncapturableValueReferenceOrBinding` - Remove superfluous assert - Check for unsupported binding decl in `isVariableCapturable` instead of `BuildDeclarationNameExp

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

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @shafik Thanks for the review. I was able to reorganize the things you pointed out to be more consistent such that the checks for structured bindings and regular vars are made in the same place. I think it's much better that way. It took me a while to find the correct w

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

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: erichkeane. cor3ntin added inline comments. Comment at: clang/test/CodeGenCXX/cxx20-decomposition.cpp:1 +// RUN: %clang_cc1 -std=c++20 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s + @erichkeane This is my first time wri

[PATCH] D129664: [Clang] Adjust extension warnings for delimited sequences

2022-07-13 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. WG21 approved delimited escape sequences and named escape sequences. Adjust the extension warnings accordingly, and update

[PATCH] D129664: [Clang] Adjust extension warnings for delimited sequences

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 444322. cor3ntin added a comment. Forgot to format! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129664/new/ https://reviews.llvm.org/D129664 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/

[PATCH] D129664: [Clang] Adjust extension warnings for delimited sequences

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman I think we might as well do that now, and revert if WG21 does some funny business in plenary. WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129664/new/ https://reviews.llvm.org/D129664 __

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

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 444330. cor3ntin added a comment. Simplify codegen test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.llvm.org/D122768 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertUt

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

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D122768#3648545 , @erichkeane wrote: > Just about all of the '%' variables in LLVM are unstable names, so you need > to use wildcards. Additionally, it seems like you're checking EVERY line of > the llvm function, which is

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

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CodeGenCXX/cxx20-decomposition.cpp:26 +// CHECK: %{{.*}} = load ptr, {{.*}} +// CHECK: %{{.*}} = load i32, {{.*}} +// CHECK: %{{.*}} = getelementptr {{.*}}, i32 0, i32 0 erichkeane wrote: > Which is the impor

[PATCH] D129664: [Clang] Adjust extension warnings for delimited sequences

2022-07-13 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6882ca9aff07: [Clang] Adjust extension warnings for delimited sequences (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129664/new/ ht

[PATCH] D129689: [limits.h] USHRT_MAX fix for 16 bit architectures

2022-07-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D129689#3652010 , @aaron.ballman wrote: > In D129689#3651965 , > @SebastianPerta wrote: > But can you add some test coverage for this? >> In clang\test\Headers\limits.cpp there

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

2022-07-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 4 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:2933 + auto *FD = LambdaCaptureFields.lookup(BD); + assert(FD); + return EmitCapturedFieldLValue(*this, FD, CXXABIThisValue); shafik

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17863-17869 +/// Assuming the suggested solution to CWG2595 gets accepted: +/// [class.mem.special]p6: +/// An eligible special member function is a special member function for which: +/// - the function is n

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-15 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for working on that! The patch looks very good overall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 ___ cfe-commits mailing

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17870 +/// parameter type and the same cv-qualifiers and ref-qualifier, if any. +bool AreSpecialMemberFunctionsSameKind(CXXMethodDecl *M1, CXXMethodDecl *M2, + Sema::CXXSpecialMember CSM

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman @erichkeane I think this should be on your radar, it would be great to have it in 15. I did review it and I think it looks good but there are enough dragons here that i'd rather have more eye balls on it. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17899 + ConstraintSatisfaction Satisfaction; + if (S.CheckFunctionConstraints(Method, Satisfaction)) +SatisfactionStatus.push_back(false); royjacobson wrote: > erichkeane wr

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17899 + ConstraintSatisfaction Satisfaction; + if (S.CheckFunctionConstraints(Method, Satisfaction)) +SatisfactionStatus.push_back(false); erichkeane wrote: > cor3ntin wrote

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17899 + ConstraintSatisfaction Satisfaction; + if (S.CheckFunctionConstraints(Method, Satisfaction)) +SatisfactionStatus.push_back(false); erichkeane wrote: > royjacobson wr

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-07-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/constrained-special-member-functions.cpp:103 +// FIXME: DR1734. +static_assert(__is_trivially_copyable(CopyAssignmentChecker<1>)); +static_assert(!__is_trivially_copyable(CopyAssignmentChecker<2>)); H

[PATCH] D130415: [Clang] Adjust extension warnings for #warning

2022-07-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 #warning directive is standard in C++2b and C2x, this adjusts the pedantic and extensions warning accordingly. Repos

[PATCH] D130415: [Clang] Adjust extension warnings for #warning

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

[PATCH] D130415: [Clang] Adjust extension warnings for #warning

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 447049. cor3ntin added a comment. Update release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130415/new/ https://reviews.llvm.org/D130415 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Ba

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

2022-07-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 implements N2836 Identifier Syntax using Unicode Standard Annex 31. The feature was already implemented for C++, and

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

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 447051. cor3ntin added a comment. Update a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130416/new/ https://reviews.llvm.org/D130416 Files: clang/docs/ReleaseNotes.rst clang/lib/Lex/Lexer.cpp c

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

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 447056. cor3ntin added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130416/new/ https://reviews.llvm.org/D130416 Files: clang/docs/ReleaseNotes.rst clang/lib/Lex/Lexer.cpp clang/tes

[PATCH] D130415: [Clang] Adjust extension warnings for #warning

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:393-398 +def warn_cxx2b_compat_warning_directive : Warning< + "#warning is incompatible with C++ standards before C++2b">, + InGroup, DefaultIgnore; +def warn_c2x_compat_warning_directiv

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

2022-07-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 rGaee76cb59ca2: [Clang] Add support for Unicode identifiers (UAX31) in C2x mode. (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D130415: [Clang] Adjust extension warnings for #warning

2022-07-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 rG559f07b87211: [Clang] Adjust extension warnings for #warning (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D130421: [Clang] De-deprecate volatile compound operations

2022-07-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. As per P2327R1, | =, &= and ^= are no longer deprecated in all languages mode. | Repository: rG LLVM Github Monorepo

[PATCH] D130421: [Clang] De-deprecate volatile compound operations

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman I think getting that in 15 would avoid some churn, WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130421/new/ https://reviews.llvm.org/D130421 ___ cfe-commit

[PATCH] D130421: [Clang] De-deprecate volatile compound operations

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 447109. cor3ntin added a comment. Fix paper number in release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130421/new/ https://reviews.llvm.org/D130421 Files: clang/docs/ReleaseNotes.rst clang/inc

[PATCH] D130421: [Clang] De-deprecate volatile compound operations

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @shafik Thanks for the review! Comment at: clang/docs/ReleaseNotes.rst:523 This feature is available as an extension in all C and C++ language modes. +- Implemented `P2327 De-deprecating volatile compound operations `_

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

2022-07-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 3 inline comments as done. cor3ntin added a comment. @shafik I just realized i forgot to submit a bunch of replies i had to your comments, sorry about that Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122768/new/ https://reviews.l

[PATCH] D130437: [clang] Fix incorrect constant folding of `if consteval`

2022-07-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. Fixes https://github.com/llvm/llvm-project/issues/55638. `if consteval` was evaluated incorrectly when in a non-constant

[PATCH] D130437: [clang] Fix incorrect constant folding of `if consteval`

2022-07-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 447118. cor3ntin added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130437/new/ https://reviews.llvm.org/D130437 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/ExprConstant.cpp cl

[PATCH] D130421: [Clang] De-deprecate volatile compound operations

2022-07-24 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 rG0ba128f7c8c2: [Clang] De-deprecate volatile compound operations (authored by cor3ntin). Changed prior to commit: https://reviews.llvm.org/D130421?

[PATCH] D130437: [clang] Fix incorrect constant folding of `if consteval`

2022-07-24 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 rGc68baa73eb43: [clang] Fix incorrect constant folding of `if consteval` (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D130421: [Clang] De-deprecate volatile compound operations

2022-07-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman Thanks a lot for the review. I made a separate nfc commit to address the missing revision numbers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130421/new/ https://reviews.llvm.org/D130421 ___

[PATCH] D126194: [Concepts] Implement overload resolution for destructors (P0848)

2022-05-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D126194#3531267 , @erichkeane wrote: > How much of P0848 is missing after this? If nothing/not much, should we > update cxx_status.html as well? P0848 applies to all special member function. At best we could mark it partia

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-10-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. > Any concerns with this approach? Sounds reasonable to me Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156565/new/ https://reviews.llvm.org/D156565 ___ cfe-commits mailing li

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-05-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Partially implement P0315R4. This patch allow lambda in unevaluated context. It does not implement temp.deduct/9. This is a rewrite of https://review

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-05-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 348693. cor3ntin added a comment. Code formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103380/new/ https://reviews.llvm.org/D103380 Files: clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaExpr.c

[PATCH] D66481: [C++20] Support for lambdas in unevaluated context

2021-05-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Given the lack of activity, I made another PR for the same feature https://reviews.llvm.org/D103380 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66481/new/ https://reviews.llvm.org/D66481 __

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-05-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 348759. cor3ntin added a comment. Add more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103380/new/ https://reviews.llvm.org/D103380 Files: clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaExpr.cp

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-05-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 348828. cor3ntin added a comment. Cleanup tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103380/new/ https://reviews.llvm.org/D103380 Files: clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaExpr.cpp

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-06-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 349000. cor3ntin added a comment. Typos, add more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103380/new/ https://reviews.llvm.org/D103380 Files: clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/Sema

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-06-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 349002. cor3ntin added a comment. Move tests to SemaCXX Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103380/new/ https://reviews.llvm.org/D103380 Files: clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/Sema

[PATCH] D109854: Support Unicode 14 identifiers

2021-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 372915. cor3ntin added a comment. Added some tests for randomly choosen Unicode 14 codepoints Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109854/new/ https://reviews.llvm.org/D109854 Files: clang/lib/Lex/

[PATCH] D108469: Improve handling of static assert messages.

2021-09-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 373404. cor3ntin marked 5 inline comments as done. cor3ntin added a comment. - Fix tests, cland tidy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108469/new/ https://reviews.llvm.org/D108469 Files: clang/i

[PATCH] D108469: Improve handling of static assert messages.

2021-09-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 373405. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108469/new/ https://reviews.llvm.org/D108469 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Ba

[PATCH] D108469: Improve handling of static assert messages.

2021-09-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D108469#3002209 , @aaron.ballman wrote: > In D108469#2957652 , @jfb wrote: > >> I worry that changing the general `static_assert` printing (adding a colon, >> and dropping the quotes

[PATCH] D108469: Improve handling of static assert messages.

2021-09-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 373408. cor3ntin added a comment. Properly comment isFormatting/isPrintable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108469/new/ https://reviews.llvm.org/D108469 Files: clang/include/clang/Basic/Diagn

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added subscribers: wenlei, martong. Herald added a reviewer: shafik. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Modify the IfStmt node to tuppoort constant evaluated expressions. Add a n

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375045. cor3ntin added a comment. Remove untested clang-format changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/new/ https://reviews.llvm.org/D110482 Files: clang/include/clang/AST/Stmt.h clan

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375046. cor3ntin added a comment. Fix tests formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/new/ https://reviews.llvm.org/D110482 Files: clang/include/clang/AST/Stmt.h clang/include/clang/

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375064. cor3ntin added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/new/ https://reviews.llvm.org/D110482 Files: clang/include/clang/AST/Stmt.h clang/include/clang/Basic/Diagnost

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375065. cor3ntin added a comment. Update cxx_status.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/new/ https://reviews.llvm.org/D110482 Files: clang/include/clang/AST/Stmt.h clang/include/clan

[PATCH] D108469: Improve handling of static assert messages.

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375244. cor3ntin added a comment. Rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108469/new/ https://reviews.llvm.org/D108469 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Basi

[PATCH] D108469: Improve handling of static assert messages.

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375251. cor3ntin added a comment. Fix build and address most of Aaron's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108469/new/ https://reviews.llvm.org/D108469 Files: clang/include/clang/Basic/D

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 5 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/AST/Expr.h:1845 StringRef getString() const { -assert(getCharByteWidth() == 1 && +assert((isUnevaluated() || getCharByteWidth() == 1) && "This functio

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:422-423 -ExprResult ArgExpr( -Actions.CorrectDelayedTyposInExpr(ParseAssignmentExpression())); +ExprResult ArgExpr(Actions.CorrectDelayedTyposInExpr( +ParseAttribut

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D105759#3024419 , @aaron.ballman wrote: > Should we also change this to parse an unevaluated string literal: > https://github.com/llvm/llvm-project/blob/main/clang/lib/Lex/ModuleMap.cpp#L1594 > Similar question for all the u

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375265. cor3ntin added a comment. Address Aaron'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: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375267. cor3ntin added a comment. Address Aaron'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] D108469: Improve handling of static assert messages.

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375273. cor3ntin added a comment. Correctly rebase on top of D105759 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108469/new/ https://reviews.llvm.org/D108469 Files: clan

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375278. cor3ntin added a comment. Formatting and missing punctuation 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] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375306. cor3ntin marked 3 inline comments as done. cor3ntin added a comment. - Rename isImmediate to isImmediateFunctionContext - Fix And cleanup Diagnostics in ParseStmt.cpp - Add assert in SemaStmt.cpp - Fix StmtPrinter.cpp Repository: rG LLVM Github

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/AST/Stmt.h:166 +/// True if this if statement is a if consteval statement. +unsigned IsConsteval : 1; erichkeane wrote: > Not sure how others feel here, but for me, I kinda hate that we're

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375319. cor3ntin added a comment. Replace `Unevaluated` by an enum. 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/checke

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375352. cor3ntin added a comment. Herald added a subscriber: dexonsmith. use ConstexprSpecKind to describe whether the IfStmt is constexpr or consteval. Other minor fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5942 "jump bypasses initialization of VLA type alias">; def note_protected_by_constexpr_if : Note< "jump enters controlled statement of constexpr if">; erichkeane

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1541 + if (IsConsteval && NotLocation.isValid()) { +if (ElseStmt.isUnset()) + ElseStmt = Actions.ActOnNullStmt(ThenStmtLoc); aaron.ballman wrote: > erichkeane wrote: > > So this i

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375370. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/new/ https://reviews.llvm.org/D110482 Files: clang/include/clang/AST/Stmt.h clang/include/clang/Basic/Diag

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375374. cor3ntin marked 3 inline comments as done. cor3ntin added a comment. Add parens in CFG.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/new/ https://reviews.llvm.org/D110482 Files: clang/inc

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375475. cor3ntin added a comment. Accept \r as an escape sequence n unevaluated string literal Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: clang-tools-e

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375476. cor3ntin added a comment. Rename commit 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/modernize-unary-s

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375487. cor3ntin added a comment. - Add IfStmt::isNegatedConsteval to track whether the if consteval statement was negated - Add json/text AST dumps tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110482/

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375569. cor3ntin added a comment. Formatting 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/modernize-unary-stat

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 375576. cor3ntin added a comment. Get rid of the extra loop by using a lambda 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-t

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1541 + if (IsConsteval && NotLocation.isValid()) { +if (ElseStmt.isUnset()) + ElseStmt = Actions.ActOnNullStmt(ThenStmtLoc); aaron.ballman wrote: > cor3ntin wrote: > > aaron.ballm

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