[PATCH] D90336: [Sema] Diagnose annotating `if constexpr` with a likelihood attribute

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 28 14:46:26 PDT 2020


rjmccall added a comment.

Patch generally looks good.  Minor complaint about how you're using notes.



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3163
 def note_attribute_has_no_effect_here : Note<
-  "annotating the %select{infinite loop}0 here">;
+  "annotating the %select{infinite loop|'if constexpr' statement}0 here">;
 def err_decl_attribute_invalid_on_stmt : Error<
----------------
This isn't a useful form of re-use.  The problem is that the original note is pretending to be generic when it really isn't; please rename it to something like `note_annotating_infinite_loop_here` (maybe in a different patch).  This patch should just add a new note.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90336/new/

https://reviews.llvm.org/D90336



More information about the cfe-commits mailing list