You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bindings enclosed within a hasAnyBase() expression don't work. Fortunately, isDerivedFrom() does work. The issue appears in both clang-query and in matchers built as a Clang plugin.
Given the sample program:
class B {};
class D: public B {};
The matcher
m cxxRecordDecl(hasAnyBase(hasType(cxxRecordDecl(hasName("B")).bind("b"))))
causes clang-query to return
Match #1:
C:\ast\clang_ast_bug_1.cpp:3:1: note: "root" binds here
class C: public B {};
^~~~~~~~~~~~~~~~~~~~
1 match.
But the query
m cxxRecordDecl(isDerivedFrom(cxxRecordDecl(hasName("B")).bind("b")))
produces:
Match #1:
C:\ast\clang_ast_bug_1.cpp:1:1: note: "b" binds here
class B {};
^~~~~~~~~~
C:\ast\clang_ast_bug_1.cpp:3:1: note: "root" binds here
class C: public B {};
^~~~~~~~~~~~~~~~~~~~
1 match.
I am using Clang v.16.0.4, which I believe Mozilla built.
The text was updated successfully, but these errors were encountered:
The BoundNodesTreeBuilder used in the BaseSpecMatcher was the original
and was reset to its original state if a match occurred.
The matcher now uses the local copy in the inner matcher.
Fixesllvm#65421
The BoundNodesTreeBuilder used in the BaseSpecMatcher was the original
and was reset to its original state if a match occurred.
The matcher now uses the local copy in the inner matcher.
Fixes#65421
Uh oh!
There was an error while loading. Please reload this page.
Bindings enclosed within a
hasAnyBase()
expression don't work. Fortunately,isDerivedFrom()
does work. The issue appears in bothclang-query
and in matchers built as a Clang plugin.Given the sample program:
The matcher
causes clang-query to return
But the query
produces:
I am using Clang v.16.0.4, which I believe Mozilla built.
The text was updated successfully, but these errors were encountered: