[PATCH] D150140: [NFC][CLANG] Fix Static Code Analysis Concerns
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 14 20:15:25 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG245549c57517: [NFC][CLANG] Fix Static Code Analysis Concerns (authored by Manna).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150140/new/
https://reviews.llvm.org/D150140
Files:
clang/utils/TableGen/SveEmitter.cpp
Index: clang/utils/TableGen/SveEmitter.cpp
===================================================================
--- clang/utils/TableGen/SveEmitter.cpp
+++ clang/utils/TableGen/SveEmitter.cpp
@@ -299,6 +299,7 @@
if (It != FlagTypes.end()) {
uint64_t Mask = It->getValue();
unsigned Shift = llvm::countr_zero(Mask);
+ assert(Shift < 64 && "Mask value produced an invalid shift value");
return (V << Shift) & Mask;
}
llvm_unreachable("Unsupported flag");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150140.522030.patch
Type: text/x-patch
Size: 493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230515/917d2ef7/attachment-0001.bin>
More information about the cfe-commits
mailing list