diff options
author | Mike Stump <mrs@apple.com> | 2009-02-27 03:16:57 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-02-27 03:16:57 +0000 |
commit | ee5e376e32dc57c3db486677fc3de152abd1de0f (patch) | |
tree | 77f0c017094da4ded8d1adf8f03d6353874c9894 /clang | |
parent | 4609dbe2228684205d556bf08b7fdfaed201aa7a (diff) | |
download | bcm5719-llvm-ee5e376e32dc57c3db486677fc3de152abd1de0f.tar.gz bcm5719-llvm-ee5e376e32dc57c3db486677fc3de152abd1de0f.zip |
The middle operand in ?: is optional, really.
llvm-svn: 65609
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index ed51fbaa68b..c0e8ad15e73 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -334,7 +334,7 @@ bool Expr::isUnusedResultAWarning(SourceLocation &Loc, SourceRange &R1, // The condition must be evaluated, but if either the LHS or RHS is a // warning, warn about them. const ConditionalOperator *Exp = cast<ConditionalOperator>(this); - if (Exp->getLHS()->isUnusedResultAWarning(Loc, R1, R2)) + if (Exp->getLHS() && Exp->getLHS()->isUnusedResultAWarning(Loc, R1, R2)) return true; return Exp->getRHS()->isUnusedResultAWarning(Loc, R1, R2); } |