krasimir added inline comments.
================
Comment at: lib/Format/UnwrappedLineParser.cpp:464
+ for (const auto &i : PPStack) {
+ hash_combine(h, i.Kind);
+ hash_combine(h, i.Line);
----------------
When I patch this, I get an `UnwrappedLineParser.cpp:457:16 error: implicit
instantiation of undefined template
'std::hash<clang::format::UnwrappedLineParser::PPBranchKind>'`.
================
Comment at: lib/Format/UnwrappedLineParser.h:158
bool isOnNewLine(const FormatToken &FormatTok);
+ size_t computePPHash() const;
----------------
Please add a short comment of why is the preprocessor hash needed.
================
Comment at: lib/Format/UnwrappedLineParser.h:213
+ PPBranch(PPBranchKind Kind, size_t Line) : Kind(Kind), Line(Line) {}
+ bool operator==(PPBranchKind Kind) const { return Kind == this->Kind; }
+ PPBranchKind Kind;
----------------
This `operator==` is confusing. Please remove it.
https://reviews.llvm.org/D35483
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits