]> granicus.if.org Git - clang/commitdiff
Doug pointed out that we have a perfectly reasonable expression here to
authorJohn McCall <rjmccall@apple.com>
Sat, 10 Apr 2010 09:39:25 +0000 (09:39 +0000)
committerJohn McCall <rjmccall@apple.com>
Sat, 10 Apr 2010 09:39:25 +0000 (09:39 +0000)
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

lib/CodeGen/Mangle.cpp

index e9c9abb520d521ea54a34bf902cc17e42cb456fd..e4c3399a73d83a1cbaabadb8ddb9e3f4a03eca8a 100644 (file)
@@ -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;
   }