[all-commits] [llvm/llvm-project] fbc6f4: clang-format: [JS] do not merge side-effect imports.

Martin Probst via All-commits all-commits at lists.llvm.org
Thu Apr 22 01:37:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fbc6f42dbee5d1d4ced30f520418c2b62942845a
      https://github.com/llvm/llvm-project/commit/fbc6f42dbee5d1d4ced30f520418c2b62942845a
  Author: Martin Probst <martin at probst.io>
  Date:   2021-04-22 (Thu, 22 Apr 2021)

  Changed paths:
    M clang/lib/Format/SortJavaScriptImports.cpp
    M clang/unittests/Format/SortImportsTestJS.cpp

  Log Message:
  -----------
  clang-format: [JS] do not merge side-effect imports.

The if condition was testing the current element, but
forgot to check the previous element (doh), so it
would fail depending on sort order of the imports.

Differential Revision: https://reviews.llvm.org/D101020




More information about the All-commits mailing list