[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

Guillaume Chatelet via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 02:09:07 PDT 2020


gchatelet marked 3 inline comments as done.
gchatelet added inline comments.


================
Comment at: clang/test/Sema/builtins-memcpy-inline.c:7
+#warning defined as expected
+// expected-warning at -1 {{defined as expected}}
+#endif
----------------
efriedma wrote:
> melver wrote:
> > It appears that the expected-warning check here is guarded by the #if as well. Moving it after the #endif results in a failing test.
> > 
> > I noticed this as I was trying to use __has_feature(__builtin_memcpy_inline), but it somehow does not work, even though the compiler clearly supports __builtin_memcpy_inline.
> > 
> > Any idea what's wrong with the __has_feature test?
> > 
> > Thanks!
> Should be `__has_builtin`, I think?  __has_feature only applies to features defined in clang/include/clang/Basic/Features.def.
Thx for noticing. I'll send a patch to update the test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73543





More information about the cfe-commits mailing list