summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTDiagnostic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ASTDiagnostic.cpp')
-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