bool IsEquivalent(Decl *D1, Decl *D2)
Determine whether the two declarations are structurally equivalent.
std::queue< std::pair< Decl *, Decl * > > DeclsToCheck
static llvm::Optional< unsigned > findUntaggedStructOrUnionIndex(RecordDecl *Anon)
Find the index of the given anonymous struct/union within its context.
bool StrictTypeSpelling
Whether we're being strict about the spelling of types when unifying two types.
ASTContext & FromCtx
AST contexts for which we are checking structural equivalence.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
bool Complain
Whether to complain about failures.
llvm::DenseSet< std::pair< Decl *, Decl * > > VisitedDecls
llvm::DenseSet< std::pair< Decl *, Decl * > > & NonEquivalentDecls
Declaration (from, to) pairs that are known not to be equivalent (which we have already complained ab...
DiagnosticBuilder Diag1(SourceLocation Loc, unsigned DiagID)
bool LastDiagFromC2
true if the last diagnostic came from ToCtx.
DiagnosticBuilder Diag2(SourceLocation Loc, unsigned DiagID)
bool ErrorOnTagTypeMismatch
Whether warn or error on tag type mismatches.
StructuralEquivalenceContext(ASTContext &FromCtx, ASTContext &ToCtx, llvm::DenseSet< std::pair< Decl *, Decl * >> &NonEquivalentDecls, StructuralEquivalenceKind EqKind, bool StrictTypeSpelling=false, bool Complain=true, bool ErrorOnTagTypeMismatch=false)
unsigned getApplicableDiagnostic(unsigned ErrorDiagnostic)
StructuralEquivalenceKind EqKind