# Changeset View

Changeset View

# Standalone View

Standalone View

# include/clang/AST/Type.h

Show First 20 Lines • Show All 6579 Lines • ▼ Show 20 Line(s) | |||||

6580 | 6580 | | |||

6581 | // Return the number of integral bits in a fixed point type. | 6581 | // Return the number of integral bits in a fixed point type. | ||

6582 | unsigned getFixedPointIBits(const Type &Ty); | 6582 | unsigned getFixedPointIBits(const Type &Ty); | ||

6583 | 6583 | | |||

6584 | inline unsigned getFixedPointIBits(const QualType &Ty) { | 6584 | inline unsigned getFixedPointIBits(const QualType &Ty) { | ||

6585 | return getFixedPointIBits(*Ty); | 6585 | return getFixedPointIBits(*Ty); | ||

6586 | } | 6586 | } | ||

6587 | 6587 | | |||

6588 | // For a given fixed point type, if the type is unsaturated, | ||||

6589 | // return the saturated equivalent of it. Otherwise if it is | ||||

6590 | // saturated, return back the type itself. | ||||

6591 | QualType getCorrespondingSaturatedFixedPointType(ASTContext &Context, | ||||

ebevhan: If these need to be passed a ASTContext anyway, why not have these functions on ASTContext to… | |||||

6592 | const Type &Ty); | ||||

6593 | | ||||

6594 | // For a given fixed point type, if the type is unsigned, | ||||

6595 | // return the signed equivalent of it. Otherwise if it is | ||||

6596 | // signed, return back the type itself. | ||||

6597 | QualType getCorrespondingSignedFixedPointType(ASTContext &Context, | ||||

6598 | const Type &Ty); | ||||

6599 | | ||||

6588 | } // namespace clang | 6600 | } // namespace clang | ||

6589 | 6601 | | |||

6590 | #endif // LLVM_CLANG_AST_TYPE_H | 6602 | #endif // LLVM_CLANG_AST_TYPE_H |

If these need to be passed a ASTContext anyway, why not have these functions on ASTContext to begin with?