owenpan added a comment. In D143755#4118802 <https://reviews.llvm.org/D143755#4118802>, @vedgy wrote:
> Hi @owenpan. Thank you for fixing this bug! > Have you noticed this paragraph in my bug report? > >> I believe `clang_getTypeSpelling()`, or more likely `QualType::print()` used >> by it, should insert a tab character between such tokens to pretty-print >> compilable code. The tab character is preferable to the space character >> here, because the users may rely on the fact that pretty-printed binary >> operators are surrounded by spaces to distinguish them from angle brackets. Yes, but I'm not familiar with these functions. > KDevelop parses the result of `clang_getTypeSpelling()` when libclang API is > lacking. Since this recent commit > <https://commits.kde.org/kdevelop/kdevelop/7b7690ce25fc150018be59309d2c82a04e43aa43> > KDevelop's parsing relies on the empirical fact that only operators are > surrounded by spaces to distinguish them from angle brackets. Does this > revision introduce angle brackets surrounded by spaces? Can tab characters be > used instead? If not, do you know how else such angle brackets can be > distinguished from operators? This patch should fix the reported invalid-code-generation bug by leaving a space between the overloaded operator and the closing angle bracket. clang-format doesn't insert tabs in the middle of a line (except when doing alignment if `UseTab` is set to `Always`). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143755/new/ https://reviews.llvm.org/D143755 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits