Skip to content

Commit

Permalink
Testing matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
rmrf committed Jan 28, 2020
1 parent 03b87b4 commit 5eda941
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/matchers/match-structural.cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ set output diag
# Match entry function
# 1. Find constructor
# 2. Find method with the name
# m cxxRecordDecl(isExpansionInMainFile(), isDerivedFrom(hasName("::sc_core::sc_module")), hasDescendant(cxxConstructorDecl().bind("constructor")))
m cxxRecordDecl(isExpansionInMainFile(), isDerivedFrom(hasName("::sc_core::sc_module")), hasDescendant(allOf(cxxConstructorDecl().bind("constructor"),cxxMethodDecl(equalsBoundNode("constructor")).bind("method"))) )
set output dump
#m cxxRecordDecl(isExpansionInMainFile(), isDerivedFrom(hasName("::sc_core::sc_module")) )
Expand All @@ -63,4 +64,5 @@ set output dump
#m cxxRecordDecl(forEachDescendant(fieldDecl(hasName("array_signal"))))
m cxxRecordDecl(isExpansionInMainFile(), forEachDescendant(fieldDecl(hasType(arrayType(hasElementType(hasDeclaration(cxxRecordDecl(hasName("sc_signal"))))).bind("array"))).bind("field")))
#m cxxRecordDecl(isExpansionInMainFile(), forEachDescendant(fieldDecl(hasType(arrayType(hasElementType(hasDeclaration(cxxRecordDecl(hasName("sc_signal"))))).bind("array"))).bind("field")))

0 comments on commit 5eda941

Please sign in to comment.