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

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 30 11:09:20 PDT 2020


Mordante marked an inline comment as done.
Mordante added a comment.

Thanks for the review!



================
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<
----------------
rjmccall wrote:
> 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.
I'll fix it. I'll also change the warn at line 3158, since that uses the same select.


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