]> granicus.if.org Git - clang/commitdiff
Add a subgroup of -Wreturn-type, -Wreturn-type-c-linkage.
authorMatt Beaumont-Gay <matthewbg@google.com>
Mon, 13 Feb 2012 22:04:08 +0000 (22:04 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Mon, 13 Feb 2012 22:04:08 +0000 (22:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150418 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td

index 8c821c9657c7b6178ab8ee584540bd549cf9f909..5d07e5c072f9313fa5a667f7d524cc9145d5797f 100644 (file)
@@ -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">;
index 87f7281b92dc2f361b3da1025d31cb03faabe47f..f99021200f69088858b09a8113938f5f83df9e93 100644 (file)
@@ -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;