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

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 11:49:17 PST 2023


HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1279
+  if (State.Line->InPragmaDirective) {
+    FormatToken *PragmaType = State.Line->First->Next->Next;
+    if (PragmaType && PragmaType->TokenText.equals("omp"))
----------------
Do we know that the first `Next` is never null?


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