We can certainly use 4, but I'd just mention that this is different from how the current code looks that uses 4.
- Row breaks comments. I don't know if this is a good idea.
- Is it possible to require { } on if-else where each is a single statement?
Eg:
if (Res.isUsable()) Cases.push_back(Res.get());
else return StmtError();
// =>
if (Res.isUsable()) {
Cases.push_back(Res.get());
} else {
return StmtError();
}
Note that single line ifs are fine! Just not anything multi-line should have { }
Sometimes linebreak is weird:
StmtResult Res = Actions.ActOnDeclaration(id->getNameStart(), idLoc, type.get(), InitValue.get());
// becomes
StmtResult Res =
Actions.ActOnDeclaration(id->getNameStart(), idLoc, type.get(), InitValue.get());
// instead of
StmtResult Res = Actions.ActOnDeclaration(id->getNameStart(), idLoc,
type.get(), InitValue.get());