clang 22.0.0git
|
Classes | |
class | MatchFinder |
A class to allow finding matches over the Clang AST. More... | |
class | UncheckedStatusOrAccessDiagnoser |
class | UncheckedStatusOrAccessModel |
struct | UncheckedStatusOrAccessModelOptions |
Typedefs | |
using | LatticeTransferState |
using | StatementMatcher |
Definition at line 84 of file UncheckedStatusOrAccessModel.h.
Definition at line 146 of file ASTMatchers.h.
|
static |
Definition at line 128 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::get(), clang::CallExpr::getArg(), clang::CXXMemberCallExpr::getExprLoc(), clang::dataflow::getImplicitObjectLocation(), isSafeUnwrap(), valueCall(), and valueOperatorCall().
Referenced by clang::dataflow::statusor_model::UncheckedStatusOrAccessDiagnoser::UncheckedStatusOrAccessDiagnoser().
CFGMatchSwitch< LatticeTransferState > clang::dataflow::statusor_model::buildTransferMatchSwitch | ( | ASTContext & | Ctx, |
CFGMatchSwitchBuilder< LatticeTransferState > | Builder ) |
Definition at line 248 of file UncheckedStatusOrAccessModel.cpp.
References isStatusOrMemberCallWithName(), and transferStatusOrOkCall().
Referenced by clang::dataflow::statusor_model::UncheckedStatusOrAccessModel::UncheckedStatusOrAccessModel().
QualType clang::dataflow::statusor_model::findStatusType | ( | const ASTContext & | Ctx | ) |
Definition at line 257 of file UncheckedStatusOrAccessModel.cpp.
References clang::ASTContext::getTypes(), and isStatusType().
|
static |
Definition at line 77 of file UncheckedStatusOrAccessModel.cpp.
References clang::cast(), clang::Type::getAsCXXRecordDecl(), getStatusOrBaseClass(), isStatusOrOperatorBaseType(), and isStatusOrType().
Referenced by getStatusOrBaseClass(), and getSyntheticFields().
|
static |
Definition at line 94 of file UncheckedStatusOrAccessModel.cpp.
References clang::TemplateArgumentList::get(), clang::TemplateArgument::getAsType(), and clang::ClassTemplateSpecializationDecl::getTemplateArgs().
Referenced by getSyntheticFields().
llvm::StringMap< QualType > clang::dataflow::statusor_model::getSyntheticFields | ( | QualType | Ty, |
QualType | StatusType, | ||
const CXXRecordDecl & | RD ) |
Definition at line 211 of file UncheckedStatusOrAccessModel.cpp.
References clang::ASTContext::BoolTy, clang::Type::getAsCXXRecordDecl(), clang::Decl::getASTContext(), getStatusOrBaseClass(), getStatusOrValueType(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::isDerivedFrom(), and isStatusType().
BoolValue & clang::dataflow::statusor_model::initializeStatus | ( | RecordStorageLocation & | StatusLoc, |
Environment & | Env ) |
Definition at line 168 of file UncheckedStatusOrAccessModel.cpp.
References locForOk(), clang::dataflow::Environment::makeAtomicBoolValue(), and clang::dataflow::Environment::setValue().
Referenced by initializeStatusOr(), and valForOk().
BoolValue & clang::dataflow::statusor_model::initializeStatusOr | ( | RecordStorageLocation & | StatusOrLoc, |
Environment & | Env ) |
Definition at line 175 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatus(), and locForStatus().
|
static |
Definition at line 67 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::get(), locForOk(), locForStatus(), and clang::dataflow::Environment::proves().
Referenced by buildDiagnoseMatchSwitch().
|
static |
Definition at line 98 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::dataflow::cxxMemberCallExpr, clang::dataflow::cxxMethodDecl, clang::ast_matchers::cxxThisExpr, clang::ast_matchers::expr, clang::dataflow::hasName(), statusOrClass(), statusOrOperatorBaseClass(), and clang::ast_matchers::unless.
Referenced by buildTransferMatchSwitch(), and valueCall().
Definition at line 63 of file UncheckedStatusOrAccessModel.cpp.
References isTypeNamed().
Referenced by getStatusOrBaseClass().
|
static |
Definition at line 107 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::dataflow::cxxMethodDecl, clang::dataflow::cxxOperatorCallExpr, clang::dataflow::hasOverloadedOperatorName(), statusOrClass(), and statusOrOperatorBaseClass().
Referenced by valueOperatorCall().
Definition at line 203 of file UncheckedStatusOrAccessModel.cpp.
References isTypeNamed().
Referenced by getStatusOrBaseClass().
Definition at line 207 of file UncheckedStatusOrAccessModel.cpp.
References isTypeNamed().
Referenced by findStatusType(), and getSyntheticFields().
|
static |
Definition at line 52 of file UncheckedStatusOrAccessModel.cpp.
References clang::Type::getAsRecordDecl(), and namespaceEquals().
Referenced by isStatusOrOperatorBaseType(), isStatusOrType(), and isStatusType().
StorageLocation & clang::dataflow::statusor_model::locForOk | ( | RecordStorageLocation & | StatusLoc | ) |
Definition at line 225 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::RecordStorageLocation::getSyntheticField().
Referenced by initializeStatus(), isSafeUnwrap(), and valForOk().
RecordStorageLocation & clang::dataflow::statusor_model::locForStatus | ( | RecordStorageLocation & | StatusOrLoc | ) |
Definition at line 221 of file UncheckedStatusOrAccessModel.cpp.
References clang::cast(), and clang::dataflow::RecordStorageLocation::getSyntheticField().
Referenced by initializeStatusOr(), isSafeUnwrap(), and transferStatusOrOkCall().
|
static |
Definition at line 41 of file UncheckedStatusOrAccessModel.cpp.
References clang::NamedDecl::getName(), and clang::DeclContext::getParent().
Referenced by isTypeNamed().
clang::ast_matchers::DeclarationMatcher clang::dataflow::statusor_model::statusClass | ( | ) |
Definition at line 187 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::cxxRecordDecl, and clang::dataflow::hasName().
clang::ast_matchers::DeclarationMatcher clang::dataflow::statusor_model::statusOrClass | ( | ) |
Definition at line 180 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::classTemplateSpecializationDecl, clang::dataflow::hasName(), and clang::ast_matchers::type.
Referenced by isStatusOrMemberCallWithName(), isStatusOrOperatorCallWithName(), and statusOrType().
clang::ast_matchers::DeclarationMatcher clang::dataflow::statusor_model::statusOrOperatorBaseClass | ( | ) |
Definition at line 192 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::classTemplateSpecializationDecl, and clang::dataflow::hasName().
Referenced by isStatusOrMemberCallWithName(), and isStatusOrOperatorCallWithName().
clang::ast_matchers::TypeMatcher clang::dataflow::statusor_model::statusOrType | ( | ) |
Definition at line 198 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::hasDeclaration(), clang::ast_matchers::qualType, and statusOrClass().
|
static |
Definition at line 235 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::getImplicitObjectLocation(), locForStatus(), and valForOk().
Referenced by buildTransferMatchSwitch().
BoolValue & clang::dataflow::statusor_model::valForOk | ( | RecordStorageLocation & | StatusLoc, |
Environment & | Env ) |
Definition at line 229 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::get(), initializeStatus(), and locForOk().
Referenced by transferStatusOrOkCall().
|
static |
Definition at line 115 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, and isStatusOrMemberCallWithName().
Referenced by buildDiagnoseMatchSwitch().
|
static |
Definition at line 121 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::ast_matchers::expr, and isStatusOrOperatorCallWithName().
Referenced by buildDiagnoseMatchSwitch().