summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2019-05-01 15:03:41 +0000
committerOwen Pan <owenpiano@gmail.com>2019-05-01 15:03:41 +0000
commit945890a63cbbfadc134acd3a1cc359d3b6deef43 (patch)
tree4b2e5bb70e7d7114ac71aeae21dac334c4fca1eb /clang/unittests/Format/FormatTest.cpp
parent6711b9699a66c9034a9ce25bea26f04298d6c644 (diff)
downloadbcm5719-llvm-945890a63cbbfadc134acd3a1cc359d3b6deef43.tar.gz
bcm5719-llvm-945890a63cbbfadc134acd3a1cc359d3b6deef43.zip
[clang-format] Fix bug that misses some function-like macro usages
Fixes PR41483 Differential Revision: https://reviews.llvm.org/D61297 llvm-svn: 359687
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index d269aab02ed..fd61470d656 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -2584,6 +2584,12 @@ TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) {
verifyFormat("VISIT_GL_CALL(GenBuffers, void, (GLsizei n, GLuint* buffers), "
"(n, buffers))\n",
getChromiumStyle(FormatStyle::LK_Cpp));
+
+ // See PR41483
+ EXPECT_EQ("/**/ FOO(a)\n"
+ "FOO(b)",
+ format("/**/ FOO(a)\n"
+ "FOO(b)"));
}
TEST_F(FormatTest, MacroCallsWithoutTrailingSemicolon) {
OpenPOWER on IntegriCloud