diff options
author | John McCall <rjmccall@apple.com> | 2010-04-10 09:39:25 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-04-10 09:39:25 +0000 |
commit | e2f3524f83dbde06ddce0fb62236e96e28789dbd (patch) | |
tree | 1e5f51099211a6295e84d85c271a8a8115dc302a /clang/lib/CodeGen/Mangle.cpp | |
parent | 23eebd9c1ee86e29efc84eccca21880993e8ce8e (diff) | |
download | bcm5719-llvm-e2f3524f83dbde06ddce0fb62236e96e28789dbd.tar.gz bcm5719-llvm-e2f3524f83dbde06ddce0fb62236e96e28789dbd.zip |
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.
llvm-svn: 100924
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index e9c9abb520d..e4c3399a73d 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/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; } |