https://bugs.llvm.org/show_bug.cgi?id=38318

            Bug ID: 38318
           Summary: ast_matchers::findAll does not work with elements of
                    different type to root
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: libclang
          Assignee: unassignedclangb...@nondot.org
          Reporter: steve...@gmail.com
                CC: kli...@google.com, llvm-bugs@lists.llvm.org

We should be able to do something like 

 Decl* someRootDeclContext = ...;

 clang::ast_matchers::match(
   decl(findAll(callExpr()))
   , *someRootDeclContext, *Result.Context);

However, that does not work because findAll is implemented with eachOf and 

   decl(eachOf(callExpr(), expr()))

doesn't work for the same reason

   decl(callExpr())

doesn't work - a decl is never a callExpr.

findAll should be changed to account for this use-case.

-- 
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

Reply via email to