Skip to content

Commit 9781751

Browse files
committed
clangimport: drop redundant per-branch typeIndex guards in getSpelling
1 parent a3c8020 commit 9781751

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎lib/clangimport.cpp‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,10 @@ std::string clangimport::AstNode::getSpelling() const
422422
if (nodeType == FunctionDecl || nodeType == CXXConstructorDecl || nodeType == CXXMethodDecl) {
423423
while (typeIndex >= 0 && mExtTokens[typeIndex][0] != '\'')
424424
typeIndex--;
425-
if (typeIndex <= 0)
426-
return "";
427425
}
428426
if (nodeType == DeclRefExpr) {
429427
while (typeIndex > 0 && std::isalpha(mExtTokens[typeIndex][0]))
430428
typeIndex--;
431-
if (typeIndex <= 0)
432-
return "";
433429
}
434430
if (typeIndex <= 0)
435431
return "";

0 commit comments

Comments
 (0)