]> granicus.if.org Git - clang/commitdiff
Introduce TypedefLoc::getTypedefDecl().
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Sep 2009 19:44:47 +0000 (19:44 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Sep 2009 19:44:47 +0000 (19:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83096 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/TypeLoc.h

index 5e8b0a0f43f43edcc30e69c16cb6c211ee2e2658..dfa69a979ea94370f32fea50360661d2ac9843db 100644 (file)
@@ -139,6 +139,10 @@ public:
     return SourceRange(getNameLoc(), getNameLoc());
   }
 
+  TypedefDecl *getTypedefDecl() const {
+    return cast<TypedefType>(Ty)->getDecl();
+  }
+
   /// \brief Returns the size of the type source info data block that is
   /// specific to this type.
   unsigned getLocalDataSize() const { return sizeof(Info); }