summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-23 09:32:48 +0000
committerManuel Klimek <klimek@google.com>2013-01-23 09:32:48 +0000
commit0a3a3c9900425b96f0d182e4e0004229aca6715c (patch)
tree4c05d9d12ad581f76b16e6b1def997218e5b0b68 /clang/unittests/Format/FormatTest.cpp
parent5924545c0c269495ea7391aab5b288808dead8bd (diff)
downloadbcm5719-llvm-0a3a3c9900425b96f0d182e4e0004229aca6715c.tar.gz
bcm5719-llvm-0a3a3c9900425b96f0d182e4e0004229aca6715c.zip
Allow us to better guess the context of an unwrapped line.
This gives us the ability to guess better defaults for whether a * between identifiers is a pointer dereference or binary operator. Now correctly formats: void f(a *b); void f() { f(a * b); } llvm-svn: 173243
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 3065a836ddf..7daf7aac6c3 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1666,6 +1666,11 @@ TEST_F(FormatTest, BlockComments) {
"/* */someCall(parameter);", getLLVMStyleWithColumns(15)));
}
+TEST_F(FormatTest, Fuck) {
+ verifyFormat("void f(int *a);");
+ verifyFormat("void f() { f(fint * b); }");
+}
+
//===----------------------------------------------------------------------===//
// Objective-C tests.
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud