llvm-project/clang/unittests/Format
Paul Hoad 88335c21a4 [clang-format] [PR41187] moves Java import statements to the wrong location if code contains statements that start with the word import
Summary:
Import sorting of java file, incorrectly move import statement to after a function beginning with the word import.

Make 1 character change to regular expression to ensure there is always at least one space/tab after the word import

Previously clang-format --style="LLVM" would format

```
import X;

class C {
  void m() {
    importFile();
  }
}
```
as

```
class C {
  void m() {
    importFile();
import X;
  }
}
```

Reviewers: djasper, klimek, reuk, JonasToth

Reviewed By: klimek

Subscribers: cfe-commits

Tags: #clang-tools-extra

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

llvm-svn: 357345
2019-03-30 13:05:40 +00:00
..
CMakeLists.txt [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
CleanupTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTest.cpp [clang-format]: Add NonEmptyParentheses spacing option 2019-03-30 12:32:35 +00:00
FormatTestCSharp.cpp [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
FormatTestComments.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestJS.cpp [clang-format] [JS] handle private members. 2019-03-19 12:28:41 +00:00
FormatTestJava.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestObjC.cpp [clang-format] Refine structured binding detection 2019-03-25 17:29:16 +00:00
FormatTestProto.cpp Revert "[clang-format] Keep protobuf "package" statement on one line" 2019-03-25 15:46:07 +00:00
FormatTestRawStrings.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestSelective.cpp [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present 2019-03-13 08:26:39 +00:00
FormatTestTableGen.cpp [clang-format][TableGen] Don't add spaces around items in square braces. 2019-03-01 00:12:18 +00:00
FormatTestTextProto.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestUtils.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NamespaceEndCommentsFixerTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortImportsTestJS.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortImportsTestJava.cpp [clang-format] [PR41187] moves Java import statements to the wrong location if code contains statements that start with the word import 2019-03-30 13:05:40 +00:00
SortIncludesTest.cpp [clang-format] clang-format off/on not respected when using C Style comments 2019-03-02 09:08:51 +00:00
UsingDeclarationsSorterTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00