changeset 74:d33e24fd01df

remove diagnosis definition
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Sun, 04 May 2014 00:31:16 +0900
parents a3c5e73c970d
children 90677c4a880a
files tools/clang/include/clang/Basic/DiagnosticParseKinds.td tools/clang/lib/CodeGen/CGCall.cpp tools/clang/lib/Parse/ParseCbC.cpp tools/clang/lib/Parse/ParseStmt.cpp
diffstat 4 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tools/clang/include/clang/Basic/DiagnosticParseKinds.td	Wed Mar 05 08:58:40 2014 +0900
+++ b/tools/clang/include/clang/Basic/DiagnosticParseKinds.td	Sun May 04 00:31:16 2014 +0900
@@ -860,10 +860,6 @@
 def err_omp_more_one_clause : Error <
   "directive '#pragma omp %0' cannot contain more than one '%1' clause">;
 
-// noCbC (We cannot use #ifndef in this file. It is for a check)
-def err_expected_ident_or_cs : Error<"expected identifier or codesegment call">;
-def err_cannot_use_goto_with_env : Error<"continuation with the environment cannot use in the void function">;
-// noCbC end
 } // end of Parse Issue category.
 
 let CategoryName = "Modules Issue" in {
--- a/tools/clang/lib/CodeGen/CGCall.cpp	Wed Mar 05 08:58:40 2014 +0900
+++ b/tools/clang/lib/CodeGen/CGCall.cpp	Sun May 04 00:31:16 2014 +0900
@@ -452,6 +452,8 @@
   if(resultType.getTypePtr()->is__CodeType()){
     if(!required.allowsOptionalArgs()) // If the code segment is a variadic function , LLVM can't do TCE.
       CC = llvm::CallingConv::Fast;
+    else { // emit warning
+    }
   }
 #endif
 
--- a/tools/clang/lib/Parse/ParseCbC.cpp	Wed Mar 05 08:58:40 2014 +0900
+++ b/tools/clang/lib/Parse/ParseCbC.cpp	Sun May 04 00:31:16 2014 +0900
@@ -106,7 +106,8 @@
 
   // create code segment for return to C's function
   if (CreateRetCS(retcsII)) { // error check : function type is void or not.
-    Diag(Tok, diag::err_cannot_use_goto_with_env);
+    unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, "continuation with the environment cannot use in the void function");
+    Diag(Tok, DiagID);
     return ExprError();
   }
     
--- a/tools/clang/lib/Parse/ParseStmt.cpp	Wed Mar 05 08:58:40 2014 +0900
+++ b/tools/clang/lib/Parse/ParseStmt.cpp	Sun May 04 00:31:16 2014 +0900
@@ -1711,7 +1711,8 @@
   if (gotoRes.get() == NULL)
     return StmtError();
   else if (gotoRes.get()->getStmtClass() != Stmt::CallExprClass) { // if it is not function call
-    Diag(TokAfterGoto, diag::err_expected_ident_or_cs);
+    unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, "expected identifier or codesegment call");
+    Diag(TokAfterGoto, DiagID);
     return StmtError();
   }