Skip to content

Commit f951d6d

Browse files
committed
Return nullptr in mergeModularFormatAttr
1 parent ffc8742 commit f951d6d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6992,9 +6992,7 @@ Sema::mergeModularFormatAttr(Decl *D, const AttributeCommonInfo &CI,
69926992
Diag(Existing->getLocation(), diag::err_duplicate_attribute) << *Existing;
69936993
Diag(CI.getLoc(), diag::note_conflicting_attribute);
69946994
}
6995-
// Drop the existing attribute on the declaration in favor of the newly
6996-
// inherited one.
6997-
D->dropAttr<ModularFormatAttr>();
6995+
return nullptr;
69986996
}
69996997
return ::new (Context) ModularFormatAttr(Context, CI, ModularImplFn, ImplName,
70006998
Aspects.data(), Aspects.size());

0 commit comments

Comments
 (0)