[PATCH] D23944: Parsing MS pragma intrinsic

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 12:59:25 PDT 2016


rnk added a comment.

One buglet, otherwise looks good.


================
Comment at: lib/Parse/ParsePragma.cpp:2169
@@ +2168,3 @@
+    IdentifierInfo *II = Tok.getIdentifierInfo();
+    if (II->getBuiltinID() < 2)
+      PP.Diag(Tok.getLocation(), diag::warn_pragma_intrinsic_builtin)
----------------
This doesn't seem like the right test. I think '1' is a valid builtin. This should probably be != 0. `__builtin_atan2` looks like it has builtin id 1, and you can use that to test.


https://reviews.llvm.org/D23944





More information about the cfe-commits mailing list