aboutsummaryrefslogtreecommitdiff
path: root/lib/ASTMatchers
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-12-12 21:50:55 +0000
committerEric Fiselier <eric@efcs.ca>2018-12-12 21:50:55 +0000
commitf89e5ce8508a67f732e550b8313fa7d2f889ee3f (patch)
tree48b0454b27727986397a0928e677f623fe9ebd26 /lib/ASTMatchers
parent58419897ad2cb6c4a572a0a03705a462e3b07a08 (diff)
[AST] Store "UsesADL" information in CallExpr.
Summary: Currently the Clang AST doesn't store information about how the callee of a CallExpr was found. Specifically if it was found using ADL. However, this information is invaluable to tooling. Consider a tool which renames usages of a function. If the originally CallExpr was formed using ADL, then the tooling may need to additionally qualify the replacement. Without information about how the callee was found, the tooling is left scratching it's head. Additionally, we want to be able to match ADL calls as quickly as possible, which means avoiding computing the answer on the fly. This patch changes `CallExpr` to store whether it's callee was found using ADL. It does not change the size of any AST nodes. Reviewers: fowles, rsmith, klimek, shafik Reviewed By: rsmith Subscribers: aaron.ballman, riccibruno, calabrese, titus, cfe-commits Differential Revision: https://reviews.llvm.org/D55534 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ASTMatchers')
-rw-r--r--lib/ASTMatchers/Dynamic/Registry.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ASTMatchers/Dynamic/Registry.cpp b/lib/ASTMatchers/Dynamic/Registry.cpp
index 3ed189a524..edebb5c43a 100644
--- a/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/lib/ASTMatchers/Dynamic/Registry.cpp
@@ -493,6 +493,7 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(unresolvedUsingTypenameDecl);
REGISTER_MATCHER(unresolvedUsingValueDecl);
REGISTER_MATCHER(userDefinedLiteral);
+ REGISTER_MATCHER(usesADL);
REGISTER_MATCHER(usingDecl);
REGISTER_MATCHER(usingDirectiveDecl);
REGISTER_MATCHER(valueDecl);