[PATCH] D124702: [MSVC] Add support for pragma function

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 05:23:21 PDT 2022


hans added a comment.

>From the MS docs:

> Once a function pragma is seen, it takes effect at the first function definition that contains a specified intrinsic function. The effect continues to the end of the source file, or to the appearance of an intrinsic pragma specifying the same intrinsic function. You can only use the function pragma outside of a function, at the global level.

Should we try to handle the interaction between pragma intrinsic and pragma function, i.e. that the former "undoes" the latter? And should we error/warn if the pragma occurs not in namespace scope?



================
Comment at: clang/include/clang/Sema/Sema.h:10236
 
+  void ActOnPragmaMSFunction(std::vector<StringRef> NoBuiltins);
+
----------------
Pass by const-ref maybe?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124702



More information about the cfe-commits mailing list