From: John McCall Date: Fri, 16 Oct 2009 21:42:04 +0000 (+0000) Subject: Add an accessor to extra the type directly from a DeclaratorInfo X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9067b318604fddf960057fcb59145381c449d9e;p=clang Add an accessor to extra the type directly from a DeclaratorInfo without an opaque call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84277 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 2a077fb223..0b689c7de9 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -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; };