LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 21226 - clang-query crashes when doing tab completion for dynamic matchers
Summary: clang-query crashes when doing tab completion for dynamic matchers
Status: RESOLVED FIXED
Alias: None
Product: clang-tools-extra
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC All
: P normal
Assignee: Samuel Benzaquen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-09 09:27 PDT by Manuel Klimek
Modified: 2014-10-09 17:10 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Klimek 2014-10-09 09:27:44 PDT
clang-query> m classTemplateSpecializationDecl(<tab>
clang-query: /usr/local/google/home/klimek/src/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:51: ast_type_traits::ASTNodeKind clang::ast_matchers::dynamic::ArgKind::getMatcherKind() const: Assertion `K == AK_Matcher' failed.
Comment 1 Samuel Benzaquen 2014-10-09 09:45:15 PDT
The overloads for isSameOrDerivedFrom break the assumption at Registry.cpp:441:
---
// This currently assumes that a matcher may not overload a
// non-matcher, and all non-matcher overloads have identical
// arguments.
---

isSameOrDerivedFrom() has an overload for Matcher<NamedDecl> and for StringRef.
Comment 2 Samuel Benzaquen 2014-10-09 17:10:24 PDT
Fixed at r219450