summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-07-01 09:34:09 +0000
committerDaniel Jasper <djasper@google.com>2013-07-01 09:34:09 +0000
commit022612db050e18d18c8e6febad56b3aa22e8a6e6 (patch)
treee156f5c0867a4a7c848d5af043953969282b3541 /clang/unittests
parent7f5d53e55fd8465209abc976fc8a6036f8138b8f (diff)
downloadbcm5719-llvm-022612db050e18d18c8e6febad56b3aa22e8a6e6.tar.gz
bcm5719-llvm-022612db050e18d18c8e6febad56b3aa22e8a6e6.zip
Keep space between pointer and block comment.
Before: void f(int */* unused */) {} After: void f(int * /* unused */) {} The previous version seems to be valid C++ code but confuses many syntax highlighters. llvm-svn: 185320
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index c4d9c6f573b..25e1d49f08d 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -3887,6 +3887,8 @@ TEST_F(FormatTest, BlockComments) {
format("int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; /* comment */\n"
"int bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; /* comment */\n"
"int cccccccccccccccccccccccccccccc; /* comment */\n"));
+
+ verifyFormat("void f(int * /* unused */) {}");
}
TEST_F(FormatTest, BlockCommentsInMacros) {
OpenPOWER on IntegriCloud