summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-10-16 21:42:04 +0000
committerJohn McCall <rjmccall@apple.com>2009-10-16 21:42:04 +0000
commitff47031601a48c44c8721b1063122774090ebcf0 (patch)
tree8c2803aaa80be5cd825cb634756994a902f522cc
parent12524fd2e554450a28d1beaa758fc3629c5757e3 (diff)
downloadbcm5719-llvm-ff47031601a48c44c8721b1063122774090ebcf0.tar.gz
bcm5719-llvm-ff47031601a48c44c8721b1063122774090ebcf0.zip
Add an accessor to extra the type directly from a DeclaratorInfo
without an opaque call. llvm-svn: 84277
-rw-r--r--clang/include/clang/AST/Decl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 2a077fb2238..0b689c7de9d 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/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;
};
OpenPOWER on IntegriCloud