Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Format/UnwrappedLineParser.cpp
Show First 20 Lines • Show All 2,000 Lines • ▼ Show 20 Lines | case tok::identifier: { | ||||
bool FollowedByNewline = | bool FollowedByNewline = | ||||
CommentsBeforeNextToken.empty() | CommentsBeforeNextToken.empty() | ||||
? FormatTok->NewlinesBefore > 0 | ? FormatTok->NewlinesBefore > 0 | ||||
: CommentsBeforeNextToken.front()->NewlinesBefore > 0; | : CommentsBeforeNextToken.front()->NewlinesBefore > 0; | ||||
if (FollowedByNewline && (Text.size() >= 5 || FunctionLike) && | if (FollowedByNewline && (Text.size() >= 5 || FunctionLike) && | ||||
tokenCanStartNewLine(*FormatTok) && Text == Text.upper()) { | tokenCanStartNewLine(*FormatTok) && Text == Text.upper()) { | ||||
if (PreviousToken->isNot(TT_UntouchableMacroFunc)) | |||||
PreviousToken->setFinalizedType(TT_FunctionLikeOrFreestandingMacro); | PreviousToken->setFinalizedType(TT_FunctionLikeOrFreestandingMacro); | ||||
addUnwrappedLine(); | addUnwrappedLine(); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
case tok::equal: | case tok::equal: | ||||
if ((Style.isJavaScript() || Style.isCSharp()) && | if ((Style.isJavaScript() || Style.isCSharp()) && | ||||
▲ Show 20 Lines • Show All 2,602 Lines • Show Last 20 Lines |