llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Nathan Ridge (HighCommander4)

<details>
<summary>Changes</summary>

Fixes https://github.com/clangd/clangd/issues/2301

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


1 Files Affected:

- (modified) clang/lib/Sema/HeuristicResolver.cpp (+2) 


``````````diff
diff --git a/clang/lib/Sema/HeuristicResolver.cpp 
b/clang/lib/Sema/HeuristicResolver.cpp
index 87c7274e7aefa6..8c8c5d90f8245c 100644
--- a/clang/lib/Sema/HeuristicResolver.cpp
+++ b/clang/lib/Sema/HeuristicResolver.cpp
@@ -242,6 +242,8 @@ std::vector<const NamedDecl *> 
HeuristicResolverImpl::resolveMemberExpr(
       BaseType = resolveExprToType(Base);
     }
   }
+  if (BaseType.isNull())
+    return {};
   if (const auto *AT = BaseType->getContainedAutoType()) {
     // If BaseType contains a dependent `auto` type, deduction will not have
     // been performed on it yet. In simple cases (e.g. `auto` variable with

``````````

</details>


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

Reply via email to