llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/130887.diff


1 Files Affected:

- (modified) clang/lib/AST/ASTContext.cpp (+2-2) 


``````````diff
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 55022a4bc000a..7ed5b033d9bd8 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -11832,8 +11832,8 @@ bool ASTContext::mergeExtParameterInfo(
 }
 
 void ASTContext::ResetObjCLayout(const ObjCInterfaceDecl *D) {
-  if (ObjCLayouts.count(D)) {
-    ObjCLayouts[D] = nullptr;
+  if (auto It = ObjCLayouts.find(D); It != ObjCLayouts.end()) {
+    It->second = nullptr;
     for (auto *SubClass : ObjCSubClasses[D])
       ResetObjCLayout(SubClass);
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/130887
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to