r182856 - Add return missing in r182855.
Daniel Jasper
djasper at google.com
Wed May 29 07:09:17 PDT 2013
Author: djasper
Date: Wed May 29 09:09:17 2013
New Revision: 182856
URL: http://llvm.org/viewvc/llvm-project?rev=182856&view=rev
Log:
Add return missing in r182855.
Modified:
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk/unittests/Format/FormatTest.cpp
Modified: cfe/trunk/lib/Format/UnwrappedLineParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/UnwrappedLineParser.cpp?rev=182856&r1=182855&r2=182856&view=diff
==============================================================================
--- cfe/trunk/lib/Format/UnwrappedLineParser.cpp (original)
+++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp Wed May 29 09:09:17 2013
@@ -601,6 +601,7 @@ void UnwrappedLineParser::parseStructura
Text == Text.upper()) {
// Recognize free-standing macros like Q_OBJECT.
addUnwrappedLine();
+ return;
}
}
break;
Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=182856&r1=182855&r2=182856&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Wed May 29 09:09:17 2013
@@ -1702,6 +1702,14 @@ TEST_F(FormatTest, MacrosWithoutTrailing
"\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();"));
More information about the cfe-commits
mailing list