Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/Format/Format.cpp | ||
---|---|---|
1135 | Couldn't you just do: for (auto *Tok = Left->Next; Tok && Tok != Right; Tok = Tok->Next) if (Tok->is(tok::comment)) deleteToken(Comment); That way you wouldn't have to store the comments in a vector. |
Comment Actions
One remark, otherwise looks good.
lib/Format/Format.cpp | ||
---|---|---|
1136 | Hm. I think this "if" actually doesn't change behavior. If we remove it, we'd just add already deleted tokens to the set again, which shouldn't hurt (and we do it for comments at the moment). I'd just remove this line. |
Comment Actions
- Addressed review comments.
lib/Format/Format.cpp | ||
---|---|---|
1136 | Wow, from 20 LOC to 2 LOC! Thanks! |
Couldn't you just do:
That way you wouldn't have to store the comments in a vector.