[PATCH] D24330: Add some MS aliases for existing intrinsics

Albert Gutowski via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 11:43:10 PDT 2016


agutowski added inline comments.

================
Comment at: test/Sema/implicit-intel-builtin-decl.c:4
@@ +3,3 @@
+void f() {
+  (void)_mm_getcsr(); // expected-warning{{implicitly declaring library function '_mm_getcsr'}} \
+  // expected-note{{include the header <xmmintrin.h> or explicitly provide a declaration for '_mm_getcsr'}}
----------------
rnk wrote:
> Can you add a C++ test? I think you'll get "undeclared identifier '_mm_getcsr'" instead of this helpful diagnostic.
This diagnostic works also in C++, although that's not the case with _byteswap functions - if they are LIBBUILTINs, the C++ diagnostic doesn't work, and LANGBUILTINs doesn't have header dependencies. I can create another thing like TARGET_HEADER_BUILTIN, but I don't know if that's a good idea.


https://reviews.llvm.org/D24330





More information about the cfe-commits mailing list