From 86ee0b6daa7f3ef724a10bda93bf58840032d12a Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Thu, 4 Dec 2014 08:57:27 +0000 Subject: clang-format: More restrictively classify import declarations. Before: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 223345 --- clang/lib/Format/TokenAnnotator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Format/TokenAnnotator.cpp') diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 9b215dcd473..9f692437cad 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -615,7 +615,8 @@ public: if ((Style.Language == FormatStyle::LK_Java && CurrentToken->is(Keywords.kw_package)) || (Info && Info->getPPKeywordID() == tok::pp_import && - CurrentToken->Next)) { + CurrentToken->Next && + CurrentToken->Next->isOneOf(tok::string_literal, tok::identifier))) { next(); parseIncludeDirective(); return LT_ImportStatement; -- cgit v1.2.3