]> granicus.if.org Git - clang/commitdiff
Add an accessor to extra the type directly from a DeclaratorInfo
authorJohn McCall <rjmccall@apple.com>
Fri, 16 Oct 2009 21:42:04 +0000 (21:42 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 16 Oct 2009 21:42:04 +0000 (21:42 +0000)
without an opaque call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84277 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Decl.h

index 2a077fb2238b3c3d96f80f9fe17dc1966bb236c9..0b689c7de9d329e4247f4a7f420810f482fe22f4 100644 (file)
@@ -47,6 +47,9 @@ class DeclaratorInfo {
   friend class ASTContext;
   DeclaratorInfo(QualType ty) : Ty(ty) { }
 public:
+  /// \brief Return the type wrapped by this type source info.
+  QualType getType() const { return Ty; }
+
   /// \brief Return the TypeLoc wrapper for the type source info.
   TypeLoc getTypeLoc() const;
 };