diff options
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r-- | include/clang/AST/DeclBase.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index dcd2482eb3..6e04e55312 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -617,6 +617,12 @@ public: /// inline namespaces. bool isTransparentContext() const; + /// \brief Determine whether this declaration context is equivalent + /// to the declaration context DC. + bool Equals(DeclContext *DC) { + return this->getPrimaryContext() == DC->getPrimaryContext(); + } + /// \brief Determine whether this declaration context encloses the /// declaration context DC. bool Encloses(DeclContext *DC); |