forked from OSchip/llvm-project
788a2227b7
Summary: Previously, clang-format would detect the following as an Objective-C block type: FOO(^); when it actually must be a C or C++ macro dealing with an XOR statement or an XOR operator overload. According to the Clang Block Language Spec: https://clang.llvm.org/docs/BlockLanguageSpec.html block types are of the form: int (^)(char, float) and block variables of block type are of the form: void (^blockReturningVoidWithVoidArgument)(void); int (^blockReturningIntWithIntAndCharArguments)(int, char); void (^arrayOfTenBlocksReturningVoidWithIntArgument[10])(int); This tightens up the detection so we don't unnecessarily detect C macros which pass in the XOR operator. Depends On D43904 Test Plan: New tests added. Ran tests with: make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: krasimir, jolesiak, djasper Reviewed By: djasper Subscribers: djasper, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D43906 llvm-svn: 327285 |
||
---|---|---|
.. | ||
AffectedRangeManager.cpp | ||
AffectedRangeManager.h | ||
BreakableToken.cpp | ||
BreakableToken.h | ||
CMakeLists.txt | ||
ContinuationIndenter.cpp | ||
ContinuationIndenter.h | ||
Encoding.h | ||
Format.cpp | ||
FormatInternal.h | ||
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 | ||
UsingDeclarationsSorter.cpp | ||
UsingDeclarationsSorter.h | ||
WhitespaceManager.cpp | ||
WhitespaceManager.h |