https://llvm.org/bugs/show_bug.cgi?id=26227
Bug ID: 26227 Summary: hasAncestor matcher crashes on certain constructs Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: dch...@google.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified We hit this assert when we were testing a tool to automatically rename things: $ third_party/llvm-build/Release+Asserts/bin/rewrite_to_chrome_style test.cc Error while trying to load a compilation database: Could not auto-detect compilation database for file "test.cc" No compilation database found in /usr/local/google/home/dcheng/src/chrome/src or any parent directory json-compilation-database: Error while opening JSON database: No such file or directory Running without flags. rewrite_to_chrome_style: /usr/local/google/ssd/src/chrome/src/third_party/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp:637: bool clang::ast_matchers::internal::{anonymous}::MatchASTVisitor::memoizedMatchesAncestorOfRecursively(const clang::ast_type_traits::DynTypedNode&, const clang::ast_matchers::internal::DynTypedMatcher&, clang::ast_matchers::internal::BoundNodesTreeBuilder*, clang::ast_matchers::internal::ASTMatchFinder::AncestorMatchMode): Assertion `!Parents.empty() && "Found node that is not in the parent map."' failed. Aborted (core dumped) The reduced repro from danakj@: $ cat test.cc class MyClass { int c[1]; public: static MyClass Create() { return MyClass(); } }; >From our debugging, it looks like the assert occurs when trying to match ancestors of the initializer in the compiler-generated move ctor. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs