[PATCH] D133502: [ADT] Mark `llvm::array_lengthof` as deprecated
Joe Loser via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 16:02:01 PDT 2022
jloser added a comment.
In D133502#3781664 <https://reviews.llvm.org/D133502#3781664>, @MaskRay wrote:
> 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(...)]]` :)
Thanks for the quick fix, @MaskRay — I appreciate it. By the way, the extra includes for `STLArrayExtras.h` in the LLVM tree is addressed with https://reviews.llvm.org/D133600
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