felipeprov / include-what-you-use

Automatically exported from code.google.com/p/include-what-you-use
Other
0 stars 0 forks source link

Tests fail due to unused value warnings from Clang #78

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ./run_iwyu_tests.py badinc

What is the expected output? What do you see instead?

Expected: Test should pass.
Actual:
  AssertionError:
  tests/badinc.cc:1164: Unexpected diagnostic:
  expression result unused [-Wunused-value]

  tests/badinc.cc:1541: Unexpected diagnostic:
  expression result unused [-Wunused-value]

I don't think this warning is useful for IWYU tests. The attached patch 
disables the warning whenever IWYU is invoked.

Original issue reported on code.google.com by kim.gras...@gmail.com on 5 Aug 2012 at 3:07

Attachments:

GoogleCodeExporter commented 8 years ago
To fix unused variable warnings is used (void). I think the same approach 
should be used for unused values. Corresponding patch is attached. Please, 
check if it fixes the problem for you.

Original comment by vsap...@gmail.com on 19 Aug 2012 at 5:39

Attachments:

GoogleCodeExporter commented 8 years ago
Yes, same end result, the warnings are gone. Thank you!

Original comment by kim.gras...@gmail.com on 19 Aug 2012 at 7:26

GoogleCodeExporter commented 8 years ago
Fixed in r370.

Original comment by vsap...@gmail.com on 19 Aug 2012 at 10:05