[PATCH] Fix DeclRefExpr::getFoundDecl() for non-call references.
Richard Smith
richard at metafoo.co.uk
Wed Mar 20 13:28:10 PDT 2013
A test for this would be great (the found decl is included in the output of -ast-dump, so you could test that).
================
Comment at: lib/Sema/SemaExpr.cpp:2363-2364
@@ -2362,4 +2362,4 @@
if (!NeedsADL && R.isSingleResult() && !R.getAsSingle<FunctionTemplateDecl>())
- return BuildDeclarationNameExpr(SS, R.getLookupNameInfo(),
- R.getFoundDecl());
+ return BuildDeclarationNameExpr(SS, R.getLookupNameInfo(), R.getFoundDecl(),
+ R.getRepresentativeDecl());
----------------
These arguments appear to be reversed from the declaration of BuildDeclarationNameExpr. Is that intentional?
http://llvm-reviews.chandlerc.com/D550
More information about the cfe-commits
mailing list