diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 421ca95bb543..506af5d1458c 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -15219,10 +15219,6 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) { // Add known guaranteed alignment for allocation functions. switch (BuiltinID) { case Builtin::BIaligned_alloc: - if (!FD->hasAttr()) - FD->addAttr(AllocAlignAttr::CreateImplicit(Context, ParamIdx(1, FD), - FD->getLocation())); - LLVM_FALLTHROUGH; case Builtin::BIcalloc: case Builtin::BImalloc: case Builtin::BImemalign: