Commit Graph

4 Commits

Author SHA1 Message Date
Eli Friedman c11535c248 Add a warning to diagnose statements in C++ like "*(volatile int*)x;". Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn't get turned off by accident with -Wno-unused-value. I also made a few minor improvements to existing unused value warnings in the process. <rdar://problem/11516811>.
llvm-svn: 157362
2012-05-24 00:47:05 +00:00
Nick Lewycky fcd5e7a160 When emitting a diagnostic about two-phase name lookup, don't do useless
qualified name lookups into transparent contexts.

llvm-svn: 152739
2012-03-14 20:41:00 +00:00
Matt Beaumont-Gay dcaacaa190 Fix a QoI bug with overloaded operators inside macros.
We were failing to set source locations and ranges in isUnusedResultAWarning
for CXXOperatorCallExprs, leading to an "expression result unused" warning
with absolutely no context if the expression was inside a macro.

llvm-svn: 140036
2011-09-19 18:51:20 +00:00
John McCall c493a73240 Improve the unused-value check to look into comma expressions and filter out
voids in sub-expressions.  Patch by Mike M!

Fixes PR4806.

llvm-svn: 98335
2010-03-12 07:11:26 +00:00