summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-01-17 16:21:39 +0000
committerDaniel Jasper <djasper@google.com>2014-01-17 16:21:39 +0000
commit47ef6ddece6eee55f3d53e07f484832cece770f9 (patch)
tree7c5bc6506837f017872b7d85b15a00af81cef352 /clang/unittests/Format/FormatTest.cpp
parent5fea974b6ba4992b328d72499d242aaeadd7351e (diff)
downloadbcm5719-llvm-47ef6ddece6eee55f3d53e07f484832cece770f9.tar.gz
bcm5719-llvm-47ef6ddece6eee55f3d53e07f484832cece770f9.zip
clang-format: Don't break lines starting with "import <string-literal>"
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
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
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(<strstream>)\n"
"#include <strstream>\n"
"#endif");
+
+ // Protocol buffer definition or missing "#".
+ verifyFormat("import \"aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa\";",
+ getLLVMStyleWithColumns(30));
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud