[PATCH] D149074: [NFC][clang] Fix Coverity bugs with AUTO_CAUSES_COPY
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 24 12:08:05 PDT 2023
Manna added inline comments.
================
Comment at: clang/utils/TableGen/NeonEmitter.cpp:392
- for (auto Type : Types) {
+ for (const auto &Type : Types) {
// If this builtin takes an immediate argument, we need to #define it rather
----------------
tahonermann wrote:
> The element type is `Type` (`clang/utils/TableGen/NeonEmitter.cpp`). It holds a `TypeSpec`, an `enum` value, 5 `bool` values, and 3 `unsigned` values. I'm ambivalent.
Thanks @tahonermann for reviews and feedbacks.
>>The element type is Type (clang/utils/TableGen/NeonEmitter.cpp). It holds a TypeSpec, an enum value, 5 bool values, and 3 unsigned values.
Yes, I had mixed feeling about this one too.
Line 362 in clang/utils/TableGen/NeonEmitter.cpp, we are passing it as a reference.
for (const auto &T : Types){
if (T.isVector() && T.getNumElements() > 1)
return false;
}
return true;
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149074/new/
https://reviews.llvm.org/D149074
More information about the cfe-commits
mailing list