This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb78d5380da11: parse: process GNU and standard attributes on
top-level decls (authored by compnerd).
Changed prior to commit:
https://reviews.llvm.
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM aside from the question about whether we want to add an assert or not (I
don't insist on adding one) and adding a release note (which doesn't need
further review unless you want it). Thank you for these changes!
CHANGES
aaron.ballman added inline comments.
Comment at: clang/lib/Parse/Parser.cpp:1096-1097
+ParsingDeclSpec &DS, AccessSpecifier AS) {
+ DS.SetRangeStart(DeclSpecAttrs.Range.getBegin());
+ DS.SetRangeEnd(DeclSpecAttrs.Range.getEnd());
+ DS.takeAttributesFrom(DeclSpecAttrs);
---
compnerd updated this revision to Diff 476949.
compnerd marked an inline comment as done.
compnerd added a comment.
Address review feedback
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137979/new/
https://reviews.llvm.org/D137979
Files:
clang/include/clang/Parse/Parser.h
clang/lib
compnerd marked 5 inline comments as done.
compnerd added inline comments.
Comment at: clang/include/clang/Parse/Parser.h:1605-1606
// C99 6.9: External Definitions.
DeclGroupPtrTy ParseExternalDeclaration(ParsedAttributes &Attrs,
+
aaron.ballman added a comment.
Thank you for working on this, I know it was a slog! I think this is pretty
close to ready, though you should definitely add a release note about the
changes.
Comment at: clang/include/clang/Parse/Parser.h:1605-1606
// C99 6.9: External Defin
arphaman accepted this revision.
arphaman added a comment.
This revision is now accepted and ready to land.
Thanks, this LGTM. You might want to get another reviewers approval as well.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137979/new/
https://reviews.llvm.org/D137979
__
compnerd updated this revision to Diff 476163.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137979/new/
https://reviews.llvm.org/D137979
Files:
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseHLSL.cpp
clang/lib/Parse/ParseObjc.cpp
clang
arphaman added inline comments.
Comment at: clang/lib/Parse/ParseObjc.cpp:69
+ if (PA.isGNUAttribute())
+Diag(PA.getLoc(), diag::err_objc_unexpected_attr);
+ }
I think it might be better to still report this error at the location of the
`@` token (
ymandel added inline comments.
Comment at: clang/unittests/Tooling/SourceCodeTest.cpp:259-268
+ // Includes attributes through macro expansion.
+ Visitor.runOverAnnotated(R"cpp(
+ #define MACRO_EXPANSION __attribute__((deprecated("message")))
+ $r[[MACRO_EXPANSION
+
aaron.ballman edited reviewers, added: eandrews; removed: elizabethandrews.
aaron.ballman added a comment.
I added the wrong account for Elizabeth, so fixing that up.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137979/new/
https://reviews.llvm.org/D137979
compnerd updated this revision to Diff 475570.
compnerd edited the summary of this revision.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137979/new/
https://reviews.llvm.org/D137979
Files:
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseHL
compnerd updated this revision to Diff 475530.
compnerd added a comment.
Add unsupported test cases
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137979/new/
https://reviews.llvm.org/D137979
Files:
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Pars
compnerd added inline comments.
Comment at: clang/unittests/Tooling/SourceCodeTest.cpp:249-258
Visitor.runOverAnnotated(R"cpp(
- #define ATTR __attribute__((deprecated("message")))
- $r[[ATTR
+ $r[[__attribute__((deprecated("message")))
int x;]])cpp");
aaron.ballman added reviewers: erichkeane, elizabethandrews.
aaron.ballman added a comment.
Adding some additional reviewers for more awareness.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137979/new/
https://reviews.llvm.org/D137979
___
ymandel added inline comments.
Comment at: clang/unittests/Tooling/SourceCodeTest.cpp:249-258
Visitor.runOverAnnotated(R"cpp(
- #define ATTR __attribute__((deprecated("message")))
- $r[[ATTR
+ $r[[__attribute__((deprecated("message")))
int x;]])cpp");
compnerd created this revision.
compnerd added reviewers: aaron.ballman, sammccall.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
compnerd requested review of this revision.
Herald added a project: clang.
We would previously reject valid input where GNU attributes preceded the
17 matches
Mail list logo