diff options
-rw-r--r-- | lib/Format/Format.cpp | 1 | ||||
-rw-r--r-- | unittests/Format/FormatTest.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 040fb39fb9..40e980f67d 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -1643,6 +1643,7 @@ LangOptions getFormattingLangOpts() { LangOptions LangOpts; LangOpts.CPlusPlus = 1; LangOpts.CPlusPlus11 = 1; + LangOpts.LineComment = 1; LangOpts.Bool = 1; LangOpts.ObjC1 = 1; LangOpts.ObjC2 = 1; diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 29988d35c4..dc77c77e45 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -490,6 +490,7 @@ TEST_F(FormatTest, FormatsLabels) { //===----------------------------------------------------------------------===// TEST_F(FormatTest, UnderstandsSingleLineComments) { + verifyFormat("//* */"); verifyFormat("// line 1\n" "// line 2\n" "void f() {}\n"); |