[PATCH] D68581: Include leading attributes in DeclStmt's SourceRange
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 9 10:37:09 PDT 2019
aaron.ballman added a comment.
I think this seems like reasonable behavior (for instance, we include the location of a storage class specifier already), but I am curious if @rsmith agrees.
> Is there a good way to write a test for this?
Yes, you can put an AST dumping test into the test\AST directory to check that you get expected source locations.
================
Comment at: clang/lib/Parse/ParseStmt.cpp:224
+ if (Attrs.Range.getBegin().isValid())
+ DeclStart = Attrs.Range.getBegin();
return Actions.ActOnDeclStmt(Decl, DeclStart, DeclEnd);
----------------
Indentation looks incorrect here.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68581/new/
https://reviews.llvm.org/D68581
More information about the cfe-commits
mailing list