Skip to content

Commit

Permalink
Fix a warning in CSDiag.
Browse files Browse the repository at this point in the history
The function return value is bool but we were returning a nullptr.
  • Loading branch information
nadavrot committed Nov 29, 2015
1 parent 63f4f08 commit 97a793b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Sema/CSDiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3860,9 +3860,9 @@ bool FailureDiagnosis::visitAssignExpr(AssignExpr *assignExpr) {
/// Return true if this type is known to be an ArrayType.
static bool isKnownToBeArrayType(Type ty) {
if (!ty) return false;

auto bgt = ty->getAs<BoundGenericType>();
if (!bgt) return nullptr;
if (!bgt) return false;

auto &ctx = bgt->getASTContext();
return bgt->getDecl() == ctx.getArrayDecl();
Expand Down

0 comments on commit 97a793b

Please sign in to comment.