@@ -133,21 +133,23 @@ jobs:
133133
134134 cat << 'EOF' > query.txt
135135 set output dump
136- match invocation(
137- isExpansionInFileMatching("SerialPrograms/"),
138- hasDeclaration(cxxConstructorDecl(ofClass(hasName("std::filesystem::path")))),
139- hasArgument(0, hasType(asString("std::string")))
140- )
141- match cxxConstructExpr(
142- isExpansionInFileMatching("SerialPrograms/"),
143- hasDeclaration(cxxConstructorDecl(ofClass(hasName("ImageViewRGB32")))),
144- hasArgument(0, hasType(rValueReferenceType(pointee(hasType(hasName("VideoSnapshot")))))),
145- unless(hasAncestor(functionDecl(isInline())))
136+ match anyOf(
137+ invocation(
138+ isExpansionInFileMatching("SerialPrograms/"),
139+ hasDeclaration(cxxConstructorDecl(ofClass(hasName("std::filesystem::path")))),
140+ hasArgument(0, hasType(asString("std::string")))
141+ ),
142+ cxxConstructExpr(
143+ isExpansionInFileMatching("SerialPrograms/"),
144+ hasDeclaration(cxxConstructorDecl(ofClass(hasName("ImageViewRGB32")))),
145+ hasArgument(0, hasType(rValueReferenceType(pointee(hasType(hasName("VideoSnapshot")))))),
146+ unless(hasAncestor(functionDecl(isInline())))
147+ )
146148 )
147149 EOF
148150
149151 files=$(jq -r '.[].file' SerialPrograms/bin/compile_commands.json)
150- echo "$files" | xargs --max-args=50 clang-query -p SerialPrograms/bin/ -f query.txt >> output.txt || true
152+ echo "$files" | xargs --max-args=50 clang-query -p SerialPrograms/bin/ -f query.txt >> output.txt
151153 cat output.txt
152154 if grep "Match #" output.txt; then
153155 echo "::error Forbidden code detected. It can be"
0 commit comments