aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r--include/clang/AST/DeclBase.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 0979733644..e43f15d79a 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -578,12 +578,9 @@ public:
/// inline namespaces.
bool isTransparentContext() const;
- bool Encloses(DeclContext *DC) const {
- for (; DC; DC = DC->getParent())
- if (DC == this)
- return true;
- return false;
- }
+ /// \brief Determine whether this declaration context encloses the
+ /// declaration context DC.
+ bool Encloses(DeclContext *DC);
/// getPrimaryContext - There may be many different
/// declarations of the same entity (including forward declarations