================ @@ -315,12 +315,16 @@ std::string JSONNodeDumper::createPointerRepresentation(const void *Ptr) { llvm::json::Object JSONNodeDumper::createQualType(QualType QT, bool Desugar) { SplitQualType SQT = QT.split(); - llvm::json::Object Ret{{"qualType", QualType::getAsString(SQT, PrintPolicy)}}; + std::string SQTS = QualType::getAsString(SQT, PrintPolicy); + llvm::json::Object Ret{{"qualType", SQTS}}; if (Desugar && !QT.isNull()) { SplitQualType DSQT = QT.getSplitDesugaredType(); - if (DSQT != SQT) - Ret["desugaredQualType"] = QualType::getAsString(DSQT, PrintPolicy); + if (DSQT != SQT) { + std::string DSQTS = QualType::getAsString(DSQT, PrintPolicy); + if (DSQTS != SQTS) + Ret["desugaredQualType"] = DSQTS; + } ---------------- cor3ntin wrote:
You could make the argument that it make sense for json to have both. Not having it slightly complicate the logic of consumer code. I think we need to decide to either: - keep it - document the change in a ReleaseNotes entry. https://github.com/llvm/llvm-project/pull/65214 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits