]> granicus.if.org Git - clang/commitdiff
Hook up -Wunused-value to the unused expression warning. This is
authorEli Friedman <eli.friedman@gmail.com>
Mon, 20 Apr 2009 01:56:54 +0000 (01:56 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 20 Apr 2009 01:56:54 +0000 (01:56 +0000)
useful for macro-heavy codebases that tend to trigger this warning a
lot.

Note that a make clean is required to get the option working; the
dependencies for DiagnosticGroups.inc appear to be broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69564 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td

index b2f14633bf713aa8aafccf9135f5f3abf261d462..09624cfca7813d255f7b567fcbf92a200050eb70 100644 (file)
@@ -1289,7 +1289,8 @@ def err_typecheck_choose_expr_requires_constant : Error<
   "'__builtin_choose_expr' requires a constant expression">;
 def ext_typecheck_expression_not_constant_but_accepted : Extension<
   "expression is not a constant, but is accepted as one by GNU extensions">;
-def warn_unused_expr : Warning<"expression result unused">;
+def warn_unused_expr : Warning<"expression result unused">,
+  InGroup<UnusedValue>;
 
 // inline asm.
 def err_asm_wide_character : Error<"wide string is invalid in 'asm'">;