@@ -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