[all-commits] [llvm/llvm-project] ece10a: Allow some attributes on declarations after defini...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Tue Apr 15 09:21:25 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ece10a64cb180ba931b60cbd939d80412973eada
https://github.com/llvm/llvm-project/commit/ece10a64cb180ba931b60cbd939d80412973eada
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2025-04-15 (Tue, 15 Apr 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaDecl.cpp
A clang/test/Sema/attr-decl-after-definition-std.c
Log Message:
-----------
Allow some attributes on declarations after definitions (#135791)
The deprecated, maybe_unused, and nodiscard standard attributes may all
be applied to a redeclaration after a definition has already appeared.
We were previously dropping the attribute in that case, now we retain
the attribute after the redeclaration.
Note: someday we may want to tablegen this as part of information from
Attr.td. We may also want to relax the restriction here so that the
syntax used does not matter. This is an intentionally conservative fix.
Fixes #135481
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list