[PATCH] D121906: [clang-format] Indent import statements in JavaScript.

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 01:33:00 PDT 2022


MyDeveloperDay requested changes to this revision.
MyDeveloperDay added a comment.
This revision now requires changes to proceed.

Can you please supply full context diff "Context not available."



================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:629
   int PPColumnCorrection = 0;
-  if (Style.IndentPPDirectives == FormatStyle::PPDIS_AfterHash &&
+  if (Style.Language != FormatStyle::LK_JavaScript &&
+      Style.IndentPPDirectives == FormatStyle::PPDIS_AfterHash &&
----------------
!Style.isJavaScript()


================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1436
+  // Javascript import statements are indented like normal statements.
+  if (Style.Language != FormatStyle::LK_JavaScript &&
+      Style.IndentPPDirectives != FormatStyle::PPDIS_BeforeHash &&
----------------
!Style.isJavaScript()


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121906



More information about the cfe-commits mailing list