Преглед изворни кода

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">;
                          DiagCategory<"#pragma message Directive">;
 def : DiagGroup<"pointer-to-int-cast">;
 def : DiagGroup<"pointer-to-int-cast">;
 def : DiagGroup<"redundant-decls">;
 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",
 def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
                                     [CXX98CompatBindToTemporaryCopy]>;
                                     [CXX98CompatBindToTemporaryCopy]>;
 def SelfAssignment : DiagGroup<"self-assign">;
 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>;
   "pass it by reference instead ?">, InGroup<LargeByValueCopy>;
 def warn_return_value_udt: Warning<
 def warn_return_value_udt: Warning<
   "%0 has C-linkage specified, but returns user-defined type %1 which is "
   "%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<
 def warn_implicit_function_decl : Warning<
   "implicit declaration of function %0">,
   "implicit declaration of function %0">,
   InGroup<ImplicitFunctionDeclare>, DefaultIgnore;
   InGroup<ImplicitFunctionDeclare>, DefaultIgnore;