Skip to content

Commit d0ccfe7

Browse files
committed
Simplify; NFC
1 parent 7df3587 commit d0ccfe7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/AST/DeclBase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ bool DeclContext::Encloses(const DeclContext *DC) const {
14221422
return getPrimaryContext()->Encloses(DC);
14231423

14241424
for (; DC; DC = DC->getParent())
1425-
if (!isa<LinkageSpecDecl>(DC) && !isa<ExportDecl>(DC) &&
1425+
if (!isa<LinkageSpecDecl, ExportDecl>(DC) &&
14261426
DC->getPrimaryContext() == this)
14271427
return true;
14281428
return false;
@@ -1433,7 +1433,7 @@ bool DeclContext::LexicallyEncloses(const DeclContext *DC) const {
14331433
return getPrimaryContext()->LexicallyEncloses(DC);
14341434

14351435
for (; DC; DC = DC->getLexicalParent())
1436-
if (!isa<LinkageSpecDecl>(DC) && !isa<ExportDecl>(DC) &&
1436+
if (!isa<LinkageSpecDecl, ExportDecl>(DC) &&
14371437
DC->getPrimaryContext() == this)
14381438
return true;
14391439
return false;

0 commit comments

Comments
 (0)