[PATCH] D124081: [clang] Reject non-declaration C++11 attributes on declarations.
Martin Böhme via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 20 03:12:28 PDT 2022
mboehme created this revision.
Herald added a reviewer: aaron.ballman.
Herald added a project: All.
mboehme requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Clang has allowed this so far, transferring the attributes to the declaration's
type instead, as would be done for GNU syntax attributes. However, the C++
standard is clear that attributes in certain positions appertain to the
declaration, so we shouldn't allow type attributes in these positions.
For backwards compatibility, we only warn on non-declaration attributes that we
have historically allowed to be put on declarations. We only produce errors for
new non-declaration attributes.
Depends On D111548 <https://reviews.llvm.org/D111548>
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14741 bytes
Desc: not available
More information about the cfe-commits