forked from OSchip/llvm-project
95ed8e7928
Summary: calculateBraceTypes decides for braced init for empty brace pairs ({}). In context of a function declaration, this incorrectly classifies empty function or method bodies as braced inits, leading to missing wraps: class C { foo() {}[bar]() {} } Where code should have wrapped after "}", before "[". This change adds another piece of contextual information in that braces following closing parentheses must always be the opening braces of function blocks. This fixes brace detection for methods immediately followed by brackets (computed property declarations), but also curlies. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D33714 llvm-svn: 304290 |
||
---|---|---|
.. | ||
AffectedRangeManager.cpp | ||
AffectedRangeManager.h | ||
BreakableToken.cpp | ||
BreakableToken.h | ||
CMakeLists.txt | ||
ContinuationIndenter.cpp | ||
ContinuationIndenter.h | ||
Encoding.h | ||
Format.cpp | ||
FormatToken.cpp | ||
FormatToken.h | ||
FormatTokenLexer.cpp | ||
FormatTokenLexer.h | ||
NamespaceEndCommentsFixer.cpp | ||
NamespaceEndCommentsFixer.h | ||
SortJavaScriptImports.cpp | ||
SortJavaScriptImports.h | ||
TokenAnalyzer.cpp | ||
TokenAnalyzer.h | ||
TokenAnnotator.cpp | ||
TokenAnnotator.h | ||
UnwrappedLineFormatter.cpp | ||
UnwrappedLineFormatter.h | ||
UnwrappedLineParser.cpp | ||
UnwrappedLineParser.h | ||
WhitespaceManager.cpp | ||
WhitespaceManager.h |