Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions clang/include/clang/AST/ASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -2874,11 +2874,11 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// returned type is guaranteed to be free of any of these, allowing two
/// canonical types to be compared for exact equality with a simple pointer
/// comparison.
CanQualType getCanonicalType(QualType T) const {
static CanQualType getCanonicalType(QualType T) {
return CanQualType::CreateUnsafe(T.getCanonicalType());
}

const Type *getCanonicalType(const Type *T) const {
static const Type *getCanonicalType(const Type *T) {
return T->getCanonicalTypeInternal().getTypePtr();
}

Expand All @@ -2890,10 +2890,10 @@ class ASTContext : public RefCountedBase<ASTContext> {
CanQualType getCanonicalParamType(QualType T) const;

/// Determine whether the given types \p T1 and \p T2 are equivalent.
bool hasSameType(QualType T1, QualType T2) const {
static bool hasSameType(QualType T1, QualType T2) {
return getCanonicalType(T1) == getCanonicalType(T2);
}
bool hasSameType(const Type *T1, const Type *T2) const {
static bool hasSameType(const Type *T1, const Type *T2) {
return getCanonicalType(T1) == getCanonicalType(T2);
}

Expand Down Expand Up @@ -2921,7 +2921,7 @@ class ASTContext : public RefCountedBase<ASTContext> {

/// Determine whether the given types are equivalent after
/// cvr-qualifiers have been removed.
bool hasSameUnqualifiedType(QualType T1, QualType T2) const {
static bool hasSameUnqualifiedType(QualType T1, QualType T2) {
return getCanonicalType(T1).getTypePtr() ==
getCanonicalType(T2).getTypePtr();
}
Expand Down