This is an archive of the discontinued LLVM Phabricator instance.

[AST] add parenthesis locations for IfStmt and SwitchStmt
ClosedPublic

Authored by zequanwu on Aug 10 2020, 4:31 PM.

Diff Detail

Event Timeline

zequanwu created this revision.Aug 10 2020, 4:31 PM
Herald added a project: Restricted Project. · View Herald Transcript
zequanwu requested review of this revision.Aug 10 2020, 4:31 PM
zequanwu updated this revision to Diff 284532.Aug 10 2020, 5:08 PM

Forgot changes on ASTReaderStmt.cpp, added now.

rsmith accepted this revision.Aug 10 2020, 6:20 PM

Only relatively trivial comments; please feel free to commit once they're addressed.

clang/include/clang/Sema/Sema.h
4382–4394

Generally we put the parameters to the ActOn* functions in syntactic order, so LParenLoc should precede InitStmt in each of the above functions.

clang/lib/Sema/SemaDeclCXX.cpp
8028–8029

This code is generally using Loc as the location of all of its components. Perhaps we should do the same for the location of the parentheses?

8180

Likewise here.

This revision is now accepted and ready to land.Aug 10 2020, 6:20 PM
zequanwu updated this revision to Diff 284557.Aug 10 2020, 7:18 PM
zequanwu marked 3 inline comments as done.

Address comments.

This revision was landed with ongoing or failed builds.Aug 10 2020, 7:20 PM
This revision was automatically updated to reflect the committed changes.