llvm-project/clang/lib/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
..
AffectedRangeManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AffectedRangeManager.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BreakableToken.cpp [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
BreakableToken.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
CMakeLists.txt Reland "Move #include manipulation code to new lib/Tooling/Inclusions." 2018-06-04 09:04:12 +00:00
ContinuationIndenter.cpp Clang-format: add finer-grained options for putting all arguments on one line 2019-03-23 14:37:58 +00:00
ContinuationIndenter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Encoding.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Format.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
FormatInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.h [clang-format] Add style option AllowShortLambdasOnASingleLine 2019-03-26 20:18:14 +00:00
FormatTokenLexer.cpp [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
FormatTokenLexer.h [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
NamespaceEndCommentsFixer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NamespaceEndCommentsFixer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortJavaScriptImports.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortJavaScriptImports.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnnotator.cpp [clang-format]: Add NonEmptyParentheses spacing option 2019-03-30 12:32:35 +00:00
TokenAnnotator.h [clang-format]: Add NonEmptyParentheses spacing option 2019-03-30 12:32:35 +00:00
UnwrappedLineFormatter.cpp [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
UnwrappedLineFormatter.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
UnwrappedLineParser.cpp [clang-format] Add style option AllowShortLambdasOnASingleLine 2019-03-26 20:18:14 +00:00
UnwrappedLineParser.h [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
UsingDeclarationsSorter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UsingDeclarationsSorter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WhitespaceManager.cpp [clang-format] [NFC] clang-format the Format library 2019-03-01 09:09:54 +00:00
WhitespaceManager.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00