summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-07-22 04:06:54 +0000
committerRichard Trieu <rtrieu@google.com>2014-07-22 04:06:54 +0000
commit63056c391842ebf9a9d82caab7b9ef13d15529e2 (patch)
tree41159e4b4b4f883216f28b031d53bc1c7f42f831 /clang/lib/AST
parent2fc9a2b8eb7cc766e96fba89be7e0fea5eef0a77 (diff)
downloadbcm5719-llvm-63056c391842ebf9a9d82caab7b9ef13d15529e2.tar.gz
bcm5719-llvm-63056c391842ebf9a9d82caab7b9ef13d15529e2.zip
More gracefully handle parentheses in templare arguments in template diffing.
llvm-svn: 213611
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTDiagnostic.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTDiagnostic.cpp b/clang/lib/AST/ASTDiagnostic.cpp
index 15e288acb9a..20540f3ce12 100644
--- a/clang/lib/AST/ASTDiagnostic.cpp
+++ b/clang/lib/AST/ASTDiagnostic.cpp
@@ -1184,7 +1184,8 @@ class TemplateDiff {
}
DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(ArgExpr);
if (!DRE) {
- DRE = cast<DeclRefExpr>(cast<UnaryOperator>(ArgExpr)->getSubExpr());
+ DRE = cast<DeclRefExpr>(
+ cast<UnaryOperator>(ArgExpr->IgnoreParens())->getSubExpr());
}
return DRE->getDecl();
OpenPOWER on IntegriCloud