clang 8.0.0

Functions
ASTStructuralEquivalence.cpp File Reference
`#include "clang/AST/ASTStructuralEquivalence.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/AST/ASTDiagnostic.h"`
`#include "clang/AST/Decl.h"`
`#include "clang/AST/DeclBase.h"`
`#include "clang/AST/DeclCXX.h"`
`#include "clang/AST/DeclFriend.h"`
`#include "clang/AST/DeclObjC.h"`
`#include "clang/AST/DeclTemplate.h"`
`#include "clang/AST/NestedNameSpecifier.h"`
`#include "clang/AST/TemplateBase.h"`
`#include "clang/AST/TemplateName.h"`
`#include "clang/AST/Type.h"`
`#include "clang/Basic/ExceptionSpecificationType.h"`
`#include "clang/Basic/IdentifierTable.h"`
`#include "clang/Basic/LLVM.h"`
`#include "clang/Basic/SourceLocation.h"`
`#include "llvm/ADT/APInt.h"`
`#include "llvm/ADT/APSInt.h"`
`#include "llvm/ADT/None.h"`
`#include "llvm/ADT/Optional.h"`
`#include "llvm/Support/Casting.h"`
`#include "llvm/Support/Compiler.h"`
`#include "llvm/Support/ErrorHandling.h"`
`#include <cassert>`
`#include <utility>`
Include dependency graph for ASTStructuralEquivalence.cpp:

Go to the source code of this file.

## Functions
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, QualType T1, QualType T2)
| Determine structural equivalence of two types. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, Decl *D1, Decl *D2)
| Determine structural equivalence of two declarations. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, const TemplateArgument &Arg1, const TemplateArgument &Arg2)
| Determine whether two template arguments are equivalent. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, const Expr *E1, const Expr *E2)
| Determine structural equivalence of two expressions. More...
static bool | IsStructurallyEquivalent (const IdentifierInfo *Name1, const IdentifierInfo *Name2)
| Determine whether two identifiers are equivalent. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, NestedNameSpecifier *NNS1, NestedNameSpecifier *NNS2)
| Determine whether two nested-name-specifiers are equivalent. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, const TemplateName &N1, const TemplateName &N2)
static bool | IsArrayStructurallyEquivalent (StructuralEquivalenceContext &Context, const ArrayType *Array1, const ArrayType *Array2)
| Determine structural equivalence for the common part of array types. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, FieldDecl *Field1, FieldDecl *Field2)
| Determine structural equivalence of two fields. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, CXXMethodDecl *Method1, CXXMethodDecl *Method2)
| Determine structural equivalence of two methods. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2)
| Determine structural equivalence of two records. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, EnumDecl *D1, EnumDecl *D2)
| Determine structural equivalence of two enums. More...
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, TemplateParameterList *Params1, TemplateParameterList *Params2)
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, TemplateTypeParmDecl *D1, TemplateTypeParmDecl *D2)
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, NonTypeTemplateParmDecl *D1, NonTypeTemplateParmDecl *D2)
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, TemplateTemplateParmDecl *D1, TemplateTemplateParmDecl *D2)
static bool | IsTemplateDeclCommonStructurallyEquivalent (StructuralEquivalenceContext &Ctx, TemplateDecl *D1, TemplateDecl *D2)
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, ClassTemplateDecl *D1, ClassTemplateDecl *D2)
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, FunctionTemplateDecl *D1, FunctionTemplateDecl *D2)
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, FriendDecl *D1, FriendDecl *D2)
static bool | IsStructurallyEquivalent (StructuralEquivalenceContext &Context, FunctionDecl *D1, FunctionDecl *D2)

## Function Documentation

## ◆ IsArrayStructurallyEquivalent()

static bool IsArrayStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | const ArrayType * | Array1,
|  | const ArrayType * | Array2
| ) |  |
| static

Determine structural equivalence for the common part of array types.

Definition at line 286 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [1/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | QualType | T1,
|  | QualType | T2
| ) |  |
| static

Determine structural equivalence of two types.

Definition at line 301 of file ASTStructuralEquivalence.cpp.

