Changeset View
Changeset View
Standalone View
Standalone View
lib/Format/TokenAnnotator.cpp
Show First 20 Lines • Show All 1,674 Lines • ▼ Show 20 Lines | if (Left.is(tok::period) || Right.is(tok::period)) | ||||
return false; | return false; | ||||
if (Right.is(tok::hash) && Left.is(tok::identifier) && Left.TokenText == "L") | if (Right.is(tok::hash) && Left.is(tok::identifier) && Left.TokenText == "L") | ||||
return false; | return false; | ||||
if (Left.Type == TT_TemplateCloser && Left.MatchingParen && | if (Left.Type == TT_TemplateCloser && Left.MatchingParen && | ||||
Left.MatchingParen->Previous && | Left.MatchingParen->Previous && | ||||
Left.MatchingParen->Previous->is(tok::period)) | Left.MatchingParen->Previous->is(tok::period)) | ||||
// A.<B>DoSomething(); | // A.<B>DoSomething(); | ||||
return false; | return false; | ||||
if (Left.Type == TT_TemplateCloser && Right.is(tok::l_square)) | |||||
return false; | |||||
return true; | return true; | ||||
} | } | ||||
bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, | bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, | ||||
const FormatToken &Right) { | const FormatToken &Right) { | ||||
const FormatToken &Left = *Right.Previous; | const FormatToken &Left = *Right.Previous; | ||||
if (Style.Language == FormatStyle::LK_Proto) { | if (Style.Language == FormatStyle::LK_Proto) { | ||||
if (Right.is(tok::period) && | if (Right.is(tok::period) && | ||||
▲ Show 20 Lines • Show All 333 Lines • Show Last 20 Lines |