diff options
Diffstat (limited to 'lib/Analysis/FormatString.cpp')
-rw-r--r-- | lib/Analysis/FormatString.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Analysis/FormatString.cpp b/lib/Analysis/FormatString.cpp index fe308471bd..2d56c233b6 100644 --- a/lib/Analysis/FormatString.cpp +++ b/lib/Analysis/FormatString.cpp @@ -228,7 +228,6 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const { return false; } - case TypedefTy: case SpecificTy: { argTy = C.getCanonicalType(argTy).getUnqualifiedType(); if (T == argTy) @@ -332,7 +331,6 @@ QualType ArgTypeResult::getRepresentativeType(ASTContext &C) const { case AnyCharTy: return C.CharTy; case SpecificTy: - case TypedefTy: return T; case CStrTy: return C.getPointerType(C.CharTy); @@ -354,9 +352,10 @@ QualType ArgTypeResult::getRepresentativeType(ASTContext &C) const { } std::string ArgTypeResult::getRepresentativeTypeName(ASTContext &C) const { - if (K != TypedefTy) - return std::string("'") + getRepresentativeType(C).getAsString() + "'"; - return std::string("'") + Name + "' (aka '" + T.getAsString() + "')"; + std::string S = getRepresentativeType(C).getAsString(); + if (Name) + return std::string("'") + Name + "' (aka '" + S + "')"; + return std::string("'") + S + "'"; } |