Index: clang/lib/Format/FormatToken.h =================================================================== --- clang/lib/Format/FormatToken.h +++ clang/lib/Format/FormatToken.h @@ -1787,8 +1787,7 @@ /// Whether the token begins a block. bool isBlockBegin(const FormatToken &Tok, const FormatStyle &Style) const { - return Tok.is(TT_MacroBlockBegin) || - (Style.isVerilog() ? isVerilogBegin(Tok) : Tok.is(tok::l_brace)); + return Style.isVerilog() ? isVerilogBegin(Tok) : Tok.is(tok::l_brace); } private: Index: clang/unittests/Format/FormatTest.cpp =================================================================== --- clang/unittests/Format/FormatTest.cpp +++ clang/unittests/Format/FormatTest.cpp @@ -6602,6 +6602,13 @@ " x = 1;\n" "FOO_END(Baz)", Style); + + Style.RemoveBracesLLVM = true; + verifyNoCrash("for (;;)\n" + " FOO_BEGIN\n" + " foo();\n" + " FOO_END", + Style); } //===----------------------------------------------------------------------===//