Skip to content

Commit 2f8f89f

Browse files
committed
Don't resolve for null base type
1 parent c0703d7 commit 2f8f89f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang-tools-extra/clangd/HeuristicResolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,13 @@ std::vector<const NamedDecl *> HeuristicResolver::resolveMemberExpr(
247247
BaseType = getPointeeType(BaseType);
248248
}
249249

250+
if (!BaseType)
251+
return {};
252+
250253
if (BaseType->isDependentType())
251254
if (auto *MaybeResolved = resolveTypeFromInstantiatedTemplate(ME))
252255
BaseType = MaybeResolved;
253256

254-
if (!BaseType)
255-
return {};
256257
if (const auto *BT = BaseType->getAs<BuiltinType>()) {
257258
// If BaseType is the type of a dependent expression, it's just
258259
// represented as BuiltinType::Dependent which gives us no information. We

0 commit comments

Comments
 (0)