[PATCH] D157429: [NFC] [Clang] Fix static analyzer concern

Elizabeth Andrews via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 13:28:33 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6a4779cc235c: [NFC] Fix static analyzer concern (authored by eandrews).
Herald added a project: clang.

Changed prior to commit:
  https://reviews.llvm.org/D157429?vs=548317&id=548332#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157429

Files:
  clang/lib/Analysis/BodyFarm.cpp


Index: clang/lib/Analysis/BodyFarm.cpp
===================================================================
--- clang/lib/Analysis/BodyFarm.cpp
+++ clang/lib/Analysis/BodyFarm.cpp
@@ -806,7 +806,7 @@
 
   if (!IVar) {
     Prop = MD->findPropertyDecl();
-    IVar = findBackingIvar(Prop);
+    IVar = Prop ? findBackingIvar(Prop) : nullptr;
   }
 
   if (!IVar || !Prop)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157429.548332.patch
Type: text/x-patch
Size: 370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230808/3e9be2e2/attachment.bin>


More information about the cfe-commits mailing list