Skip to content

Commit 3a408eb

Browse files
committed
Fix bug introduced in previous commit.
1 parent d0c585c commit 3a408eb

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

lldb/source/ValueObject/DILParser.cpp

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -194,24 +194,25 @@ ASTNodeUP DILParser::ParsePrimaryExpression() {
194194
uint32_t loc = CurToken().GetLocation();
195195
std::string nested_name_specifier;
196196

197-
if (CurToken().Is(Token::l_paren))
197+
if (CurToken().Is(Token::l_paren)) {
198198
nested_name_specifier = ParseNestedNameSpecifier();
199199

200-
if (!nested_name_specifier.empty()) {
201-
if (!CurToken().Is(Token::identifier)) {
202-
BailOut("Expected an identifier, but not found.",
203-
CurToken().GetLocation(), CurToken().GetSpelling().length());
204-
}
200+
if (!nested_name_specifier.empty()) {
201+
if (!CurToken().Is(Token::identifier)) {
202+
BailOut("Expected an identifier, but not found.",
203+
CurToken().GetLocation(), CurToken().GetSpelling().length());
204+
}
205205

206-
std::string unqualified_id = ParseUnqualifiedId();
207-
return std::make_unique<IdentifierNode>(loc, nested_name_specifier +
208-
unqualified_id);
209-
} else {
210-
m_dil_lexer.Advance();
211-
auto expr = ParseExpression();
212-
Expect(Token::r_paren);
213-
m_dil_lexer.Advance();
214-
return expr;
206+
std::string unqualified_id = ParseUnqualifiedId();
207+
return std::make_unique<IdentifierNode>(loc, nested_name_specifier +
208+
unqualified_id);
209+
} else {
210+
m_dil_lexer.Advance();
211+
auto expr = ParseExpression();
212+
Expect(Token::r_paren);
213+
m_dil_lexer.Advance();
214+
return expr;
215+
}
215216
}
216217

217218
BailOut(llvm::formatv("Unexpected token: {0}", CurToken()),

0 commit comments

Comments
 (0)