Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion clang/include/clang/AST/CXXInheritance.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class CXXBasePaths {
/// Determine whether the path from the most-derived type to the
/// given base type is ambiguous (i.e., it refers to multiple subobjects of
/// the same base type).
bool isAmbiguous(CanQualType BaseType);
bool isAmbiguous(CanQualType BaseType) const;

/// Whether we are finding multiple paths to detect ambiguities.
bool isFindingAmbiguities() const { return FindAmbiguities; }
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/AST/CXXInheritance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ using namespace clang;
/// ambiguous, i.e., there are two or more paths that refer to
/// different base class subobjects of the same type. BaseType must be
/// an unqualified, canonical class type.
bool CXXBasePaths::isAmbiguous(CanQualType BaseType) {
bool CXXBasePaths::isAmbiguous(CanQualType BaseType) const {
BaseType = BaseType.getUnqualifiedType();
IsVirtBaseAndNumberNonVirtBases Subobjects = ClassSubobjects[BaseType];
IsVirtBaseAndNumberNonVirtBases Subobjects = ClassSubobjects.lookup(BaseType);
return Subobjects.NumberOfNonVirtBases + (Subobjects.IsVirtBase ? 1 : 0) > 1;
}

Expand Down