15 #ifndef LLVM_CLANG_AST_ASTSTRUCTURALEQUIVALENCE_H 16 #define LLVM_CLANG_AST_ASTSTRUCTURALEQUIVALENCE_H 19 #include "llvm/ADT/DenseMap.h" 20 #include "llvm/ADT/DenseSet.h" 21 #include "llvm/ADT/Optional.h" 29 class DiagnosticBuilder;
72 bool LastDiagFromC2 =
false;
78 bool StrictTypeSpelling =
false,
bool Complain =
true,
79 bool ErrorOnTagTypeMismatch =
false)
80 : FromCtx(FromCtx), ToCtx(ToCtx), NonEquivalentDecls(NonEquivalentDecls),
81 EqKind(EqKind), StrictTypeSpelling(StrictTypeSpelling),
82 ErrorOnTagTypeMismatch(ErrorOnTagTypeMismatch), Complain(Complain) {}
93 bool IsEquivalent(
Decl *D1,
Decl *D2);
113 findUntaggedStructOrUnionIndex(
RecordDecl *Anon);
125 bool CheckCommonEquivalence(
Decl *D1,
Decl *D2);
130 bool CheckKindSpecificEquivalence(
Decl *D1,
Decl *D2);
135 #endif // LLVM_CLANG_AST_ASTSTRUCTURALEQUIVALENCE_H StructuralEquivalenceContext(ASTContext &FromCtx, ASTContext &ToCtx, llvm::DenseSet< std::pair< Decl *, Decl *>> &NonEquivalentDecls, StructuralEquivalenceKind EqKind, bool StrictTypeSpelling=false, bool Complain=true, bool ErrorOnTagTypeMismatch=false)
A (possibly-)qualified type.
Decl - This represents one declaration (or definition), e.g.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
Represents a struct/union/class.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
bool ErrorOnTagTypeMismatch
Whether warn or error on tag type mismatches.
bool StrictTypeSpelling
Whether we're being strict about the spelling of types when unifying two types.
StructuralEquivalenceKind EqKind
A little helper class used to produce diagnostics.
Encodes a location in the source.
StructuralEquivalenceKind
Whether to perform a normal or minimal equivalence check.
Dataflow Directional Tag Classes.
llvm::DenseSet< std::pair< Decl *, Decl * > > & NonEquivalentDecls
Declaration (from, to) pairs that are known not to be equivalent (which we have already complained ab...
llvm::DenseMap< Decl *, Decl * > TentativeEquivalences
The set of "tentative" equivalences between two canonical declarations, mapping from a declaration in...
std::deque< Decl * > DeclsToCheck
Queue of declarations in the first context whose equivalence with a declaration in the second context...
bool Complain
Whether to complain about failures.