/// translation unit, otherwise it stores the associated EntityImpl.
llvm::PointerUnion<Decl *, EntityImpl *> Val;
- explicit Entity(Decl *D) : Val(D) { }
+ explicit Entity(Decl *D);
explicit Entity(EntityImpl *impl) : Val(impl) { }
friend class EntityGetter;
// Entity Implementation
//===----------------------------------------------------------------------===//
+Entity::Entity(Decl *D) : Val(D->getCanonicalDecl()) { }
+
/// \brief Find the Decl that can be referred to by this entity.
Decl *Entity::getDecl(ASTContext &AST) {
if (isInvalid())