[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue May 6 10:46:20 PDT 2025


================
@@ -2247,6 +2247,15 @@ bool BinaryOperator::isNullPointerArithmeticExtension(ASTContext &Ctx,
     return false;
   }
 
+  // Workaround for old glibc's __PTR_ALIGN macro
+  if (auto *Select = dyn_cast<ConditionalOperator>(PExp->IgnoreParenCasts())) {
----------------
efriedma-quic wrote:

IgnoreParenNoopCasts(), maybe?

https://github.com/llvm/llvm-project/pull/137851


More information about the cfe-commits mailing list