瀏覽代碼

Add a subgroup of -Wreturn-type, -Wreturn-type-c-linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150418 91177308-0d34-0410-b5e6-96231b3b80d8
Matt Beaumont-Gay 13 年之前
父節點
當前提交
5ad3af90dd
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      include/clang/Basic/DiagnosticGroups.td
  2. 1 1
      include/clang/Basic/DiagnosticSemaKinds.td

+ 2 - 1
include/clang/Basic/DiagnosticGroups.td

@@ -142,7 +142,8 @@ def PoundPragmaMessage : DiagGroup<"#pragma-messages">,
                          DiagCategory<"#pragma message Directive">;
 def : DiagGroup<"pointer-to-int-cast">;
 def : DiagGroup<"redundant-decls">;
-def ReturnType : DiagGroup<"return-type">;
+def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
+def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
 def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
                                     [CXX98CompatBindToTemporaryCopy]>;
 def SelfAssignment : DiagGroup<"self-assign">;

+ 1 - 1
include/clang/Basic/DiagnosticSemaKinds.td

@@ -163,7 +163,7 @@ def warn_return_value_size: Warning<
   "pass it by reference instead ?">, InGroup<LargeByValueCopy>;
 def warn_return_value_udt: Warning<
   "%0 has C-linkage specified, but returns user-defined type %1 which is "
-  "incompatible with C">, InGroup<ReturnType>;
+  "incompatible with C">, InGroup<ReturnTypeCLinkage>;
 def warn_implicit_function_decl : Warning<
   "implicit declaration of function %0">,
   InGroup<ImplicitFunctionDeclare>, DefaultIgnore;