]> granicus.if.org Git - clang/commitdiff
Putting unevaluated expression warnings, and evaluated typeid warnings, under their...
authorAaron Ballman <aaron@aaronballman.com>
Fri, 19 Dec 2014 14:56:49 +0000 (14:56 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 19 Dec 2014 14:56:49 +0000 (14:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224578 91177308-0d34-0410-b5e6-96231b3b80d8

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

index fec8ef12d46cc00dc3d89606439f66490a221661..aba17c5b97089fde02eb673e0b9561281505dff4 100644 (file)
@@ -409,7 +409,11 @@ def UnusedMemberFunction : DiagGroup<"unused-member-function",
 def UnusedLabel : DiagGroup<"unused-label">;
 def UnusedParameter : DiagGroup<"unused-parameter">;
 def UnusedResult : DiagGroup<"unused-result">;
-def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult]>;
+def PotentiallyEvaluatedExpression : DiagGroup<"potentially-evaluated-expression">;
+def UnevaluatedExpression : DiagGroup<"unevaluated-expression",
+                                      [PotentiallyEvaluatedExpression]>;
+def UnusedValue : DiagGroup<"unused-value", [UnusedComparison, UnusedResult,
+                                             UnevaluatedExpression]>;
 def UnusedConstVariable : DiagGroup<"unused-const-variable">;
 def UnusedVariable : DiagGroup<"unused-variable",
                                [UnusedConstVariable]>;
index dadf3756d8b28b3d57880fbd56f9ad3ee7099758..f3af9df8d1b7018adf9021f6688de38eba35ad26 100644 (file)
@@ -6110,10 +6110,10 @@ def warn_unused_call : Warning<
   InGroup<UnusedValue>;
 def warn_side_effects_unevaluated_context : Warning<
   "expression with side effects has no effect in an unevaluated context">,
-  InGroup<UnusedValue>;
+  InGroup<UnevaluatedExpression>;
 def warn_side_effects_typeid : Warning<
   "expression with side effects will be evaluated despite being used as an "
-  "operand to 'typeid'">, InGroup<UnusedValue>;
+  "operand to 'typeid'">, InGroup<PotentiallyEvaluatedExpression>;
 def warn_unused_result : Warning<
   "ignoring return value of function declared with warn_unused_result "
   "attribute">, InGroup<DiagGroup<"unused-result">>;