Fix handling of macro definitions.
Now correctly formats:
#define A (1)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173264 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 806a7eb..708b7d8 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -742,6 +742,10 @@
verifyFormat("#define A void # ## #", getLLVMStyleWithColumns(22));
}
+TEST_F(FormatTest, RespectWhitespaceInMacroDefinitions) {
+ verifyFormat("#define A (1)");
+}
+
TEST_F(FormatTest, IndentPreprocessorDirectivesAtZero) {
EXPECT_EQ("{\n {\n#define A\n }\n}", format("{{\n#define A\n}}"));
}