================
@@ -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) &&
+ PreviousLine->startsWithNamespace()) ||
+ (PrevPrevLine && PrevPrevLine->startsWithNamespace() &&
+ PreviousLine->startsWith(tok::l_brace)));
+}
+
+bool LineEndsNamespaceScope(const AnnotatedLine *Line,
+ const SmallVectorImpl<AnnotatedLine *> &Lines) {
+ if (!Line)
+ return false;
+ const FormatToken *tok = Line->First;
----------------
mydeveloperday wrote:
Should be Tok
https://github.com/llvm/llvm-project/pull/106145
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits