diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-15 23:10:19 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-15 23:10:19 +0000 |
commit | ffce2df6ae280d354d51371282a579df1eb86876 (patch) | |
tree | e3a499d53e8bb1e8a9615d3a394758def2792b64 /lib/AST/Expr.cpp | |
parent | 74d4b127d9f924ad354f47012e0d0e42ab1ee32b (diff) |
Basic support for member exprs where the base expr type is dependent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 0d38dd2cd1..9a860033df 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -417,6 +417,11 @@ Stmt *BlockExpr::getBody() { /// warning. bool Expr::isUnusedResultAWarning(SourceLocation &Loc, SourceRange &R1, SourceRange &R2) const { + // Don't warn if the expr is type dependent. The type could end up + // instantiating to void. + if (isTypeDependent()) + return false; + switch (getStmtClass()) { default: Loc = getExprLoc(); |