[cfe-commits] r84277 - /cfe/trunk/include/clang/AST/Decl.h

John McCall rjmccall at apple.com
Fri Oct 16 14:42:07 PDT 2009


Author: rjmccall
Date: Fri Oct 16 16:42:04 2009
New Revision: 84277

URL: http://llvm.org/viewvc/llvm-project?rev=84277&view=rev
Log:
Add an accessor to extra the type directly from a DeclaratorInfo
without an opaque call.


Modified:
    cfe/trunk/include/clang/AST/Decl.h

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=84277&r1=84276&r2=84277&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Fri Oct 16 16:42:04 2009
@@ -47,6 +47,9 @@
   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;
 };





More information about the cfe-commits mailing list