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

Stephen Long via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 11:57:00 PDT 2022


steplong updated this revision to Diff 428456.
steplong added a comment.

- Changed pragma-ms-functions.c to only check that the no-builtin attributes are added to the functions
- Moved pragma handler to Parser
- Changed scope check to only file scope. MSVC accepts stuff like that we don't:

  struct S {
    int a;
  #pragma function(memset)
  };


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124702

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Parse/Parser.h
  clang/include/clang/Sema/Sema.h
  clang/lib/Parse/ParsePragma.cpp
  clang/lib/Sema/SemaAttr.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/test/CodeGen/pragma-ms-function.c
  clang/test/Preprocessor/pragma_microsoft.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124702.428456.patch
Type: text/x-patch
Size: 11387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220510/32b54e3d/attachment.bin>


More information about the cfe-commits mailing list