LanguageStyle = PredefinedStyle;
}
LanguageStyle->ColumnLimit = CodeStyle.ColumnLimit;
- for (StringRef Delimiter : RawStringFormat.Delimiters) {
+ for (StringRef Delimiter : RawStringFormat.Delimiters)
DelimiterStyle.insert({Delimiter, *LanguageStyle});
- }
- for (StringRef EnclosingFunction : RawStringFormat.EnclosingFunctions) {
+ for (StringRef EnclosingFunction : RawStringFormat.EnclosingFunctions)
EnclosingFunctionStyle.insert({EnclosingFunction, *LanguageStyle});
- }
}
}
private:
void cleanupLine(AnnotatedLine *Line) {
- for (auto *Child : Line->Children) {
+ for (auto *Child : Line->Children)
cleanupLine(Child);
- }
if (Line->Affected) {
cleanupRight(Line->First, tok::comma, tok::comma);
std::set<unsigned> DeletedLines;
for (unsigned i = 0, e = AnnotatedLines.size(); i != e; ++i) {
auto &Line = *AnnotatedLines[i];
- if (Line.startsWithNamespace()) {
+ if (Line.startsWithNamespace())
checkEmptyNamespace(AnnotatedLines, i, i, DeletedLines);
- }
}
for (auto Line : DeletedLines) {
AnnotatedLines[CurrentLine]->Last->Tok.getEndLoc())))
return false;
- for (unsigned i = InitLine; i <= CurrentLine; ++i) {
+ for (unsigned i = InitLine; i <= CurrentLine; ++i)
DeletedLines.insert(i);
- }
return true;
}
IdentifierTable &IdentTable)
: SourceMgr(SourceMgr), Style(Style), Allocator(Allocator),
IdentTable(IdentTable) {
- for (const std::string &Macro : Macros) {
+ for (const std::string &Macro : Macros)
parseDefinition(Macro);
- }
}
MacroExpander::~MacroExpander() = default;
}
for (const auto &ctx : Contexts) {
- if (ctx.InStructArrayInitializer) {
+ if (ctx.InStructArrayInitializer)
return LT_ArrayOfStructInitializer;
- }
}
return LT_Other;