mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 08:30:34 +08:00
clang-format: [Java] Understand "import static".
llvm-svn: 225965
This commit is contained in:
@@ -621,7 +621,8 @@ public:
|
||||
CurrentToken->is(Keywords.kw_package)) ||
|
||||
(Info && Info->getPPKeywordID() == tok::pp_import &&
|
||||
CurrentToken->Next &&
|
||||
CurrentToken->Next->isOneOf(tok::string_literal, tok::identifier))) {
|
||||
CurrentToken->Next->isOneOf(tok::string_literal, tok::identifier,
|
||||
tok::kw_static))) {
|
||||
next();
|
||||
parseIncludeDirective();
|
||||
return LT_ImportStatement;
|
||||
|
||||
@@ -369,6 +369,8 @@ TEST_F(FormatTestJava, PackageDeclarations) {
|
||||
TEST_F(FormatTestJava, ImportDeclarations) {
|
||||
verifyFormat("import some.really.loooooooooooooooooooooong.imported.Class;",
|
||||
getStyleWithColumns(50));
|
||||
verifyFormat("import static some.really.looooooooooooooooong.imported.Class;",
|
||||
getStyleWithColumns(50));
|
||||
}
|
||||
|
||||
TEST_F(FormatTestJava, MethodDeclarations) {
|
||||
|
||||
Reference in New Issue
Block a user