aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclBase.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index ab36054969..20f46a4172 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -590,6 +590,12 @@ public:
/// \brief Whether this particular Decl is a canonical one.
bool isCanonicalDecl() const { return getCanonicalDecl() == this; }
+ /// \brief Determine whether this declaration declares the same entity as
+ /// the other declaration.
+ bool isSameEntityAs(const Decl *Other) const {
+ return getCanonicalDecl() == Other->getCanonicalDecl();
+ }
+
protected:
/// \brief Returns the next redeclaration or itself if this is the only decl.
///