[PATCH] D144884: [clang-format] Only add pragma continuation indentation for 'omp' clauses

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 2 10:46:11 PST 2023


jhuber6 added inline comments.


================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1280
+    FormatToken *PragmaType = State.Line->First->Next->Next;
+    if (PragmaType && PragmaType->TokenText.equals("omp"))
+      return CurrentState.Indent + Style.ContinuationIndentWidth;
----------------
MyDeveloperDay wrote:
> can you add a test that covers this?
There is already a test for the `omp` case and this patch added a new one for the non-omp case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144884/new/

https://reviews.llvm.org/D144884



More information about the cfe-commits mailing list