]> granicus.if.org Git - clang/commitdiff
Emit a lame diagnostic when we can't mangle operator names
authorDouglas Gregor <dgregor@apple.com>
Fri, 23 Apr 2010 03:19:53 +0000 (03:19 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 23 Apr 2010 03:19:53 +0000 (03:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102168 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/Mangle.cpp

index 168231277321b02a67fc1aee09c6a1c704448ad7..9dc3e2cf87b95a9766d4bbddbe0eaaab76740d6a 100644 (file)
@@ -767,7 +767,11 @@ void CXXNameMangler::mangleTemplatePrefix(TemplateName Template) {
   if (Dependent->isIdentifier())
     mangleSourceName(Dependent->getIdentifier());
   else {
-    // FIXME: We can't possibly know the arity for mangling operators!
+    // FIXME: We can't possibly know the arity of the operator here!
+    Diagnostic &Diags = Context.getDiags();
+    unsigned DiagID = Diags.getCustomDiagID(Diagnostic::Error,
+                                 "cannot mangle dependent operator name");
+    Diags.Report(FullSourceLoc(), DiagID);
   }
 }