Referenced by clang::ASTImporter::GetOriginalDecl(), clang::StructuralEquivalenceContext::IsEquivalent(), and IsTemplateDeclCommonStructurallyEquivalent().

## ◆ IsStructurallyEquivalent() [2/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | Decl * | D1,
|  | Decl * | D2
| ) |  |
| static

Determine structural equivalence of two declarations.

Definition at line 1406 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [3/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | const TemplateArgument & | Arg1,
|  | const TemplateArgument & | Arg2
| ) |  |
| static

Determine whether two template arguments are equivalent.

Definition at line 229 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [4/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | const Expr * | E1,
|  | const Expr * | E2
| ) |  |
| static

Determine structural equivalence of two expressions.

Definition at line 106 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [5/19]

static bool IsStructurallyEquivalent | ( | const IdentifierInfo * | Name1,
|  | const IdentifierInfo * | Name2
| ) |  |
| static

Determine whether two identifiers are equivalent.

Definition at line 116 of file ASTStructuralEquivalence.cpp.

References clang::IdentifierInfo::getName().

## ◆ IsStructurallyEquivalent() [6/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | NestedNameSpecifier * | NNS1,
|  | NestedNameSpecifier * | NNS2
| ) |  |
| static

Determine whether two nested-name-specifiers are equivalent.

Definition at line 125 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [7/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | const TemplateName & | N1,
|  | const TemplateName & | N2
| ) |  |
| static

Definition at line 163 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [8/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | FieldDecl * | Field1,
|  | FieldDecl * | Field2
| ) |  |
| static

Determine structural equivalence of two fields.

Definition at line 818 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [9/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | CXXMethodDecl * | Method1,
|  | CXXMethodDecl * | Method2
| ) |  |
| static

Determine structural equivalence of two methods.

Definition at line 915 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [10/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | RecordDecl * | D1,
|  | RecordDecl * | D2
| ) |  |
| static

Determine structural equivalence of two records.

Definition at line 965 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [11/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | EnumDecl * | D1,
|  | EnumDecl * | D2
| ) |  |
| static

Determine structural equivalence of two enums.

Definition at line 1185 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [12/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | TemplateParameterList * | Params1,
|  | TemplateParameterList * | Params2
| ) |  |
| static

Definition at line 1250 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [13/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | TemplateTypeParmDecl * | D1,
|  | TemplateTypeParmDecl * | D2
| ) |  |
| static

Definition at line 1283 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [14/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | NonTypeTemplateParmDecl * | D1,
|  | NonTypeTemplateParmDecl * | D2
| ) |  |
| static

Definition at line 1299 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [15/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | TemplateTemplateParmDecl * | D1,
|  | TemplateTemplateParmDecl * | D2
| ) |  |
| static

Definition at line 1327 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [16/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | ClassTemplateDecl * | D1,
|  | ClassTemplateDecl * | D2
| ) |  |
| static

Definition at line 1356 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [17/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | FunctionTemplateDecl * | D1,
|  | FunctionTemplateDecl * | D2
| ) |  |
| static

Definition at line 1368 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [18/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | FriendDecl * | D1,
|  | FriendDecl * | D2
| ) |  |
| static

Definition at line 1380 of file ASTStructuralEquivalence.cpp.

## ◆ IsStructurallyEquivalent() [19/19]

static bool IsStructurallyEquivalent | ( | StructuralEquivalenceContext & | Context,
|  | FunctionDecl * | D1,
|  | FunctionDecl * | D2
| ) |  |
| static

Definition at line 1396 of file ASTStructuralEquivalence.cpp.

## ◆ IsTemplateDeclCommonStructurallyEquivalent()

static bool IsTemplateDeclCommonStructurallyEquivalent | ( | StructuralEquivalenceContext & | Ctx,
|  | TemplateDecl * | D1,
|  | TemplateDecl * | D2
| ) |  |
| static

Definition at line 1345 of file ASTStructuralEquivalence.cpp.

References clang::NamedDecl::getIdentifier(), clang::NamedDecl::getNameAsString(), clang::TemplateDecl::getTemplateParameters(), and IsStructurallyEquivalent().