On Mon, Aug 6, 2012 at 6:39 PM, Ted Kremenek <[email protected]> wrote: > This looks great. One comment: > >> std::string ArgType::getRepresentativeTypeName(ASTContext &C) const { >> std::string S = getRepresentativeType(C).getAsString(); >> - if (Name && S != Name) >> - return std::string("'") + Name + "' (aka '" + S + "')"; >> + std::string Alias; >> + if (Name) { >> + Alias = Name; >> + if (Ptr) >> + Alias += (Alias[Alias.size()-1] == '*') ? "*" : " *"; >> + if (S == Alias) >> + Alias.clear(); >> + } >> + >> + if (!Alias.empty()) >> + return std::string("'") + Alias + "' (aka '" + S + "')"; >> return std::string("'") + S + "'"; >> } > > Can you add some comments here, specifically around the string construction, > that says what it is trying to accomplish? > > Overall, the rest of it looks pretty obvious. Nice clean refactoring, with a > bunch of the expected checking logic.
Thanks! Landed r161403, r161407 (with extra comments) and r161408. - Hans _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
