]> granicus.if.org Git - clang/commit
clang-format: Extend AllowShortFunctions.. to only merge inline functions.
authorDaniel Jasper <djasper@google.com>
Tue, 8 Apr 2014 12:46:38 +0000 (12:46 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 8 Apr 2014 12:46:38 +0000 (12:46 +0000)
commita21f0ede7f46e5ebef0c720ce60c53af0306af8d
tree6cbd6a4a557b2f926d1b33f27c853d397ade3e0e
parentaee470d9302c5ec5eb3bd21c495c795db1c8de63
clang-format: Extend AllowShortFunctions.. to only merge inline functions.

Before AllowShortFunctionsOnASingleLine could either be true, merging
all functions, or false, merging no functions. This patch adds a third
value "Inline", which can be used to only merge short functions defined
inline in a class, i.e.:

  void f() {
    return 42;
  }

  class C {
    void f() { return 42; }
  };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205760 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp