[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-15 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG98322d3eb431: Complete the implementation of P2361 Unevaluated string literals (authored by cor3ntin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/n

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Thanks, @cor3ntin, for addressing my feedback. I am not familiar enough with various aspects of it to approve it, but I see Aaron has already approved it and I think all comments have been addressed. I also appreciate that the patch helps towards making th

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:431-436 +if (Expr.isInvalid()) { + SawError = true; + break; +} else { + Exprs.push_back(Expr.get()); +} hubert.reinterpretcast wrote: > cor3ntin wrote: > > aaron

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-14 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 549878. cor3ntin marked an inline comment as done. cor3ntin added a comment. Address Hubert's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files: clang

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:431-436 +if (Expr.isInvalid()) { + SawError = true; + break; +} else { + Exprs.push_back(Expr.get()); +} cor3ntin wrote: > aaron.ballman wrote: > >

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 549584. cor3ntin marked 8 inline comments as done. cor3ntin added a comment. Address Hubert's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files: clan

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Parser/c2x-attributes.c:29 +[[deprecated(L"abc")]] void unevaluated_string(void); +// expected-warning@-1 {{encoding prefix 'L' on an unevaluated string literal has no effec}} + "Typo" fix. =

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-11 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 549314. cor3ntin added a comment. Rebase, add C tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basi

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Parser/cxx0x-attributes.cpp:450-451 +namespace P2361 { +[[deprecated(L"abc")]] void a(); // expected-error{{an unevaluated string literal cannot have an encoding prefix}} +[[nodiscard("\123")]] int b(); // expe

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-28 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:2349 + if (isVariadicStringLiteralArgument(Args[N])) { +for (; N < sizeof(uint32_t); N++) + Bits |= (1 << N); maskTrailingZeros might also be useful

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:431-436 +if (Expr.isInvalid()) { + SawError = true; + break; +} else { + Exprs.push_back(Expr.get()); +} aaron.ballman wrote: > Oups, sorry @Fznamznon, I'll fix

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with a minor formatting nit that @Fznamznon had pointed out but was missed. Comment at: clang/lib/Parse/ParseDecl.cpp:431-436 +if (Expr.isInvalid()) {

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 544890. cor3ntin edited the summary of this revision. cor3ntin added a comment. Fix typo, remove dead code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files: c

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-27 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:422 + // There's nothing to suggest in here as we parsed a full expression. + // Instead fail and propogate the error since caller might have something + // the suggest, e.g. signature help

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 544759. cor3ntin added a comment. Update commit message and remove spurious changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files: clang/docs/ReleaseNotes.

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:60 + "'external_source_symbol' attribute|" + "as argument of '%1' attribute}0">; + cor3ntin wrote: > aaron.ballman wrote: > > This duplicates par

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-27 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 2 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:60 + "'external_source_symbol' attribute|" + "as argument of '%1' attribute}0">; + aaron.ballman wrote: > T

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you update the patch description with more details about why these changes are being made in this way (to help people doing code archaeology in the future)? Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:60 + "'exter

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-07-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The attributes changes were left out of Clan