clang  7.0.0svn
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 methodss. 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 233 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 248 of file ASTStructuralEquivalence.cpp.

Referenced by IsTemplateDeclCommonStructurallyEquivalent(), and clang::StructuralEquivalenceContext::StructuralEquivalenceContext().

◆ IsStructurallyEquivalent() [2/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
Decl D1,
Decl D2 
)
static

Determine structural equivalence of two declarations.

Definition at line 1339 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 176 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 53 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 63 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 72 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [7/19]

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

Definition at line 110 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 765 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [9/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
CXXMethodDecl Method1,
CXXMethodDecl Method2 
)
static

Determine structural equivalence of two methodss.

Definition at line 862 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 912 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 1126 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [12/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
TemplateParameterList Params1,
TemplateParameterList Params2 
)
static

Definition at line 1183 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [13/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
TemplateTypeParmDecl D1,
TemplateTypeParmDecl D2 
)
static

Definition at line 1216 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [14/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
NonTypeTemplateParmDecl D1,
NonTypeTemplateParmDecl D2 
)
static

Definition at line 1232 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [15/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
TemplateTemplateParmDecl D1,
TemplateTemplateParmDecl D2 
)
static

Definition at line 1260 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [16/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
ClassTemplateDecl D1,
ClassTemplateDecl D2 
)
static

Definition at line 1289 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [17/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
FunctionTemplateDecl D1,
FunctionTemplateDecl D2 
)
static

Definition at line 1301 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [18/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
FriendDecl D1,
FriendDecl D2 
)
static

Definition at line 1313 of file ASTStructuralEquivalence.cpp.

◆ IsStructurallyEquivalent() [19/19]

static bool IsStructurallyEquivalent ( StructuralEquivalenceContext Context,
FunctionDecl D1,
FunctionDecl D2 
)
static

Definition at line 1329 of file ASTStructuralEquivalence.cpp.

◆ IsTemplateDeclCommonStructurallyEquivalent()

static bool IsTemplateDeclCommonStructurallyEquivalent ( StructuralEquivalenceContext Ctx,
TemplateDecl D1,
TemplateDecl D2 
)
static