From 47ef6ddece6eee55f3d53e07f484832cece770f9 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 17 Jan 2014 16:21:39 +0000 Subject: clang-format: Don't break lines starting with "import " The author might be missing the "#" or these might be protocol buffer definitions. Either way, we should not break the line or the string. There don't seem to be other valid use cases. llvm-svn: 199501 --- clang/unittests/Format/FormatTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index c75df9ce151..0fade5b42f0 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4657,6 +4657,10 @@ TEST_F(FormatTest, HandlesIncludeDirectives) { verifyFormat("#if __has_include()\n" "#include \n" "#endif"); + + // Protocol buffer definition or missing "#". + verifyFormat("import \"aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa\";", + getLLVMStyleWithColumns(30)); } //===----------------------------------------------------------------------===// -- cgit v1.2.3