diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index c7fb5e8466686..96ae1f58ef4a6 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -4107,11 +4107,8 @@ template bool Compiler::visitBool(const Expr *E) { return true; // Convert pointers to bool. - if (T == PT_Ptr) { - if (!this->emitNull(*T, 0, nullptr, E)) - return false; - return this->emitNE(*T, E); - } + if (T == PT_Ptr) + return this->emitIsNonNullPtr(E); // Or Floats. if (T == PT_Float)