================
@@ -4630,6 +4630,29 @@ void CodeGenFunction::EmitReturnValueCheck(llvm::Value
*RV) {
if (ReturnBlock.isValid() && ReturnBlock.getBlock()->use_empty())
return;
+ if (SanOpts.has(SanitizerKind::Alignment)) {
+ if (const AllocAlignAttr *AA = CurCodeDecl->getAttr<AllocAlignAttr>()) {
+ if (isa<FunctionDecl>(CurCodeDecl)) {
----------------
rnk wrote:
Any reason why the alloc_align attribute can't apply to ObjC method decls or
Blocks? Those are the non-FunctionDecl code constructs I can remember, but
there might a couple others. It's probably easiest to construct a test using C
and `-fblocks`, although normally we don't usually bother to test each and
every IRGen feature with non-FunctionDecl code constructs.
https://github.com/llvm/llvm-project/pull/239729
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits