================
@@ -1350,40 +1351,60 @@ static bool isC78ParameterDecl(const FormatToken *Tok,
const FormatToken *Next,
return Tok->Previous && Tok->Previous->isOneOf(tok::l_paren, tok::comma);
}
-bool UnwrappedLineParser::parseModuleImport() {
- assert(FormatTok->is(Keywords.kw_import) && "'import' expected");
+bool UnwrappedLineParser::parseModuleDecl() {
+ assert(IsCpp);
+ assert(FormatTok->is(Keywords.kw_module));
- if (auto Token = Tokens->peekNextToken(/*SkipComment=*/true);
- !Token->Tok.getIdentifierInfo() &&
- Token->isNoneOf(tok::colon, tok::less, tok::string_literal)) {
+ if (Style.Language == FormatStyle::LK_C ||
----------------
HazardyKnusperkeks wrote:
What about ObjC, that is also covered in `IsCpp` isn't it?
https://github.com/llvm/llvm-project/pull/199459
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits