From e60cba13378de35d7fff28efd9a552364261a2e5 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Wed, 13 May 2015 11:35:53 +0000 Subject: 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 --- clang/unittests/Format/FormatTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') 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" -- cgit v1.2.3