Skip to content
Snippets Groups Projects
Commit c896ad06 authored by Douglas Gregor's avatar Douglas Gregor
Browse files

Introduce Decl::isSameEntityAs(), to help compare declarations using

their canonical Decl nodes. Not used yet, but it will be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146591 91177308-0d34-0410-b5e6-96231b3b80d8
parent d3d08533
No related branches found
No related tags found
No related merge requests found
......@@ -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.
///
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment