aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-10-21 16:15:18 +0000
committerSean Callanan <scallanan@apple.com>2011-10-21 16:15:18 +0000
commit381509ea9965ab6bde9b36b4131ad08bf851d9b4 (patch)
tree4eaebc6d50d2e071b801a3ab9e4187f9803d001b
parenta60448d6dfc91f4c30987e237bf70ef50ac7705b (diff)
Added documentation for the recently-added
addDecl() and makeDeclVisibleInContextInternal() functions, and made the latter private since it does not and should not have external clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142655 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclBase.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index d64e06b87f..37a9f072af 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -1231,7 +1231,15 @@ public:
/// If D is also a NamedDecl, it will be made visible within its
/// semantic context via makeDeclVisibleInContext.
void addDecl(Decl *D);
-
+
+ /// @brief Add the declaration D into this context, but suppress
+ /// searches for external declarations with the same name.
+ ///
+ /// Although analogous in function to addDecl, this removes an
+ /// important check. This is only useful if the Decl is being
+ /// added in response to an external search; in all other cases,
+ /// addDecl() is the right function to use.
+ /// See the ASTImporter for use cases.
void addDeclInternal(Decl *D);
/// @brief Add the declaration D to this context without modifying
@@ -1292,9 +1300,6 @@ public:
/// the lookup tables because it can be easily recovered by walking
/// the declaration chains.
void makeDeclVisibleInContext(NamedDecl *D, bool Recoverable = true);
-
- void makeDeclVisibleInContextInternal(NamedDecl *D,
- bool Recoverable = true);
/// udir_iterator - Iterates through the using-directives stored
/// within this context.
@@ -1359,6 +1364,15 @@ public:
private:
void LoadLexicalDeclsFromExternalStorage() const;
+
+ /// @brief Makes a declaration visible within this context, but
+ /// suppresses searches for external declarations with the same
+ /// name.
+ ///
+ /// Analogous to makeDeclVisibleInContext, but for the exclusive
+ /// use of addDeclInternal().
+ void makeDeclVisibleInContextInternal(NamedDecl *D,
+ bool Recoverable = true);
friend class DependentDiagnostic;
StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const;