aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2012-10-23 06:15:26 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2012-10-23 06:15:26 +0000
commit84c3b9745f813a784b5d8ce77f2785750523d9eb (patch)
tree8350c405c179682d59925b5a5800c6e353078697 /lib
parent28f3a0e49132038be9c4c683338859ed03e94263 (diff)
Fix -Wunused-value to not warn on expressions that have unresolved lookups due
to dependent arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/Expr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 694325af22..3c8cbb56a0 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1950,6 +1950,11 @@ bool Expr::isUnusedResultAWarning(const Expr *&WarnE, SourceLocation &Loc,
return false;
}
+ // If we don't know precisely what we're looking at, let's not warn.
+ case UnresolvedLookupExprClass:
+ case CXXUnresolvedConstructExprClass:
+ return false;
+
case CXXTemporaryObjectExprClass:
case CXXConstructExprClass:
return false;