diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-18 12:52:00 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-18 12:52:00 +0000 |
commit | adba2aadf29228a501988cccc67e8aeeab025087 (patch) | |
tree | 48b937ff1ab62f476f924ed2225bfa171391336a /clang/lib/Format/UnwrappedLineParser.h | |
parent | cbb227b48d61a122d816b595479034841df2d4b4 (diff) | |
download | bcm5719-llvm-adba2aadf29228a501988cccc67e8aeeab025087.tar.gz bcm5719-llvm-adba2aadf29228a501988cccc67e8aeeab025087.zip |
clang-format: Allow braced initializers in template arguments of class
specializations.
Before:
template <class T>
struct S < std::is_arithmetic<T> {
} > {};
After:
template <class T> struct S<std::is_arithmetic<T>{}> {};
llvm-svn: 237565
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.h')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h index 06c80e1387d..a75845f5d83 100644 --- a/clang/lib/Format/UnwrappedLineParser.h +++ b/clang/lib/Format/UnwrappedLineParser.h @@ -82,7 +82,7 @@ private: void parsePPEndIf(); void parsePPUnknown(); void parseStructuralElement(); - bool tryToParseBracedList(); + bool tryToParseBracedList(bool ExpectClassBody = false); bool parseBracedList(bool ContinueOnSemicolons = false); void parseParens(); void parseSquare(); @@ -113,7 +113,7 @@ private: void readToken(); void flushComments(bool NewlineBeforeNext); void pushToken(FormatToken *Tok); - void calculateBraceTypes(); + void calculateBraceTypes(bool ExpectClassBody); // Marks a conditional compilation edge (for example, an '#if', '#ifdef', // '#else' or merge conflict marker). If 'Unreachable' is true, assumes |