[cfe-commits] r104631 - /cfe/trunk/include/clang/AST/Decl.h
Douglas Gregor
dgregor at apple.com
Tue May 25 12:53:14 PDT 2010
Author: dgregor
Date: Tue May 25 14:53:14 2010
New Revision: 104631
URL: http://llvm.org/viewvc/llvm-project?rev=104631&view=rev
Log:
Add Redeclarable boilerplate to TypedefDecl, from Peter Collingbourne!
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=104631&r1=104630&r2=104631&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Tue May 25 14:53:14 2010
@@ -1638,7 +1638,19 @@
: TypeDecl(Typedef, DC, L, Id), TInfo(TInfo) {}
virtual ~TypedefDecl();
+
+protected:
+ typedef Redeclarable<TypedefDecl> redeclarable_base;
+ virtual TypedefDecl *getNextRedeclaration() { return RedeclLink.getNext(); }
+
public:
+ typedef redeclarable_base::redecl_iterator redecl_iterator;
+ redecl_iterator redecls_begin() const {
+ return redeclarable_base::redecls_begin();
+ }
+ redecl_iterator redecls_end() const {
+ return redeclarable_base::redecls_end();
+ }
static TypedefDecl *Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *Id,
More information about the cfe-commits
mailing list