diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 09c98f642852f..0488195ba56b3 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -7035,17 +7035,17 @@ class DependentNameType : public TypeWithKeyword, public llvm::FoldingSetNode { : TypeWithKeyword(Keyword, DependentName, CanonType, TypeDependence::DependentInstantiation | toTypeDependence(NNS->getDependence())), - NNS(NNS), Name(Name) {} + NNS(NNS), Name(Name) { + assert(NNS); + assert(Name); + } public: /// Retrieve the qualification on this type. NestedNameSpecifier *getQualifier() const { return NNS; } - /// Retrieve the type named by the typename specifier as an identifier. - /// - /// This routine will return a non-NULL identifier pointer when the - /// form of the original typename was terminated by an identifier, - /// e.g., "typename T::type". + /// Retrieve the identifier that terminates this type name. + /// For example, "type" in "typename T::type". const IdentifierInfo *getIdentifier() const { return Name; }