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

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 06:44:42 PDT 2023


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:11148
   if (LHSType->isVLSTBuiltinType() && RHSType->isVLSTBuiltinType() &&
+      LHSBuiltinTy && RHSBuiltinTy &&
       Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC !=
----------------
I think this is unnecessary.  `isVLSTBuiltinType` only returns true if `LHSType` is a `BuiltinType` already (or at least, a subset-of). See : https://clang.llvm.org/doxygen/Type_8cpp_source.html#l02409




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