================ @@ -4820,6 +4820,15 @@ bool CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) { const Expr *UnderlyingBaseExpr = E->IgnoreParens(); while (auto *BaseMemberExpr = dyn_cast<MemberExpr>(UnderlyingBaseExpr)) UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParens(); + // Workaround for old glibc's __PTR_ALIGN macro + // If the condition can be constant evaluated, we check the selected arm. + if (auto *Select = dyn_cast<ConditionalOperator>(UnderlyingBaseExpr)) { + if (auto *C = dyn_cast_if_present<llvm::Constant>( ---------------- efriedma-quic wrote:
EvaluateAsBooleanCondition, to ensure this is based on the AST. (tryEmitAbstract on a boolean is mostly the same thing these days, but not quite.) https://github.com/llvm/llvm-project/pull/137851 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits