From d9067b318604fddf960057fcb59145381c449d9e Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 16 Oct 2009 21:42:04 +0000 Subject: [PATCH] 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 --- include/clang/AST/Decl.h | 3 +++ 1 file changed, 3 insertions(+) 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; }; -- 2.40.0