diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-13 11:35:53 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-13 11:35:53 +0000 |
commit | e60cba13378de35d7fff28efd9a552364261a2e5 (patch) | |
tree | 55e7120a4f8c530de4fcb47f78fdeeb4c8aa3515 /clang/unittests/Format/FormatTest.cpp | |
parent | c3434b390d6ea255aa4bd82cfd6ddcdee99e4a23 (diff) | |
download | bcm5719-llvm-e60cba13378de35d7fff28efd9a552364261a2e5.tar.gz bcm5719-llvm-e60cba13378de35d7fff28efd9a552364261a2e5.zip |
clang-format: Fix semicolon less macro-detection.
It was fooled by the comment.
Before:
SOME_UNRELATED_MACRO
/*static*/ int i;
After:
SOME_UNRELATED_MACRO
/*static*/ int i;
llvm-svn: 237246
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 105d1a11253..d6f0c08bf0a 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2804,6 +2804,10 @@ TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) { "\n" " A() {\n}\n" "} ;")); + EXPECT_EQ("MACRO\n" + "/*static*/ int i;", + format("MACRO\n" + " /*static*/ int i;")); EXPECT_EQ("SOME_MACRO\n" "namespace {\n" "void f();\n" |