njames93 added a comment. Should this be controlled on a case by case basis, maybe control indentation using a regex over the pragma arguments, WDYT?
================ Comment at: clang/docs/ClangFormatStyleOptions.rst:1923-1924 + + When ``false``, pragmas are flushed left or follow IndentPPDirectives + When ``true``, pragmas are indented to the current scope level + ---------------- Please add full stops at the end of these sentences. ================ Comment at: clang/docs/ClangFormatStyleOptions.rst:1928 + + false: vs false: + ---------------- ================ Comment at: clang/include/clang/Format/Format.h:1533-1534 + /// + /// When ``false``, pragmas are flushed left or follow IndentPPDirectives + /// When ``true``, pragmas are indented to the current scope level + /// \code ---------------- Please add full stops at the end of these sentences. ================ Comment at: clang/include/clang/Format/Format.h:1536 + /// \code + /// false: vs false: + /// ---------------- ================ Comment at: clang/lib/Format/ContinuationIndenter.cpp:594 + State.Line->First->startsSequence(tok::hash, tok::pp_pragma); + // If indenting pragmas remove the extra space for the # + if (Style.IndentPragmas && isPragmaLine) { ---------------- Full stop. ================ Comment at: clang/lib/Format/ContinuationIndenter.cpp:595-597 + if (Style.IndentPragmas && isPragmaLine) { + Spaces--; + } ---------------- Can elide these braces. ================ Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1248 + case FormatStyle::PPDIS_BeforeHash: { + // if we want to indent pragmas + bool isPragmaLine = RootToken.startsSequence(tok::hash, tok::pp_pragma); ---------------- Capital letter at the start of comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92753/new/ https://reviews.llvm.org/D92753 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits