[clang-format] disable adding extra space after MSVC '__super' keyword
clang-format treats MSVC `__super` keyword like all other keywords adding
a single space after. This change disables this behavior for `__super`.
Patch originally by jutocz (thanks!).
Differential Revision: https://reviews.llvm.org/D30932
llvm-svn: 297936
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 674c3b5..6a250eb 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -9977,6 +9977,10 @@
format("auto a = unique_ptr < Foo < Bar>[10]> ;", Spaces));
}
+TEST_F(FormatTest, NoSpaceAfterSuper) {
+ verifyFormat("__super::FooBar();");
+}
+
TEST(FormatStyle, GetStyleOfFile) {
vfs::InMemoryFileSystem FS;
// Test 1: format file in the same directory.