summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-05-29 14:09:17 +0000
committerDaniel Jasper <djasper@google.com>2013-05-29 14:09:17 +0000
commit41a0f78d43a48e3d1f715daccc0ec8ddd306cb87 (patch)
tree4e8eee59c7fdf2e1451276ecd616c32e9eee70f1 /clang
parent40e1921f2a33a7b9e9647de195274341b7779bf0 (diff)
downloadbcm5719-llvm-41a0f78d43a48e3d1f715daccc0ec8ddd306cb87.tar.gz
bcm5719-llvm-41a0f78d43a48e3d1f715daccc0ec8ddd306cb87.zip
Add return missing in r182855.
llvm-svn: 182856
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp1
-rw-r--r--clang/unittests/Format/FormatTest.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 316d324f7a4..3b72bef6012 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -601,6 +601,7 @@ void UnwrappedLineParser::parseStructuralElement() {
Text == Text.upper()) {
// Recognize free-standing macros like Q_OBJECT.
addUnwrappedLine();
+ return;
}
}
break;
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index eacd189840f..18a1a008582 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1702,6 +1702,14 @@ TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) {
"\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();"));
OpenPOWER on IntegriCloud