[PATCH] D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 6 10:58:36 PDT 2021


nickdesaulniers added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:3685
+            << NRA;
+        notePreviousDefinition(Old, New->getLocation());
+      }
----------------
ah, this isn't quite right.  It replaces warning of the first declaration with warning of the first definition.

This should instead use

`Diag(Old->getLocation(), diag::note_previous_declaration);`


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