diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-10 13:08:12 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-10 13:08:12 +0000 |
commit | 46ef852618b18bc79e403b37a12c9b692e76126b (patch) | |
tree | 0f056c2efc19968c4dca28215efbcbda6892fd2a /include/clang/Format/Format.h | |
parent | e1d792f0ee02b5beb4b8e94506b3a0c353df43dd (diff) |
Improvements to function type and ObjC block formatting.
Before: int (^myBlock) (int) = ^(int num) {}
A<void ()>;
int (*b)(int);
After: int (^myBlock)(int) = ^(int num) {}
A<void()>;
int(*b)(int);
For function types and function pointer types, this patch only makes
the behavior consistent (for types that are keywords and other types).
For the latter function pointer type declarations, we'll probably
want to add a space after "int".
Also added LangOpts.Bool = 1, so we handle "A<bool()>" appropriately
Moved the LangOpts-settings to a public place for use by tests
and clang-format binary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Format/Format.h')
-rw-r--r-- | include/clang/Format/Format.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h index 32bb53c8d4..7713cf784a 100644 --- a/include/clang/Format/Format.h +++ b/include/clang/Format/Format.h @@ -78,6 +78,9 @@ tooling::Replacements reformat(const FormatStyle &Style, Lexer &Lex, SourceManager &SourceMgr, std::vector<CharSourceRange> Ranges); +/// \brief Returns the \c LangOpts that the formatter expects you to set. +LangOptions getFormattingLangOpts(); + } // end namespace format } // end namespace clang |