[PATCH] D151280: [NFC][CLANG] Fix static code analyzer concerns
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 24 18:00:04 PDT 2023
Manna updated this revision to Diff 525388.
Manna added a comment.
Thank you @erichkeane for reviews! I have updated assert message.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151280/new/
https://reviews.llvm.org/D151280
Files:
clang/lib/CodeGen/CGExprConstant.cpp
Index: clang/lib/CodeGen/CGExprConstant.cpp
===================================================================
--- clang/lib/CodeGen/CGExprConstant.cpp
+++ clang/lib/CodeGen/CGExprConstant.cpp
@@ -1340,6 +1340,7 @@
std::string Str;
CGM.getContext().getObjCEncodingForType(E->getEncodedType(), Str);
const ConstantArrayType *CAT = CGM.getContext().getAsConstantArrayType(T);
+ assert(CAT && "String data not of constant array type!");
// Resize the string to the right size, adding zeros at the end, or
// truncating as needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151280.525388.patch
Type: text/x-patch
Size: 558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230525/46a87036/attachment-0001.bin>
More information about the cfe-commits
mailing list