[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 3 04:39:37 PDT 2024
================
@@ -32,6 +32,26 @@ bool isRecordLBrace(const FormatToken &Tok) {
TT_StructLBrace, TT_UnionLBrace);
}
+bool LineStartsNamespaceScope(const AnnotatedLine *Line,
+ const AnnotatedLine *PreviousLine,
+ const AnnotatedLine *PrevPrevLine) {
+ return PreviousLine &&
+ ((PreviousLine->Last->is(tok::l_brace) &&
----------------
mydeveloperday wrote:
can previousLine->Last ever be null, I can't remember
https://github.com/llvm/llvm-project/pull/106145
More information about the cfe-commits
mailing list