[cfe-commits] r57220 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def lib/Sema/SemaExprCXX.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Mon Oct 6 16:16:36 PDT 2008


Author: akirtzidis
Date: Mon Oct  6 18:16:35 2008
New Revision: 57220

URL: http://llvm.org/viewvc/llvm-project?rev=57220&view=rev
Log:
Use getCustomDiagID() instead of specifying the diagnostic in the 'DiagnosticKinds.def' file.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticKinds.def
    cfe/trunk/lib/Sema/SemaExprCXX.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticKinds.def?rev=57220&r1=57219&r2=57220&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticKinds.def (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticKinds.def Mon Oct  6 18:16:35 2008
@@ -1022,9 +1022,6 @@
      "initializer of a builtin type can only take one argument")
 DIAG(err_value_init_for_array_type, ERROR,
      "array types cannot be value-initialized")
-// Temporary
-DIAG(err_unsupported_class_constructor, ERROR,
-     "class constructors are not supported yet")
 DIAG(err_invalid_use_of_function_type, ERROR,
      "a function type is not allowed here")
 DIAG(err_invalid_use_of_array_type, ERROR,

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=57220&r1=57219&r2=57220&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Mon Oct  6 18:16:35 2008
@@ -15,6 +15,7 @@
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/Parse/DeclSpec.h"
+#include "clang/Lex/Preprocessor.h"
 #include "clang/Basic/Diagnostic.h"
 using namespace clang;
 
@@ -95,8 +96,9 @@
       return Diag(TyBeginLoc, diag::err_invalid_incomplete_type_use,
                   Ty.getAsString(), FullRange);
 
-    // "class constructors are not supported yet"
-    return Diag(TyBeginLoc, diag::err_unsupported_class_constructor, FullRange);
+    unsigned DiagID = PP.getDiagnostics().getCustomDiagID(Diagnostic::Error,
+                                    "class constructors are not supported yet");
+    return Diag(TyBeginLoc, DiagID);
   }
 
   // C++ 5.2.3p1:





More information about the cfe-commits mailing list