aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-08 16:17:54 +0000
committerDaniel Jasper <djasper@google.com>2013-01-08 16:17:54 +0000
commit765561ff8fa636cc88d133b85ecb592094104554 (patch)
tree6aa314182e7cc20cbc5ba7967614beb6969068c1 /unittests/Format/FormatTest.cpp
parenta879a164495db6daa4d809fbaba1617c9ade5919 (diff)
Don't put spaces around ##.
In Clang/LLVM this seems to be the more common formatting for ##s. There might still be case that we miss, but we'll fix those as we go along. Before: #define A(X) void function ## X(); After: #define A(X) void function##X(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index c3f364db39..677b0e99bd 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -551,6 +551,15 @@ TEST_F(FormatTest, HashInMacroDefinition) {
" { \\\n"
" f(#c);\\\n"
" }", getLLVMStyleWithColumns(11));
+
+ verifyFormat("#define A(X) \\\n"
+ " void function##X()", getLLVMStyleWithColumns(22));
+
+ verifyFormat("#define A(a, b, c) \\\n"
+ " void a##b##c()", getLLVMStyleWithColumns(22));
+
+ verifyFormat("#define A \\\n"
+ " void # ## #", getLLVMStyleWithColumns(22));
}
TEST_F(FormatTest, IndentPreprocessorDirectivesAtZero) {