[clangd] lookupSiblingsWithinContext - remove unnecessary nullptr check

The DC pointer is always dereferenced after the loop
This commit is contained in:
Simon Pilgrim 2022-02-18 11:12:33 +00:00
parent a59014b759
commit 535e7b09c1
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ const NamedDecl *lookupSiblingsWithinContext(ASTContext &Ctx,
DeclarationName LookupName(&II);
DeclContextLookupResult LookupResult;
const auto *DC = RenamedDecl.getDeclContext();
while (DC && DC->isTransparentContext())
while (DC->isTransparentContext())
DC = DC->getParent();
switch (DC->getDeclKind()) {
// The enclosing DeclContext may not be the enclosing scope, it might have