llvm-project/clang/lib/Format
Daniel Jasper 26d1b1db23 Allow breaking between a type and name in variable declarations.
This fixes llvm.org/PR14967 and is generall necessary to avoid
situations where the column limit is exceeded. The challenge is
restricting such lines splits, otherwise clang-format suddenly starts
breaking at bad places.

Before:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string,
                   SomeOtherTemplateParameter> &ReallyReallyLongParameterName,
    const SomeType<string,
                   SomeOtherTemplateParameter> &AnotherLongParameterName) {}

After:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string, SomeOtherTemplateParameter> &
        ReallyReallyLongParameterName,
    const SomeType<string, SomeOtherTemplateParameter> &
        AnotherLongParameterName) {}

llvm-svn: 175999
2013-02-24 18:54:32 +00:00
..
CMakeLists.txt Move the token annotator into separate files. 2013-01-29 21:01:14 +00:00
Format.cpp Allow breaking between a type and name in variable declarations. 2013-02-24 18:54:32 +00:00
Makefile
TokenAnnotator.cpp Allow breaking between a type and name in variable declarations. 2013-02-24 18:54:32 +00:00
TokenAnnotator.h Allow breaking between a type and name in variable declarations. 2013-02-24 18:54:32 +00:00
UnwrappedLineParser.cpp Fix crash for incomplete labels in macros. 2013-02-12 20:17:17 +00:00
UnwrappedLineParser.h Move the token annotator into separate files. 2013-01-29 21:01:14 +00:00