diff options
author | Daniel Jasper <djasper@google.com> | 2013-03-22 10:01:29 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-03-22 10:01:29 +0000 |
commit | b64eca09dd3bcd18eb1a5cca2b123b169340bdd5 (patch) | |
tree | 5a1a6e4b5a7ea9540d75d16dc68d74f125be4cbb /lib/Format/Format.cpp | |
parent | 5921e04efd9341ec915338b00149ea832b02b430 (diff) |
Make clang-format understand more line comments.
Apparently one needs to set LangOptions.LineComment.
Before "//* */" got reformatted to "/ /* */" as the lexer was returning
the token sequence (slash, comment). This could also lead to weird other
stuff, e.g. for people that like to using comments like:
//****************
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 1 |
1 files changed, 1 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; |