# HG changeset patch # User Kaito Tokumori # Date 1399131076 -32400 # Node ID d33e24fd01dfe5352902b9ab7d2b5c335f30071f # Parent a3c5e73c970dde7210f553a95a790567486a5dd1 remove diagnosis definition diff -r a3c5e73c970d -r d33e24fd01df tools/clang/include/clang/Basic/DiagnosticParseKinds.td --- 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 { diff -r a3c5e73c970d -r d33e24fd01df tools/clang/lib/CodeGen/CGCall.cpp --- 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 diff -r a3c5e73c970d -r d33e24fd01df tools/clang/lib/Parse/ParseCbC.cpp --- 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(); } diff -r a3c5e73c970d -r d33e24fd01df tools/clang/lib/Parse/ParseStmt.cpp --- 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(); }