summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/IdentifierResolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/IdentifierResolver.h')
-rw-r--r--include/clang/Sema/IdentifierResolver.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/clang/Sema/IdentifierResolver.h b/include/clang/Sema/IdentifierResolver.h
index 7e9d338..8d79fc0 100644
--- a/include/clang/Sema/IdentifierResolver.h
+++ b/include/clang/Sema/IdentifierResolver.h
@@ -28,7 +28,7 @@ class Scope;
/// IdentifierResolver - Keeps track of shadowed decls on enclosing
/// scopes. It manages the shadowing chains of declaration names and
-/// implements efficent decl lookup based on a declaration name.
+/// implements efficient decl lookup based on a declaration name.
class IdentifierResolver {
/// IdDeclInfo - Keeps track of information about decls associated
@@ -53,6 +53,11 @@ class IdentifierResolver {
/// declaration was not found, returns false.
bool ReplaceDecl(NamedDecl *Old, NamedDecl *New);
+ /// \brief Insert the given declaration at the given position in the list.
+ void InsertDecl(DeclsTy::iterator Pos, NamedDecl *D) {
+ Decls.insert(Pos, D);
+ }
+
private:
DeclsTy Decls;
};
@@ -146,8 +151,13 @@ public:
/// isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true
/// if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns
/// true if 'D' belongs to the given declaration context.
+ ///
+ /// \param ExplicitInstantiationOrSpecialization When true, we are checking
+ /// whether the declaration is in scope for the purposes of explicit template
+ /// instantiation or specialization. The default is false.
bool isDeclInScope(Decl *D, DeclContext *Ctx, ASTContext &Context,
- Scope *S = 0) const;
+ Scope *S = 0,
+ bool ExplicitInstantiationOrSpecialization = false) const;
/// AddDecl - Link the decl to its shadowed decl chain.
void AddDecl(NamedDecl *D);
@@ -161,6 +171,10 @@ public:
/// (and, therefore, replaced).
bool ReplaceDecl(NamedDecl *Old, NamedDecl *New);
+ /// \brief Insert the given declaration after the given iterator
+ /// position.
+ void InsertDeclAfter(iterator Pos, NamedDecl *D);
+
/// \brief Link the declaration into the chain of declarations for
/// the given identifier.
///
OpenPOWER on IntegriCloud