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

Soumi Manna via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 22 13:06:15 PDT 2023


Manna marked an inline comment as done.
Manna added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:11148
   if (LHSType->isVLSTBuiltinType() && RHSType->isVLSTBuiltinType() &&
+      LHSBuiltinTy && RHSBuiltinTy &&
       Context.getBuiltinVectorTypeInfo(LHSBuiltinTy).EC !=
----------------
erichkeane wrote:
> 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
> 
> 
This makes sense to me. Thank you for the pointer and explanation!


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