diff options
author | Francois Ferrand <thetypz@gmail.com> | 2017-06-21 13:56:02 +0000 |
---|---|---|
committer | Francois Ferrand <thetypz@gmail.com> | 2017-06-21 13:56:02 +0000 |
commit | d3f0e3dee0a68bd8a436fd6b718051967b355438 (patch) | |
tree | 6ba4b35a3bddcfc039e156801acf30de5debb8d5 /clang/lib/Format/Format.cpp | |
parent | d283dd4e060e627b844a15be1030dc0bb7ae53c7 (diff) | |
download | bcm5719-llvm-d3f0e3dee0a68bd8a436fd6b718051967b355438.tar.gz bcm5719-llvm-d3f0e3dee0a68bd8a436fd6b718051967b355438.zip |
clang-format: introduce InlineOnly short function style
Summary:
This is the same as Inline, except it does not imply all empty
functions are merged: with this style, empty functions are merged only
if they also match the 'inline' criteria (i.e. defined in a class).
This is helpful to avoid inlining functions in implementations files.
Reviewers: djasper, krasimir
Reviewed By: djasper
Subscribers: klimek, rengolin, cfe-commits
Differential Revision: https://reviews.llvm.org/D34399
llvm-svn: 305912
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index aebe22c07ec..3e3667bfd82 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -97,6 +97,7 @@ template <> struct ScalarEnumerationTraits<FormatStyle::ShortFunctionStyle> { IO.enumCase(Value, "All", FormatStyle::SFS_All); IO.enumCase(Value, "true", FormatStyle::SFS_All); IO.enumCase(Value, "Inline", FormatStyle::SFS_Inline); + IO.enumCase(Value, "InlineOnly", FormatStyle::SFS_InlineOnly); IO.enumCase(Value, "Empty", FormatStyle::SFS_Empty); } }; |