[PATCH] D152197: [NFC][CLANG] Fix static analyzer bugs with null pointer dereferences in CheckSizelessVectorOperands()

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 6 00:14:12 PDT 2023


sdesmalen added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:11119
   if ((OperationKind == ACK_Arithmetic) &&
       ((LHSBuiltinTy && LHSBuiltinTy->isSVEBool()) ||
        (RHSBuiltinTy && RHSBuiltinTy->isSVEBool()))) {
----------------
This doesn't seem like a non-functional change. Here it checks that LHSBuiltinTy is not nullptr before using it, which suggests that it is valid for LHSType/RHSType not to be a builtin type. There is also nothing else guarding that the types are all VLSTBuiltinTypes. Do none of the tests fail?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152197/new/

https://reviews.llvm.org/D152197



More information about the cfe-commits mailing list