aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-10 09:39:25 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-10 09:39:25 +0000
commit739bf09fc6c7e34a86f1b049b44e58a4718dd348 (patch)
treeb68356bac31accf92d8716338f01c852faecbebb /lib/CodeGen/Mangle.cpp
parent3c3ccdbe73cb43bdf39a9102f5f7eb842fb71952 (diff)
Doug pointed out that we have a perfectly reasonable expression here to
serve as a source of source locations for the can't-yet-mangle diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r--lib/CodeGen/Mangle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index e9c9abb520..e4c3399a73 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -1292,8 +1292,10 @@ void CXXNameMangler::mangleExpression(const Expr *E) {
Diagnostic &Diags = Context.getDiags();
unsigned DiagID = Diags.getCustomDiagID(Diagnostic::Error,
"cannot yet mangle expression type %0");
- Diags.Report(FullSourceLoc(), DiagID)
- << E->getStmtClassName();
+ Diags.Report(FullSourceLoc(E->getExprLoc(),
+ getASTContext().getSourceManager()),
+ DiagID)
+ << E->getStmtClassName() << E->getSourceRange();
break;
}