Let RecursiveASTVisitor visit array index VarDecls
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. http://reviews.llvm.org/D16413 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258503 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/RecursiveASTVisitor.h 4 additions, 0 deletionsinclude/clang/AST/RecursiveASTVisitor.h
- unittests/ASTMatchers/ASTMatchersTest.cpp 8 additions, 0 deletionsunittests/ASTMatchers/ASTMatchersTest.cpp
- unittests/Tooling/RecursiveASTVisitorTest.cpp 19 additions, 0 deletionsunittests/Tooling/RecursiveASTVisitorTest.cpp
Loading
Please register or sign in to comment