[PATCH] D23944: Parsing MS pragma intrinsic

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 29 10:37:04 PDT 2016


rnk added inline comments.

================
Comment at: include/clang/Basic/DiagnosticParseKinds.td:916
@@ +915,3 @@
+def warn_pragma_expected_builtin : Warning<
+  "expected builtin function in '#pragma %0' - ignored">,
+  InGroup<IgnoredPragmas>;
----------------
I'd use this wording:
  '%0' is not a recognized builtin

================
Comment at: include/clang/Basic/DiagnosticParseKinds.td:919
@@ -914,1 +918,3 @@
+def note_pragma_intrinsic_intrin_header : Note<
+  "consider including <intrin.h> to access the non-builtin intrinsics">;
 // - #pragma unused
----------------
Generally notes are attached to other source locations, which we don't have in this case. I'd replace this note with a second diagnostic with an extra clause:
  def warn_pragma_intrinsic_builtin_suggest : Warning<
    "'%0' is not a recognized builtin; consider including <intrin.h> to access non-builtin intrinsics">;

If you search for "suggest" in the diagnostic file, you can see other instances of this.


https://reviews.llvm.org/D23944





More information about the cfe-commits mailing list