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

2021-07-10 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 patch proposes to handle in an uniform fashion the parsing of strings that are never evaluated, in asm statement, static assert, attrributes, exte

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

2021-07-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 357714. cor3ntin added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: clang/include/clang/AST/Expr.h clang/include/clang/Basic/Di

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

2021-07-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 357723. cor3ntin added a comment. - Support unevaluated str8ing literal in deprecated/nodiscard attributes - Fix test formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.o

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

2021-07-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 357741. cor3ntin added a comment. Fix asserts firing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D105759 Files: clang/include/clang/AST/Expr.h clang/include/clang/Ba

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

2021-07-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 357746. cor3ntin added a comment. Herald added a project: clang-tools-extra. Fix tests, windows compilation, formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105759/new/ https://reviews.llvm.org/D10575

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

2021-07-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 357764. cor3ntin added a comment. Fix avaibility attribute parsing 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/checker

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

2021-07-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 357765. cor3ntin added a comment. clang format 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-st

[PATCH] D104975: Implement P1949

2021-07-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/UnicodeCharSets.h:229 +static const llvm::sys::UnicodeCharRange XIDContinueRanges[] = { +{0x0030, 0x0039}, {0x005F, 0x005F}, {0x00B7, 0x00B7}, +{0x0300, 0x036F}, {0x0387, 0x0387}, {0x0483, 0x0487},

[PATCH] D113749: [Clang] Fix nesting of discarded an immediate context.

2021-11-12 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. In C++23, discarded statements and if consteval statements can nest arbitrarily. To support that, we keep track of whether the parent of the current ev

[PATCH] D113749: [Clang] Fix nesting of discarded an immediate context.

2021-11-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 386783. cor3ntin added a comment. Fix commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113749/new/ https://reviews.llvm.org/D113749 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaEx

[PATCH] D111400: [Clang] Implement P2242R3

2021-12-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D111400#3164249 , @aaron.ballman wrote: > In D111400#3088321 , @aaron.ballman > wrote: > >> In D111400#3088133 , >> @hubert.reinterpretcast

[PATCH] D113749: [Clang] Fix nesting of discarded and immediate contexts.

2021-12-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 391030. cor3ntin marked an inline comment as done. cor3ntin added a comment. Add and fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113749/new/ https://reviews.llvm.org/D113749 Files: clang/incl

[PATCH] D113749: [Clang] Fix nesting of discarded and immediate contexts.

2021-12-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 391032. cor3ntin added a comment. Remove bitfields Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113749/new/ https://reviews.llvm.org/D113749 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaExpr

[PATCH] D113749: [Clang] Fix nesting of discarded and immediate contexts.

2021-12-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:16575-16578 + ExprEvalContexts[ExprEvalContexts.size() - 2] + .isDiscardedStatementContext(); + ExprEvalContexts.back().InImmediateFunctionContext = + ExprEvalContexts[ExprEvalContexts.siz

[PATCH] D111400: [Clang] Implement P2242R3

2021-12-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D111400#3165668 , @hubert.reinterpretcast wrote: > In D111400#3164301 , @cor3ntin > wrote: > >> If the issue is regarding the support and extension warning in C++20 and >> older mod

[PATCH] D111400: [Clang] Implement P2242R3

2021-12-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 391906. cor3ntin added a comment. Treat non-literals in constexpr as an error before C++23 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/Releas

[PATCH] D111400: [Clang] Implement P2242R3

2021-12-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Regression compared to the status quo: This code no longer warns (as noted by Hubert above) auto f = [](bool b) { if (b) return 42; static int x = 0; return x; }; constexpr int x = f(true); const int *p = &x; GCC doesn't warn and... if we wanted to p

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It starting to look great. Should we add an extension warning? Note that I'm not suggesting to support that in earlier modes, just an off-by-default warning that says "this is a c++20 feature". but we are a bit inconsistent with those. can you rename `test/SemaCXX/P096

[PATCH] D136449: [Clang] Implement P2513

2022-10-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. This is applied to C++20 as a defect report. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D136449 Fi

[PATCH] D136449: [Clang] Implement P2513

2022-10-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 469595. cor3ntin added a comment. Remove unused diagnostic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136449/new/ https://reviews.llvm.org/D136449 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D136449: [Clang] Implement P2513

2022-10-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D136449#3874867 , @aaron.ballman wrote: > Thanks for this! Can you add more details to the patch summary as to what > this paper does? Paper numbers help, but don't convey a whole lot of > information at a glance if we need

[PATCH] D136471: [Clang] Implement P2513

2022-10-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. This change allows initializing an array of unsigned char, or char from u8 string literals. This was done both to support

[PATCH] D136449: [Clang] Implement P2513

2022-10-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 469690. cor3ntin added a comment. Improve commit message, check proper integral conversions, remove ws changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136449/new/ https://reviews.llvm.org/D136449 Files

[PATCH] D136471: [Clang] Implement P2513

2022-10-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin abandoned this revision. cor3ntin added a comment. Created by mistake Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136471/new/ https://reviews.llvm.org/D136471 ___ cfe-commits mailing list cfe-

[PATCH] D136449: [Clang] Implement P2513

2022-10-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:701 +Builder.defineMacro("__cpp_char8_t", +LangOpts.CPlusPlus20 ? "202207L" : "201811L"); Builder.defineMacro("__cpp_impl_destroying_delete", "201806L"); ---

[PATCH] D136449: [Clang] Implement P2513

2022-10-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 469715. cor3ntin edited the summary of this revision. cor3ntin added a comment. Enable the change in -fchar8_t mode as per suggestion from Aaron. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136449/new/ https

[PATCH] D136554: [WIP] Implement CWG2631

2022-10-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://review

[PATCH] D136554: [WIP] Implement CWG2631

2022-10-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 470154. cor3ntin added a comment. Complete implementation for default member initializers, tests, cleaups, docs, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554

[PATCH] D136449: [Clang] Implement P2513

2022-10-24 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd0d2772379bd: [Clang] Implement P2513 (authored by cor3ntin). Changed prior to commit: https://reviews.llvm.org/D136449?vs=469715&id=470179#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D136449: [Clang] Implement P2513

2022-10-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks Aaron! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136449/new/ https://reviews.llvm.org/D136449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D132941: [DO NOT SUBMIT] [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-10-24 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. The PR for the more general approach (note that it does not solve source location, that will need more additional work) https://reviews.llvm.org/D136554 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132941/new/ https://re

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

2022-10-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: llvm/utils/UnicodeData/UnicodeNameMappingGenerator.cpp:46 + auto SecondSemiPos = Line.find(';', FirstSemiPos + 1); + if (FirstSemiPos == std::string::npos) +continue; RKSimon wrote: > @cor3ntin Should

[PATCH] D136554: [WIP] Implement CWG2631

2022-10-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 470808. cor3ntin added a comment. Cleanup, add comments and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 Files: clang/docs/ReleaseNotes.rst clang/inclu

[PATCH] D136554: Implement CWG2631

2022-10-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This is working towards, but not yet fixing source_location. Subsequent patches are needed https://github.com/llvm/llvm-project/issues/56379#issuecomment-1288213743 Comment at: clang/lib/Sema/SemaDeclCXX.cpp:15601 -ExprResult Sema::BuildCXXDefaultIn

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-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. Give some time for Aaron/Tom to have the chance to raise further comment but I'm happy with it otherwise. Thanks for doing that, and sorry I missed you earlier ping. CHANGES SINCE LAST AC

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:257 +else if (PartName.startswith("std") && + (PartName.size() == 3 || isDigit(PartName.drop_front(3)[0]))) + Reason = /*reserved*/ 1; Comment at: c

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D136953#3892060 , @erichkeane wrote: > I'll leave it to the modules experts to decide whether they're happy with > this, but I had a drive-by. > > Also, I see none of the tests validate 'import', just 'export'. Based on the

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:257 +else if (PartName.startswith("std") && + (PartName.size() == 3 || isDigit(PartName.drop_front(3)[0]))) + Reason = /*reserved*/ 1; erichkeane wrote: > aaron.ballman

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:241-248 + // C++2b [module.unit]p1: ... The identifiers module and import shall not + // appear as identifiers in a module-name or module-partition. All + // module-names either beginning with an identif

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. Modulo the import typo. I'm happy with this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136953/new/ https://reviews.llvm.org/D136953 __

[PATCH] D136554: Implement CWG2631

2022-10-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 471748. cor3ntin added a comment. - Fix initialization of nested struct default initializer. - Fix handling of templates. - Better track the initiulization context to make source_location::current work as a consteval function. I've tried to treat SourceLo

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I added a few more comments, mostly nitpicks Comment at: clang/lib/AST/ExprConstant.cpp:9952-9953 +const FieldDecl *Field; +if (isa(E)) { + Field = cast(E)->getInitializedFieldInUnion(); +} else if (isa(E)) { ==

[PATCH] D137051: [Clang] Allow additional mathematical symbols in identifiers.

2022-10-30 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. Implement the proposed UAX Profile "Mathematical notation profile for default identifiers". This implements a not-yet app

[PATCH] D137051: [Clang] Allow additional mathematical symbols in identifiers.

2022-10-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Note that we should wait end of next week to hear back from the Unicode Technical Committee before merging this Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137051/new/ https://reviews.llvm.org/D137051 _

[PATCH] D137051: [Clang] Allow additional mathematical symbols in identifiers.

2022-10-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 471882. cor3ntin added a comment. Remove extra semi colon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137051/new/ https://reviews.llvm.org/D137051 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D136953: [C++20] Diagnose invalid and reserved module names

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:282 + StringRef FirstComponentName = Path[0].first->getName(); + if (!getSourceManager().isInSystemHeader(Path[0].second) && + (FirstComponentName == "std" || ChuanqiXu wrote: > std

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:507-508 ``-std=gnu++14`` to their build settings to restore the previous behaviour. +- Implemented DR2631. Invalid ``consteval`` calls in default arguments and default + member initializers are diagnosed

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/CXX/class/class.local/p1-0x.cpp:14 int& x2 = x; // expected-error{{reference to local variable 'x' declared in enclosing lambda expression}} -}; +}c; // expected-note {{required here}} }; c

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:507-508 ``-std=gnu++14`` to their build settings to restore the previous behaviour. +- Implemented DR2631. Invalid ``consteval`` calls in default arguments and default + member initializers are diagnosed

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 20 inline comments as done. cor3ntin added inline comments. Comment at: clang/docs/ReleaseNotes.rst:507-508 ``-std=gnu++14`` to their build settings to restore the previous behaviour. +- Implemented DR2631. Invalid ``consteval`` calls in default arguments and

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 472011. cor3ntin marked an inline comment as done. cor3ntin added a comment. - Address most of Aaron's comments (except the one about using Optional) - Better comment `ImmediateCallVisitor`. - Remove unused code in `ImmediateCallVisitor` Repository: rG LL

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 472019. cor3ntin added a comment. use llvm::optional to store the `ExpressionEvaluationContextRecord::InitializationContext` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 8 inline comments as done. cor3ntin added inline comments. Comment at: clang/test/CodeGenCXX/default-arguments-with-immediate.cpp:22 + +// CHECK: define {{.*}} i32 @_ZL3extv() + aaron.ballman wrote: > Move this check line up to where ext is declar

[PATCH] D136554: Implement CWG2631

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

[PATCH] D136554: Implement CWG2631

2022-10-31 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 472108. cor3ntin added a comment. Move more getExpr methods in the header. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 Files: clang/docs/ReleaseNotes.rst cla

[PATCH] D136554: Implement CWG2631

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

[PATCH] D136554: Implement CWG2631

2022-11-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman I tried to address your comment, except that: - There is a bug with default parameter in blocks so that can't be tested - Clang does not support default initialization of capture, and if it did, I don't thee how we could support immediate calls in that e

[PATCH] D136554: Implement CWG2631

2022-11-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 472319. cor3ntin added a comment. Revert code committed accidentally Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 Files: clang/docs/ReleaseNotes.rst clang/inc

[PATCH] D137172: [Clang] Implement CWG2358 Explicit capture of value

2022-11-01 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/D137172 Files: clang/docs/ReleaseNotes.rst clang/lib/

[PATCH] D136554: Implement CWG2631

2022-11-01 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 472337. cor3ntin added a comment. Thanks Tom for the useful info. I modified the code and comment accordingly. Ideally we would assert but we can't until that other issue is fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D123850: [Clang] Fix Unevaluated LambdasBackport to Clang 14.0.1

2022-08-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin abandoned this revision. cor3ntin added a comment. No longer pursuing that as llvm 14 seems EOL Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123850/new/ https://reviews.llvm.org/D123850 ___ cfe

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

2022-08-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This looks good to me. I *think* landing things without doing silent sfinae for incomplete types is okay-ish, but I'd like to here from other folks. @royjacobson Have you looked into that? Do you know how involved would it be? Either way, we should make sure that if t

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

2022-08-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman I think this looks good, you want to double check? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 ___ cfe-commits mail

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

2022-08-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:677 //Builder.defineMacro("__cpp_aggregate_paren_init", "201902L"); -Builder.defineMacro("__cpp_concepts", "201907L"); +Builder.defineMacro("__cpp_concepts", "202002L"); Builder.

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

2022-08-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. I would wait for @aaron.ballman or @erichkeane to sign off on it, but this looks good to me. Thanks again for working on this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Yes, this looks good to me too. Thanks for working on this. Can you modify ReleaseNotes.rst to mention the fixed issue? Comment at: clang/include/clang/Sema/Sema.h:1355 + InImmediateFunctionContext) || + // [expr.const#def:imm

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

2022-08-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/conditionally-trivial-smfs-1.cpp:1 +// RUN: %clang_cc1 -std=c++20 -triple x86_64-pc-linux -ast-dump=json %s | FileCheck %s --check-prefixes=CHECK,LIN +// RUN: %clang_cc1 -std=c++20 -triple x86_64-pc-win32 -ast-dump=json

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-26 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. Clang crashes when encountering an `if consteval` statement. This is the minimum fix not to crash. The fix is consistent w

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman I did a minimal fix, both because It's unclear to me how coverage work and because I think we should try to land this is 15. I hope that's okay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132723/new/ ht

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 455883. cor3ntin added a comment. Release notes + style issues (There was no shadowing though) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132723/new/ https://reviews.llvm.org/D132723 Files: clang/docs/Re

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:1407 // The 'else' count applies to the area immediately after the 'then'. - Gap = findGapAreaBetween(getEnd(S->getThen()), getStart(Else));

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 455917. cor3ntin added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132723/new/ https://reviews.llvm.org/D132723 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CoverageMapping

[PATCH] D132723: [Clang] Fix crash in coverage of if consteval.

2022-08-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 rG463e30f51fd0: [Clang] Fix crash in coverage of if consteval. (authored by cor3ntin). Changed prior to commit: https://reviews.llvm.org/D132723?vs=

[PATCH] D133807: Update Unicode to 15.0

2022-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 460679. cor3ntin added a comment. Add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133807/new/ https://reviews.llvm.org/D133807 Files: clang/docs/ReleaseNotes.rst clang/lib/Lex/UnicodeCharSets.h

[PATCH] D133887: [Clang] Support label at end of compound statement

2022-09-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D133887#3797491 , @Izaron wrote: >> It should definitely be without warning in C23 mode and give an extension >> warning in earlier modes. > > @aaron.ballman we have this extension warning for pre-C++23: > > def ext_label_e

[PATCH] D133887: [Clang] Support label at end of compound statement

2022-09-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:738 +} else if (getLangOpts().C99 && !getLangOpts().C2x) { + Diag(Tok, diag::ext_c_label_end_of_compound_statement); +} I do not understand this. Why checking `getLangOpts().C9

[PATCH] D133887: [Clang] Support label at end of compound statement

2022-09-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D133887#3797614 , @Izaron wrote: >> Why checking getLangOpts().C99 instead of just C > > There is no `getLangOpts().C`. Here are possible C/C++ opt flags: > https://github.com/llvm/llvm-project/blob/7914e53e312074828293356f569

[PATCH] D133887: [Clang] Support label at end of compound statement

2022-09-17 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin accepted this revision as: cor3ntin. cor3ntin added a comment. This revision is now accepted and ready to land. Thanks. This LGTM now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133887/new/ https://reviews.llvm.org/D133887 _

[PATCH] D134128: Resubmit an implemention for constrained template template parameters [P0857R0 Part B]

2022-09-18 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for working on this. I'll be honest though, I still have absolutely no understanding what the use cases or intents of this features are. I think we were waiting for core to clarify and I'm not sure they did. This does seem to implement the wording though... Rep

[PATCH] D133807: Update Unicode to 15.0

2022-09-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @tahonermann ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133807/new/ https://reviews.llvm.org/D133807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D133807: Update Unicode to 15.0

2022-09-21 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 rGc932cef32aa4: Update Unicode to 15.0 (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1037-1041 +def err_static_mutable_lambda : Error< + "lambda cannot be both mutable and static">; +def err_static_lambda_captures : Error< + "a static lambda cannot have any captures">;

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It's great to see this make progress. Can you update cxx_status.html and ReleaseNotes.txt? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 _

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Good catch template concept K = requires (typename T::Type X) { // (3) X.next(); } That typename should be optional. Can you add a test for that? If it works you can mark P2092 as fully supported. Repository: rG LLVM Github

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D53847#3819344 , @ayzhao wrote: > add test and fix for P2092 These changes look good to me, thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I only left a few comments because I'm not familiar enough with that part of the code to be certain the changes are correct but overall it looks fine to me. Comment at: clang/include/clang/Sema/Overload.h:524-526 +/// StaticObjectArgumentConversio

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman Can you give one last pass at this? The new conversions rules is not something I feel confident blessing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133659/new/ https://reviews.llvm.org/D133659

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:1265 + if (Intro.hasLambdaCapture()) +P.Diag(StaticLoc, diag::err_static_lambda_captures); +} aaron.ballman wrote: > aaron.ballman wrote: > > royjacobson wrote: > > > cor3ntin wrote

[PATCH] D134898: [Clang] define __cpp_named_character_escapes

2022-09-29 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for catching that, I missed there was a feature test macro for it. It doesn't really make sense for it to be a feature test macro (given WG21's current policies) so I'll make raise an issue about that but I'm happy to approve the change in the meantime Reposito

[PATCH] D132941: [DO NOT SUBMIT] [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-09-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I think this is superseded by https://cplusplus.github.io/CWG/issues/2631.html and its resolution. Which I'm looking into implementing - I'll let you know if I manage to get it working (I still have a number of failing tests). The idea is the same though, we keep a rew

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-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. Yes, this looks reasonable. The additional warning is somewhat unfortunate, and we could avoid it, but at the same time i don't expect it would bother anyone given how unlikely the scenari

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/unittests/Lex/LexerTest.cpp:665 +TEST_F(LexerTest, BrokenStringLiteral) { + const llvm::StringLiteral Source = R"cpp("\N")cpp"; + // Make sure this isn't crashing. hokein wrote: > nit: I'd probably use a clang l

[PATCH] D135287: Disallow dereferencing of void* in C++.

2022-10-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6938 +def ext_typecheck_indirection_through_void_pointer_cpp +: ExtWarn<"ISO C++ does not allow indirection on operand of type %0">, + // Note: This uses a different diagnostics

[PATCH] D135161: [clang][Lex] Fix a crash on malformed string literals

2022-10-06 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D135161#3839510 , @kadircet wrote: > i'll reland the fix without the test case, as it's clearly fixing one of the > codepaths that'll lead to a crash. it's only the test case that's crashing, > because i don't think there ar

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:135 + static_assert(u32[1] == U'b', ""); +}; + aaron.ballman wrote: > shafik wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > > I think you need a more coverage for character

[PATCH] D135608: Update implementation status of P2468R2

2022-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for working on this Comment at: clang/www/cxx_status.html:1435 https://wg21.link/P2468R2";>P2468R2 - No + Clang 16 Should be "unreleased" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135608: Update implementation status of P2468R2

2022-10-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. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135608/new/ https://reviews.llvm.org/D135608 __

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:143 + +}; tahonermann wrote: > As others already noted, additional testing of multicharacter literals and > UCNs (including named universal characters like `\N{LATIN_CAPITAL_LETTER_E}`

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:143 + +}; tbaeder wrote: > cor3ntin wrote: > > tahonermann wrote: > > > As others already noted, additional testing of multicharacter literals > > > and UCNs (including named universal

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:143 + +}; tahonermann wrote: > cor3ntin wrote: > > tbaeder wrote: > > > cor3ntin wrote: > > > > tahonermann wrote: > > > > > As others already noted, additional testing of multicharacter

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