forked from OSchip/llvm-project
[clangd] lookupSiblingsWithinContext - remove unnecessary nullptr check
The DC pointer is always dereferenced after the loop
This commit is contained in:
parent
a59014b759
commit
535e7b09c1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue