[clang] [Safe Buffers] Fix a small bug recently found (PR #102953)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 13 15:08:50 PDT 2024
================
@@ -404,7 +404,7 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) {
if (Arg0Ty->isConstantArrayType()) {
const APSInt ConstArrSize =
- APSInt(cast<ConstantArrayType>(Arg0Ty)->getSize());
+ APSInt(cast<ConstantArrayType>(Arg0Ty.getCanonicalType())->getSize());
----------------
ziqingluo-90 wrote:
Have changed to use `ASTContext::getAsConstantArrayType()`
https://github.com/llvm/llvm-project/pull/102953
More information about the cfe-commits
mailing list