ilya-biryukov added inline comments.
================ Comment at: lib/AST/RawCommentList.cpp:376 + SourceMgr.getSpellingColumnNumber(Tok.getLocation(), &LocInvalid); + if (LocInvalid) + TokColumn = 0; ---------------- ioeric wrote: > This is a bit confusing... Could you please add comments about the behavior > here (as chatted offline)? After thinking about it for a while, decided to add an assert that location was valid instead. Invalid locations don't make any sense there, since we won't be able to get the comment text in case of invalid locs. ================ Comment at: lib/AST/RawCommentList.cpp:394 + : std::min(WhitespaceLen, + (size_t)std::max((int)IndentColumn - (int)TokColumn, 0)); + llvm::StringRef Trimmed = TokText.drop_front(SkipLen); ---------------- ioeric wrote: > use `static_cast` instead of conversions. Done. Rewrote the code to keep the reduce the number of casts too. It was unreadable with 3 static casts and default formatting. Repository: rC Clang https://reviews.llvm.org/D46000 _______________________________________________ cfe-commits mailing list [email protected] http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
