diff options
author | Daniel Jasper <djasper@google.com> | 2014-01-16 09:11:55 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-01-16 09:11:55 +0000 |
commit | cb51cf409b45ddaa1bd16b1d88185b918c02bbdd (patch) | |
tree | e9034613fc88129b818a1a86c5b7c4c3bd572071 /clang/lib/Format/FormatToken.h | |
parent | 157d911b42788d402b04a9cd7cbf45b0fd4541fb (diff) | |
download | bcm5719-llvm-cb51cf409b45ddaa1bd16b1d88185b918c02bbdd.tar.gz bcm5719-llvm-cb51cf409b45ddaa1bd16b1d88185b918c02bbdd.zip |
clang-format: Enable formatting of lambdas with explicit return type.
So clang-format can now format:
int c = []()->int { return 2; }();
int c = []()->vector<int> { return { 2 }; }();
llvm-svn: 199368
Diffstat (limited to 'clang/lib/Format/FormatToken.h')
-rw-r--r-- | clang/lib/Format/FormatToken.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h index dff2942c004..29fafb82505 100644 --- a/clang/lib/Format/FormatToken.h +++ b/clang/lib/Format/FormatToken.h @@ -280,6 +280,9 @@ struct FormatToken { (!ColonRequired || (Next && Next->is(tok::colon))); } + /// \brief Determine whether the token is a simple-type-specifier. + bool isSimpleTypeSpecifier() const; + bool isObjCAccessSpecifier() const { return is(tok::at) && Next && (Next->isObjCAtKeyword(tok::objc_public) || Next->isObjCAtKeyword(tok::objc_protected) || |