| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
for unused values.
This fixes a regression caused by r298676, where constructor calls to
classes with non-trivial dtor were marked as unused if the first
argument is an initializer list. This is inconsistent (as the test
shows) and also warns on a reasonbly common code pattern where people
just call constructors to create and immediately destroy an object.
llvm-svn: 298853
|
|
|
|
|
|
| |
24 tests have been updated for C++11 compatibility.
llvm-svn: 266387
|
|
|
|
|
|
|
|
|
|
|
| |
access through a volatile-qualified type, we're not certain of the underlying object's side-effects on access.
Treat volatile accesses as "maybe" instead of "definite" side effects for the purposes of warning on evaluations in an unevaluated context. No longer diagnose on idiomatic code like:
int * volatile v;
(void)sizeof(*v);
llvm-svn: 225116
|
|
|
|
|
|
| |
unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case.
llvm-svn: 224465
|
|
|
|
|
|
|
| |
Otherwise we'd accept them if the LinkageDecl was not the direct
parent DeclContext. PR17968.
llvm-svn: 200641
|
|
|
|
| |
llvm-svn: 186793
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
qualified name lookups into transparent contexts.
llvm-svn: 152739
|
|
|
|
|
|
|
|
| |
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
|
|
voids in sub-expressions. Patch by Mike M!
Fixes PR4806.
llvm-svn: 98335
|