[PATCH] D133502: [ADT] Mark `llvm::array_lengthof` as deprecated
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 15:58:09 PDT 2022
MaskRay added a comment.
In D133502#3781560 <https://reviews.llvm.org/D133502#3781560>, @mstorsjo wrote:
> This produces a warning when built with GCC for every single source file that includes the header:
>
> ../include/llvm/Support/Compiler.h:145:35: warning: attribute ignored [-Wattributes]
> 145 | #define LLVM_DEPRECATED(MSG, FIX) [[deprecated(MSG)]]
> | ^
> ../include/llvm/ADT/STLArrayExtras.h:31:18: note: in expansion of macro ‘LLVM_DEPRECATED’
> 31 | constexpr inline LLVM_DEPRECATED("Use std::size instead.", "std::size") size_t
> | ^~~~~~~~~~~~~~~
> ../include/llvm/Support/Compiler.h:145:35: note: an attribute that appertains to a type-specifier is ignored
> 145 | #define LLVM_DEPRECATED(MSG, FIX) [[deprecated(MSG)]]
> | ^
> ../include/llvm/ADT/STLArrayExtras.h:31:18: note: in expansion of macro ‘LLVM_DEPRECATED’
> 31 | constexpr inline LLVM_DEPRECATED("Use std::size instead.", "std::size") size_t
> | ^~~~~~~~~~~~~~~
Should be fixed now. The placement before `Placement of LLVM_DEPRECATED matters` was actually correct for `[[deprecated(...)]]` :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133502/new/
https://reviews.llvm.org/D133502
More information about the llvm-commits
mailing list