aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-21 14:32:05 +0000
committerManuel Klimek <klimek@google.com>2013-01-21 14:32:05 +0000
commitd19dc2ddf3f8630cfdbefec490c0000c14bee6bd (patch)
tree79a5744331b0f09d907170e6ce77361d40ee55ee /unittests/Format/FormatTest.cpp
parent9c8c40e7334a59159392d020dd4339b86326ec00 (diff)
Fixes indent in linkage specification blocks.
We now indent: extern "C" { int a; } without additional indent inside the extern "C" block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index f8c454b7bc..f67cd8c222 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -526,6 +526,10 @@ TEST_F(FormatTest, FormatsNamespaces) {
"void f() { f(); }");
}
+TEST_F(FormatTest, FormatsExternC) {
+ verifyFormat("extern \"C\" {\nint a;");
+}
+
TEST_F(FormatTest, FormatTryCatch) {
// FIXME: Handle try-catch explicitly in the UnwrappedLineParser, then we'll
// also not create single-line-blocks.