Home | History | Annotate | Download | only in AST

Lines Matching defs:CanQual

10 //  This file defines the CanQual class template, which provides access to
33 /// The CanQual template is a lightweight smart pointer that provides access
39 /// BuiltinType, etc.). The type stored within @c CanQual<T> will be of that
41 /// a shorthand for @c CanQual<Type>.
43 /// An instance of @c CanQual<T> can be implicitly converted to a
44 /// @c CanQual<U> when T is derived from U, which essentially provides an
45 /// implicit upcast. For example, @c CanQual<LValueReferenceType> can be
46 /// converted to @c CanQual<ReferenceType>. Note that any @c CanQual type can
52 class CanQual {
58 CanQual() : Stored() { }
63 CanQual(const CanQual<U> &Other,
98 /// void f(CanQual<Type> T) {
99 /// if (CanQual<PointerType> Ptr = T->getAs<PointerType>()) {
143 CanQual<T> getUnqualifiedType() const;
153 bool isMoreQualifiedThan(CanQual<T> Other) const {
159 bool isAtLeastAsQualifiedAs(CanQual<T> Other) const {
165 CanQual<Type> getNonReferenceType() const;
171 static CanQual<T> getFromOpaquePtr(void *Ptr);
178 static CanQual<T> CreateUnsafe(QualType Other);
188 inline bool operator==(CanQual<T> x, CanQual<U> y) {
193 inline bool operator!=(CanQual<T> x, CanQual<U> y) {
198 typedef CanQual<Type> CanQualType;
227 CanQual<T> Stored;
238 /// if (CanQual<PointerType> Ptr = T->getAs<PointerType>()) { ... }
326 /// canonical type or as the result of the @c CanQual<T>::getAs member
339 CanProxy(CanQual<T> Stored) { this->Stored = Stored; }
342 operator CanQual<T>() const { return this->Stored; }
349 /// Implement simplify_type for CanQual<T>, so that we can dyn_cast from
350 /// CanQual<T> to a specific Type class. We're prefer isa/dyn_cast/cast/etc.
353 struct simplify_type< ::clang::CanQual<T> > {
355 static SimpleType getSimplifiedValue(::clang::CanQual<T> Val) {
360 // Teach SmallPtrSet that CanQual<T> is "basically a pointer".
362 class PointerLikeTypeTraits<clang::CanQual<T> > {
364 static inline void *getAsVoidPointer(clang::CanQual<T> P) {
367 static inline clang::CanQual<T> getFromVoidPointer(void *P) {
368 return clang::CanQual<T>::getFromOpaquePtr(P);
599 inline CanQual<T> CanQual<T>::getUnqualifiedType() const {
600 return CanQual<T>::CreateUnsafe(Stored.getLocalUnqualifiedType());
604 inline CanQual<Type> CanQual<T>::getNonReferenceType() const {
605 if (CanQual<ReferenceType> RefType = getAs<ReferenceType>())
612 CanQual<T> CanQual<T>::getFromOpaquePtr(void *Ptr) {
613 CanQual<T> Result;
621 CanQual<T> CanQual<T>::CreateUnsafe(QualType Other) {
625 CanQual<T> Result;
632 CanProxy<U> CanQual<T>::getAs() const {
640 return CanQual<U>::CreateUnsafe(Stored);
647 CanProxy<U> CanQual<T>::castAs() const {
652 return CanQual<U>::CreateUnsafe(Stored);
656 CanProxy<T> CanQual<T>::operator->() const {