r224578 - Putting unevaluated expression warnings, and evaluated typeid warnings, under their own warning flags. Amends r224465.

Aaron Ballman aaron at aaronballman.com
Fri Dec 19 06:56:49 PST 2014


Author: aaronballman
Date: Fri Dec 19 08:56:49 2014
New Revision: 224578

URL: http://llvm.org/viewvc/llvm-project?rev=224578&view=rev
Log:
Putting unevaluated expression warnings, and evaluated typeid warnings, under their own warning flags. Amends r224465.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=224578&r1=224577&r2=224578&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Fri Dec 19 08:56:49 2014
@@ -409,7 +409,11 @@ def UnusedMemberFunction : DiagGroup<"un
 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]>;

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=224578&r1=224577&r2=224578&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Dec 19 08:56:49 2014
@@ -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">>;





More information about the cfe-commits mailing list