Skip to content

Commit 7fa211e

Browse files
committed
Rearranged if condition
1 parent 0db63a5 commit 7fa211e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clangd/XRefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,9 +2238,9 @@ prepareCallHierarchy(ParsedAST &AST, Position Pos, PathRef TUPath) {
22382238
for (const NamedDecl *Decl : getDeclAtPosition(AST, *Loc, {})) {
22392239
if (!(isa<DeclContext>(Decl) &&
22402240
cast<DeclContext>(Decl)->isFunctionOrMethod()) &&
2241+
Decl->getKind() != Decl::Kind::FunctionTemplate &&
22412242
!(Decl->getKind() == Decl::Kind::Var &&
22422243
!cast<VarDecl>(Decl)->isLocalVarDecl()) &&
2243-
Decl->getKind() != Decl::Kind::FunctionTemplate &&
22442244
Decl->getKind() != Decl::Kind::Field)
22452245
continue;
22462246
if (auto CHI = declToCallHierarchyItem(*Decl, AST.tuPath()))

0 commit comments

Comments
 (0)