From: Steve Naroff Date: Mon, 27 Aug 2007 01:41:48 +0000 (+0000) Subject: Tweak a comment and assert. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=716c7304ff5d27a95e1e7823acd1d09d5ec3e37f;p=clang Tweak a comment and assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41475 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp index 919cc9e2e2..b0b963c4c8 100644 --- a/AST/ASTContext.cpp +++ b/AST/ASTContext.cpp @@ -685,14 +685,15 @@ static int getFloatingRank(QualType T) { } } -/// getFloatingTypeOfSizeWithinDomain - Returns the either a real floating -/// point type or a complex type (based on typeDomain) of typeSize. -/// typeSize is expected to be a floating point type (real or complex). +/// getFloatingTypeOfSizeWithinDomain - Returns a real floating +/// point or a complex type (based on typeDomain/typeSize). +/// 'typeDomain' is a real floating point or complex type. +/// 'typeSize' is a real floating point or complex type. QualType ASTContext::getFloatingTypeOfSizeWithinDomain( QualType typeSize, QualType typeDomain) const { if (typeDomain->isComplexType()) { switch (getFloatingRank(typeSize)) { - default: assert(0 && "convertRankToComplex(): illegal value for rank"); + default: assert(0 && "getFloatingRank(): illegal value for rank"); case FloatRank: return FloatComplexTy; case DoubleRank: return DoubleComplexTy; case LongDoubleRank: return LongDoubleComplexTy; @@ -700,7 +701,7 @@ QualType ASTContext::getFloatingTypeOfSizeWithinDomain( } if (typeDomain->isRealFloatingType()) { switch (getFloatingRank(typeSize)) { - default: assert(0 && "convertRankToComplex(): illegal value for rank"); + default: assert(0 && "getFloatingRank(): illegal value for rank"); case FloatRank: return FloatTy; case DoubleRank: return DoubleTy; case LongDoubleRank: return LongDoubleTy; diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 2239118a5d..431d298471 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -164,9 +164,10 @@ public: /// different combos: float/float, float/complex, complex/complex. static QualType maxFloatingType(QualType lt, QualType rt); - /// getFloatingTypeOfSizeWithinDomain - Returns the either a real floating - /// point type or a complex type (based on typeDomain) of typeSize. - /// typeSize is expected to be a floating point type (real or complex). + /// getFloatingTypeOfSizeWithinDomain - Returns a real floating + /// point or a complex type (based on typeDomain/typeSize). + /// 'typeDomain' is a real floating point or complex type. + /// 'typeSize' is a real floating point or complex type. QualType getFloatingTypeOfSizeWithinDomain(QualType typeSize, QualType typeDomain) const; private: