[PATCH] D149922: Fix nullptr dereference found by Coverity static analysis tool

Soumi Manna via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 08:13:28 PDT 2023


Manna added inline comments.


================
Comment at: clang/lib/AST/ASTContext.cpp:2862
 
-  if (Ty->isMemberPointerType()) {
-    const auto *MPT = Ty->getAs<MemberPointerType>();
+  if (const auto *MPT = Ty->getAs<MemberPointerType>()) {
     return !ABI->getMemberPointerInfo(MPT).HasPadding;
----------------
erichkeane wrote:
> Remove the curley braces, otherwise LGTM.
Missed that. Done


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

https://reviews.llvm.org/D149922



More information about the cfe-commits mailing list