Changeset View
Changeset View
Standalone View
Standalone View
clang/include/clang/AST/ODRDiagsEmitter.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | enum ODRMismatchDecl { | ||||
Field, | Field, | ||||
CXXMethod, | CXXMethod, | ||||
TypeAlias, | TypeAlias, | ||||
TypeDef, | TypeDef, | ||||
Var, | Var, | ||||
Friend, | Friend, | ||||
FunctionTemplate, | FunctionTemplate, | ||||
ObjCMethod, | ObjCMethod, | ||||
ObjCProperty, | |||||
Other | Other | ||||
}; | }; | ||||
struct DiffResult { | struct DiffResult { | ||||
const Decl *FirstDecl = nullptr, *SecondDecl = nullptr; | const Decl *FirstDecl = nullptr, *SecondDecl = nullptr; | ||||
ODRMismatchDecl FirstDiffType = Other, SecondDiffType = Other; | ODRMismatchDecl FirstDiffType = Other, SecondDiffType = Other; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | private: | ||||
/// | /// | ||||
/// Returns true if found a mismatch and diagnosed it. | /// Returns true if found a mismatch and diagnosed it. | ||||
bool diagnoseSubMismatchObjCMethod(const NamedDecl *FirstObjCContainer, | bool diagnoseSubMismatchObjCMethod(const NamedDecl *FirstObjCContainer, | ||||
StringRef FirstModule, | StringRef FirstModule, | ||||
StringRef SecondModule, | StringRef SecondModule, | ||||
const ObjCMethodDecl *FirstMethod, | const ObjCMethodDecl *FirstMethod, | ||||
const ObjCMethodDecl *SecondMethod) const; | const ObjCMethodDecl *SecondMethod) const; | ||||
/// Check if Objective-C properties are the same and diagnose if different. | |||||
/// | |||||
/// Returns true if found a mismatch and diagnosed it. | |||||
bool | |||||
diagnoseSubMismatchObjCProperty(const NamedDecl *FirstObjCContainer, | |||||
StringRef FirstModule, StringRef SecondModule, | |||||
const ObjCPropertyDecl *FirstProp, | |||||
const ObjCPropertyDecl *SecondProp) const; | |||||
private: | private: | ||||
DiagnosticsEngine &Diags; | DiagnosticsEngine &Diags; | ||||
const ASTContext &Context; | const ASTContext &Context; | ||||
const LangOptions &LangOpts; | const LangOptions &LangOpts; | ||||
}; | }; | ||||
} // namespace clang | } // namespace clang | ||||
#endif | #endif |