This revision was automatically updated to reflect the committed changes.
Closed by commit rGb147717bb36c: [MSVC] Add support for pragma alloc_text
(authored by steplong).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125011/new/
https://reviews.llv
steplong updated this revision to Diff 429320.
steplong added a comment.
- Clang-formatted. It didn't like the empty line before the bracket in
clang/test/CodeGen/msvc_pragma_alloc_text.cpp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125011/new/
steplong updated this revision to Diff 429261.
steplong added a comment.
- Rebased patch
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125011/new/
https://reviews.llvm.org/D125011
Files:
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/Di
steplong updated this revision to Diff 429000.
steplong added a comment.
- Added description in release notes
- Fixed up some comments in Sema.h
Will merge once build passes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125011/new/
https://reviews
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from some minor commenting nits that you can fix when landing. Can
you also add a release note for the new pragma support?
Comment at: clang/include
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 look
aaron.ballman added inline comments.
Comment at: clang/test/Sema/pragma-ms-alloc-text.cpp:5
+#pragma alloc_text(a// expected-warning {{expected ',' in '#pragma
alloc_text'}}
+#pragma alloc_text(a, a // expected-warning {{missing ')' after '#pragma
alloc_text'}} expe
steplong added inline comments.
Comment at: clang/test/Sema/pragma-ms-alloc-text.cpp:5
+#pragma alloc_text(a// expected-warning {{expected ',' in '#pragma
alloc_text'}}
+#pragma alloc_text(a, a // expected-warning {{missing ')' after '#pragma
alloc_text'}} expected-
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1136-1137
"expected non-wide string literal in '#pragma %0'">, InGroup;
+def warn_pragma_expected_ascii_string : Warning<
+ "expected ascii string literal in '#pragma %0'">, InG
steplong updated this revision to Diff 428536.
steplong added a comment.
- Added Sema tests
- Added checking of c linkage
- Changed some parsing logic in the parser handler e.g #pragma alloc_text(a,
foo without the right paren is only a warning
Repository:
rG LLVM Github Monorepo
CHANGES SI
aaron.ballman added a comment.
Thanks for working on this compatibility extension!
This is missing all of the lexing tests which validate that we correctly
diagnose malformed pragmas. We're also missing all sema tests for the
diagnostics added or emitted from there. When you add the sema tests,
steplong updated this revision to Diff 427329.
steplong added reviewers: rnk, aaron.ballman, hans.
steplong added a comment.
Update patch to error out if a function is not C linkage. Not sure how to check
if a function has been declared
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
steplong created this revision.
Herald added a project: All.
steplong requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
`#pragma alloc_text` is a MSVC pragma that names the code section where
functions should be placed. It only
applies to fu
13 matches
Mail list logo