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

Stephen Long via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 6 08:24:59 PDT 2022


steplong added a comment.

In D124702#3496534 <https://reviews.llvm.org/D124702#3496534>, @hans wrote:

> It needs tests for the warnings about badly formed pragmas, and for pragmas outside file/namespace scope.

Appreciate the comments. I have a couple of questions:

Is the tests for badly formed pragmas, clang/test/Preprocessor/pragma_microsoft.c?
It looks like MSVC only cares about it not being in a function like mentioned in the comments in D125011 <https://reviews.llvm.org/D125011>. Do we try to mimic MSVC behavior because MSVC rejects `#pragma function(memset` whichout the right paren?
MSVC also rejects `#pragma function(foo)` if foo isn't extern C or declared. We probably to match that behavior even if it isn't documented?


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