This is an archive of the discontinued LLVM Phabricator instance.

Let RecursiveASTVisitor visit array index VarDecls
ClosedPublic

Authored by thakis on Jan 21 2016, 9:53 AM.

Details

Reviewers
klimek
rsmith
Summary

An implicit copy ctor creates loop VarDecls that hang off CXXCtorInitializer. RecursiveASTVisitor used to not visit them, so that they didn't show up in the parent map used by ASTMatchers, causing asserts() when the implicit DeclRefExpr() in a CXXCtorInitializer referred to one of these VarDecls.

Fixes PR26227.

Diff Detail

Event Timeline

thakis updated this revision to Diff 45549.Jan 21 2016, 9:53 AM
thakis retitled this revision from to Let RecursiveASTVisitor visit array index VarDecls.
thakis updated this object.
thakis added reviewers: rsmith, klimek.
thakis added a subscriber: cfe-commits.
thakis updated this revision to Diff 45551.Jan 21 2016, 9:54 AM

fix test name

klimek accepted this revision.Jan 22 2016, 3:22 AM
klimek edited edge metadata.

LG.
I'd probably add a test to unittests/Tooling/RecursiveASTVisitorTest.cpp.

This revision is now accepted and ready to land.Jan 22 2016, 3:22 AM
thakis closed this revision.Jan 22 2016, 7:16 AM

r258503, thanks! (with the extra test)