I wasn't 100% whether to add the range to ParsedAttributes or even ParsedAttributesView.
There's still a ParsedAttributesViewWithRange which basically used once in ParseDeclCXX.cpp.
Paths
| Differential D121201
[clang] Merge the SourceRange into ParsedAttributes ClosedPublic Authored by tbaeder on Mar 8 2022, 2:31 AM.
Details Summary I wasn't 100% whether to add the range to ParsedAttributes or even ParsedAttributesView. There's still a ParsedAttributesViewWithRange which basically used once in ParseDeclCXX.cpp.
Diff Detail Event TimelineComment Actions Just a couple of questions/comments. Otherwise this seems pretty ok.
Comment Actions
I think ParsedAttributesView is the correct level for this -- I want to see us tracking the source range for all the parsed attributes (we need the information for diagnostics more often than not), and this ensures we always have access to that information.
Any idea why we can't get rid of that one? (Maybe it'll become more clear to me as I review more.)
tbaeder added inline comments.
tbaeder added inline comments.
tbaeder marked an inline comment as done. Comment ActionsRemove ParsedAttributesViewWithRange and address other review comments. Comment Actions Just NFC nits from me with coding style stuff, so this LGTM! Feel free to fix the style nits when you land or land this as-is and do an NFC commit to fix them.
This revision is now accepted and ready to land.Mar 16 2022, 6:02 AM tbaeder marked 5 inline comments as done. tbaeder added inline comments.
Comment Actions LGTM, feel free to add the assert when you land.
This revision was landed with ongoing or failed builds.Mar 24 2022, 12:12 AM Closed by commit rG711e3a569167: [clang][parse] Move source range into ParsedAttibutesView (authored by tbaeder). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 417235 clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/DeclSpec.h
clang/include/clang/Sema/ParsedAttr.h
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseCXXInlineMethods.cpp
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Parse/ParseObjc.cpp
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Parse/ParsePragma.cpp
clang/lib/Parse/ParseStmt.cpp
clang/lib/Parse/ParseTemplate.cpp
clang/lib/Parse/ParseTentative.cpp
clang/lib/Parse/Parser.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaStmt.cpp
clang/lib/Sema/SemaStmtAttr.cpp
clang/lib/Sema/SemaType.cpp
clang/test/SemaOpenCL/address-spaces.cl
|