diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-11-14 17:12:50 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-11-14 17:12:50 +0000 |
commit | c5d7201f3c6cf1415afd35ea8b6d97d664b9c629 (patch) | |
tree | 393aadc11559294c1dca25a649a4e533eebd8a44 /lib/Sema/SemaExpr.cpp | |
parent | 72ef63a1ba961a7d66a20a4dee481178995663ce (diff) |
[Sema]. Warn when logical expression is a pointer
which evaluates to true. rdar://18716393.
Reviewed by Richard Trieu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index de080117b4..dde3f3764f 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -12984,6 +12984,7 @@ ExprResult Sema::CheckBooleanCondition(Expr *E, SourceLocation Loc) { << T << E->getSourceRange(); return ExprError(); } + CheckBoolLikeConversion(E, Loc); } return E; |