Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Format/TokenAnnotator.cpp
Show First 20 Lines • Show All 308 Lines • ▼ Show 20 Lines | bool parseParens(bool LookForDecls = false) { | ||||
} | } | ||||
// MightBeFunctionType and ProbablyFunctionType are used for | // MightBeFunctionType and ProbablyFunctionType are used for | ||||
// function pointer and reference types as well as Objective-C | // function pointer and reference types as well as Objective-C | ||||
// block types: | // block types: | ||||
// | // | ||||
// void (*FunctionPointer)(void); | // void (*FunctionPointer)(void); | ||||
// void (&FunctionReference)(void); | // void (&FunctionReference)(void); | ||||
// void (^ObjCBlock)(void); | // void (^ObjCBlock)(void); | ||||
lichray: Code does not match comment. | |||||
bool MightBeFunctionType = !Contexts[Contexts.size() - 2].IsExpression; | bool MightBeFunctionType = !Contexts[Contexts.size() - 2].IsExpression; | ||||
bool ProbablyFunctionType = | bool ProbablyFunctionType = | ||||
CurrentToken->isOneOf(tok::star, tok::amp, tok::caret); | CurrentToken->isOneOf(tok::star, tok::amp, tok::ampamp, tok::caret); | ||||
bool HasMultipleLines = false; | bool HasMultipleLines = false; | ||||
bool HasMultipleParametersOnALine = false; | bool HasMultipleParametersOnALine = false; | ||||
bool MightBeObjCForRangeLoop = | bool MightBeObjCForRangeLoop = | ||||
Left->Previous && Left->Previous->is(tok::kw_for); | Left->Previous && Left->Previous->is(tok::kw_for); | ||||
FormatToken *PossibleObjCForInToken = nullptr; | FormatToken *PossibleObjCForInToken = nullptr; | ||||
while (CurrentToken) { | while (CurrentToken) { | ||||
// LookForDecls is set when "if (" has been seen. Check for | // LookForDecls is set when "if (" has been seen. Check for | ||||
// 'identifier' '*' 'identifier' followed by not '=' -- this | // 'identifier' '*' 'identifier' followed by not '=' -- this | ||||
▲ Show 20 Lines • Show All 4,046 Lines • Show Last 20 Lines |
Code does not match comment.