[PATCH] D125011: [MSVC] Add support for pragma alloc_text
Stephen Long via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 11 11:48:00 PDT 2022
steplong updated this revision to Diff 428727.
steplong added a comment.
- Reject `#pragma alloc_text(a, a`
- On Line 1180, I didn't use `ExpectAndConsume()` there because I wanted to accept both identifiers and strings (i.e `pragma alloc_text(a, foo)` and `pragma alloc_text("a", foo)`
- It looks like we need `->getRedeclContext()` to accept
extern "C" {
void foo();
#pragma alloc_text(a, foo)
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125011/new/
https://reviews.llvm.org/D125011
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/msvc_pragma_alloc_text.cpp
clang/test/Sema/pragma-ms-alloc-text.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125011.428727.patch
Type: text/x-patch
Size: 11673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220511/fe8a4ca3/attachment.bin>
More information about the cfe-commits
mailing list