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
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index f8c454b..f67cd8c 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -526,6 +526,10 @@
"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.