diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 3 | ||||
-rw-r--r-- | clang/unittests/Format/FormatTestJava.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index b2f9bd2cc51..34d8835c763 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -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; diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp index e0f2b51f068..9b3b9933572 100644 --- a/clang/unittests/Format/FormatTestJava.cpp +++ b/clang/unittests/Format/FormatTestJava.cpp @@ -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) { |