[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 6 11:54:20 PDT 2021
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM!
================
Comment at: clang/lib/Sema/SemaDecl.cpp:3686
+ Diag(Old->getLocation(), diag::note_previous_declaration);
+ }
----------------
nickdesaulniers wrote:
> should `CXX11NoReturnAttr` be `dropAttr` on `New` like the other cases, too?
I think it's better to leave it -- the user gets an error so they don't get object code out of it, but leaving the attribute as-if the user had specified everything properly means later diagnostics may behave a bit better. Probably doesn't matter all that much in this case, though, so I don't feel strongly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107613/new/
https://reviews.llvm.org/D107613
More information about the cfe-commits
mailing list