| commit | c76d59d8ff564f918833c97caede7dce2d8cfe60 | [log] [tgz] |
|---|---|---|
| author | Daniel Jasper <djasper@google.com> | Wed May 29 14:09:17 2013 +0000 |
| committer | Daniel Jasper <djasper@google.com> | Wed May 29 14:09:17 2013 +0000 |
| tree | a1cffc184e0ae8a31c1733740b5e1a1a83227868 | |
| parent | 7e70f4c09c5e10c2690eac04d9d812fb8e4a0c0d [diff] |
Add return missing in r182855. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182856 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index 316d324..3b72bef 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp
@@ -601,6 +601,7 @@ Text == Text.upper()) { // Recognize free-standing macros like Q_OBJECT. addUnwrappedLine(); + return; } } break;
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index eacd189..18a1a00 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp
@@ -1702,6 +1702,14 @@ "\n" " A() {\n}\n" "} ;")); + EXPECT_EQ("SOME_MACRO\n" + "namespace {\n" + "void f();\n" + "}", + format("SOME_MACRO\n" + " namespace {\n" + "void f( );\n" + "}")); // Only if the identifier contains at least 5 characters. EXPECT_EQ("HTTP f();", format("HTTP\nf();"));