#include "SourceCode.h"
#include "support/Logger.h"
#include "support/Trace.h"
+#include "clang/AST/ExprCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/HeaderSearch.h"
return true;
}
+ // When the overload is not resolved yet, mark all candidates as used.
+ bool VisitOverloadExpr(OverloadExpr *E) {
+ for (const auto *ResolutionDecl : E->decls())
+ add(ResolutionDecl);
+ return true;
+ }
+
private:
using Base = RecursiveASTVisitor<ReferencedLocationCrawler>;
"inline void ^foo() {}",
"void bar() { foo(); }",
},
+ {
+ "int ^foo(char); int ^foo(float);",
+ "template<class T> int x = foo(T{});",
+ },
// Static function
{
"struct ^X { static bool ^foo(); }; bool X::^foo() {}",