From ca13f2dd253219de2333f846b9e25fa589521e6f Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 24 Apr 2016 02:08:22 +0000 Subject: [PATCH] Fix a couple assertions that can never fire because the condition ANDed with the string is just true or 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267313 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/Rewrite/RewriteModernObjC.cpp | 2 +- lib/Frontend/Rewrite/RewriteObjC.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Frontend/Rewrite/RewriteModernObjC.cpp b/lib/Frontend/Rewrite/RewriteModernObjC.cpp index 91e57753b7..1df73ef9cd 100644 --- a/lib/Frontend/Rewrite/RewriteModernObjC.cpp +++ b/lib/Frontend/Rewrite/RewriteModernObjC.cpp @@ -4640,7 +4640,7 @@ Stmt *RewriteModernObjC::SynthesizeBlockCall(CallExpr *Exp, const Expr *BlockExp = dyn_cast(BlockExp)) { CPT = POE->getType()->castAs(); } else { - assert(1 && "RewriteBlockClass: Bad type"); + assert(false && "RewriteBlockClass: Bad type"); } assert(CPT && "RewriteBlockClass: Bad type"); const FunctionType *FT = CPT->getPointeeType()->getAs(); diff --git a/lib/Frontend/Rewrite/RewriteObjC.cpp b/lib/Frontend/Rewrite/RewriteObjC.cpp index 3508ec4303..48c31b0314 100644 --- a/lib/Frontend/Rewrite/RewriteObjC.cpp +++ b/lib/Frontend/Rewrite/RewriteObjC.cpp @@ -3748,7 +3748,7 @@ Stmt *RewriteObjC::SynthesizeBlockCall(CallExpr *Exp, const Expr *BlockExp) { = dyn_cast(BlockExp)) { CPT = POE->getType()->castAs(); } else { - assert(1 && "RewriteBlockClass: Bad type"); + assert(false && "RewriteBlockClass: Bad type"); } assert(CPT && "RewriteBlockClass: Bad type"); const FunctionType *FT = CPT->getPointeeType()->getAs(); -- 2.40.0