Deleted Added
full compact
Decl.h (199482) Decl.h (199990)
1//===--- Decl.h - Classes for representing declarations ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 40 unchanged lines hidden (view full) ---

49public:
50 /// \brief Return the type wrapped by this type source info.
51 QualType getType() const { return Ty; }
52
53 /// \brief Return the TypeLoc wrapper for the type source info.
54 TypeLoc getTypeLoc() const;
55};
56
1//===--- Decl.h - Classes for representing declarations ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 40 unchanged lines hidden (view full) ---

49public:
50 /// \brief Return the type wrapped by this type source info.
51 QualType getType() const { return Ty; }
52
53 /// \brief Return the TypeLoc wrapper for the type source info.
54 TypeLoc getTypeLoc() const;
55};
56
57/// UnresolvedSet - A set of unresolved declarations. This is needed
58/// in a lot of places, but isn't really worth breaking into its own
59/// header right now.
60class UnresolvedSet {
61 typedef llvm::SmallVector<NamedDecl*, 4> DeclsTy;
62 DeclsTy Decls;
63
64public:
65 void addDecl(NamedDecl *D) {
66 Decls.push_back(D);
67 }
68
69 bool replace(const NamedDecl* Old, NamedDecl *New) {
70 for (DeclsTy::iterator I = Decls.begin(), E = Decls.end(); I != E; ++I)
71 if (*I == Old)
72 return (*I = New, true);
73 return false;
74 }
75
76 unsigned size() const { return Decls.size(); }
77
78 typedef DeclsTy::const_iterator iterator;
79 iterator begin() const { return Decls.begin(); }
80 iterator end() const { return Decls.end(); }
81};
82
57/// TranslationUnitDecl - The top declaration context.
58class TranslationUnitDecl : public Decl, public DeclContext {
59 ASTContext &Ctx;
60
61 explicit TranslationUnitDecl(ASTContext &ctx)
62 : Decl(TranslationUnit, 0, SourceLocation()),
63 DeclContext(TranslationUnit),
64 Ctx(ctx) {}

--- 102 unchanged lines hidden (view full) ---

167 /// redeclaration of the same variable or function, but not if it is
168 /// a declaration of a different kind (function vs. class) or an
169 /// overloaded function.
170 bool declarationReplaces(NamedDecl *OldD) const;
171
172 /// \brief Determine whether this declaration has linkage.
173 bool hasLinkage() const;
174
83/// TranslationUnitDecl - The top declaration context.
84class TranslationUnitDecl : public Decl, public DeclContext {
85 ASTContext &Ctx;
86
87 explicit TranslationUnitDecl(ASTContext &ctx)
88 : Decl(TranslationUnit, 0, SourceLocation()),
89 DeclContext(TranslationUnit),
90 Ctx(ctx) {}

--- 102 unchanged lines hidden (view full) ---

193 /// redeclaration of the same variable or function, but not if it is
194 /// a declaration of a different kind (function vs. class) or an
195 /// overloaded function.
196 bool declarationReplaces(NamedDecl *OldD) const;
197
198 /// \brief Determine whether this declaration has linkage.
199 bool hasLinkage() const;
200
201 /// \brief Describes the different kinds of linkage
202 /// (C++ [basic.link], C99 6.2.2) that an entity may have.
203 enum Linkage {
204 /// \brief No linkage, which means that the entity is unique and
205 /// can only be referred to from within its scope.
206 NoLinkage = 0,
207
208 /// \brief Internal linkage, which indicates that the entity can
209 /// be referred to from within the translation unit (but not other
210 /// translation units).
211 InternalLinkage,
212
213 /// \brief External linkage, which indicates that the entity can
214 /// be referred to from other translation units.
215 ExternalLinkage
216 };
217
218 /// \brief Determine what kind of linkage this entity has.
219 Linkage getLinkage() const;
220
175 /// \brief Looks through UsingDecls and ObjCCompatibleAliasDecls for
176 /// the underlying named decl.
177 NamedDecl *getUnderlyingDecl();
178 const NamedDecl *getUnderlyingDecl() const {
179 return const_cast<NamedDecl*>(this)->getUnderlyingDecl();
180 }
181
182 static bool classof(const Decl *D) {

--- 1601 unchanged lines hidden ---
221 /// \brief Looks through UsingDecls and ObjCCompatibleAliasDecls for
222 /// the underlying named decl.
223 NamedDecl *getUnderlyingDecl();
224 const NamedDecl *getUnderlyingDecl() const {
225 return const_cast<NamedDecl*>(this)->getUnderlyingDecl();
226 }
227
228 static bool classof(const Decl *D) {

--- 1601 unchanged lines hidden ---