[PATCH] D135341: [clang] adds `__reference_constructs_from_temporary`
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 14 07:35:19 PST 2023
erichkeane added a comment.
On the fence about the diagnostic at all, but definitely should not be doing string magic to make it quoted. Otherwise this is a LGTM.
================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:5620
+ std::string Spelling = "'" + std::string(getTraitSpelling(BTT)) + "'";
+ return Self.Diag(KeyLoc, diag::err_reserved_identifier_for_future_use) << Spelling;
+ }
----------------
This is my only problem with this... we shouldn't have to do this magic to get this to work. The diagnostic should have the quote in it, OR we should just pass an identifier (which, IIRC, ensures we wrap it in quotes anyway).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135341/new/
https://reviews.llvm.org/D135341
More information about the cfe-commits
mailing list