[llvm-branch-commits] [clang] [compiler-rt] clang: also check alloc_align and assume_aligned claims in return (PR #239729)

Reid Kleckner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Nov 12 20:21:52 PST 2026


================
@@ -698,7 +698,11 @@ void CodeGenFunction::markAsIgnoreThreadCheckingAtRuntime(llvm::Function *Fn) {
 bool CodeGenFunction::requiresReturnValueCheck() const {
   return requiresReturnValueNullabilityCheck() ||
          (SanOpts.has(SanitizerKind::ReturnsNonnullAttribute) && CurCodeDecl &&
-          CurCodeDecl->getAttr<ReturnsNonNullAttr>());
+          CurCodeDecl->getAttr<ReturnsNonNullAttr>()) ||
+         (SanOpts.has(SanitizerKind::Alignment) && CurCodeDecl &&
+          ((isa<FunctionDecl>(CurCodeDecl) &&
----------------
rnk wrote:

This FunctionDecl only serves to match the other condition, which I don't think we need.

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


More information about the llvm-branch-commits mailing list