================ @@ -26588,10 +26613,7 @@ TEST_F(FormatTest, Cpp20ModulesSupport) { " int foo;\n" "};", Style); - verifyFormat("export {\n" - " int foo;\n" - "};", - Style); + verifyFormat("export { int foo; };", Style); ---------------- Sirraide wrote:
Yeah, makes sense. As far as I understand it, were were previously just parsing this as a compound statement, which afaik isn’t formatted on a single line by default, but maybe namespaces are, but I’m candidly not quite sure what’s causing this to be formatted on one line... I think this has something to do with the fact that I used `parseBlock` for this, but I’ll have to look into it a bit more. Do we want a separate option for this (e.g. something like `AllowShortExportBlocksOnASingleLine`) or should that just fall under `AllowShortBlocksOnASingleLine`? https://github.com/llvm/llvm-project/pull/110381 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits