[llvm-bugs] [Bug 38318] New: ast_matchers::findAll does not work with elements of different type to root
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 25 14:54:49 PDT 2018
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: unassignedclangbugs at nondot.org
Reporter: steveire at gmail.com
CC: klimek at google.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180725/a83569ea/attachment-0001.html>
More information about the llvm-bugs
mailing list