|
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 216 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 607 of file UncheckedStatusOrAccessModel.cpp.
References isComparisonOperatorCall(), isNotOkStatusCall(), isOkStatusCall(), isPointerComparisonOperatorCall(), isStatusConstructor(), isStatusMemberCallWithName(), isStatusOrConstructor(), isStatusOrMemberCallWithName(), isStatusOrValueAssignmentCall(), isStatusOrValueConstructor(), transferComparisonOperator(), transferEmplaceCall(), transferNotOkStatusCall(), transferOkStatusCall(), transferPointerComparisonOperator(), transferStatusCall(), transferStatusConstructor(), transferStatusOkCall(), transferStatusOrConstructor(), transferStatusOrOkCall(), transferStatusUpdateCall(), transferValueAssignmentCall(), and transferValueConstructor().
Referenced by clang::dataflow::statusor_model::UncheckedStatusOrAccessModel::UncheckedStatusOrAccessModel().
|
static |
Definition at line 442 of file UncheckedStatusOrAccessModel.cpp.
References evaluateStatusEquality(), evaluateStatusOrEquality(), clang::dataflow::Environment::get(), clang::Expr::getType(), isStatusOrType(), and isStatusType().
Referenced by transferComparisonOperator().
|
static |
Definition at line 492 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::arena(), clang::dataflow::Environment::assume(), getPointeeLocation(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Type::isPointerType(), isStatusOrType(), isStatusType(), locForStatus(), clang::dataflow::Environment::makeAtomicBoolValue(), and valForOk().
Referenced by transferPointerComparisonOperator().
|
static |
Definition at line 390 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::arena(), clang::dataflow::Environment::assume(), clang::dataflow::Environment::makeAtomicBoolValue(), and valForOk().
Referenced by evaluateEquality().
|
static |
Definition at line 419 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::arena(), clang::dataflow::Environment::assume(), locForStatus(), clang::dataflow::Environment::makeAtomicBoolValue(), and valForOk().
Referenced by evaluateEquality().
| QualType clang::dataflow::statusor_model::findStatusType | ( | const ASTContext & | Ctx | ) |
Definition at line 668 of file UncheckedStatusOrAccessModel.cpp.
References clang::ASTContext::getTypes(), and isStatusType().
|
static |
Definition at line 485 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::get().
Referenced by evaluatePointerEquality().
|
static |
Definition at line 78 of file UncheckedStatusOrAccessModel.cpp.
References clang::cast(), clang::Type::getAsCXXRecordDecl(), getStatusOrBaseClass(), isStatusOrOperatorBaseType(), and isStatusOrType().
Referenced by getStatusOrBaseClass(), and getSyntheticFields().
|
static |
Definition at line 95 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 299 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 256 of file UncheckedStatusOrAccessModel.cpp.
References locForOk(), clang::dataflow::Environment::makeAtomicBoolValue(), and clang::dataflow::Environment::setValue().
Referenced by initializeStatusOr(), transferNotOkStatusCall(), transferOkStatusCall(), transferStatusConstructor(), and valForOk().
| BoolValue & clang::dataflow::statusor_model::initializeStatusOr | ( | RecordStorageLocation & | StatusOrLoc, |
| Environment & | Env ) |
Definition at line 263 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatus(), and locForStatus().
Referenced by transferStatusCall(), transferStatusOrConstructor(), transferValueAssignmentCall(), and transferValueConstructor().
|
static |
Definition at line 145 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::dataflow::cxxOperatorCallExpr, clang::dataflow::hasOverloadedOperatorName(), statusOrType(), and statusType().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 158 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::callExpr, clang::ast_matchers::functionDecl, and clang::ast_matchers::hasAnyName.
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 153 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::callExpr, clang::ast_matchers::functionDecl, and clang::dataflow::hasName().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 171 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::ast_matchers::binaryOperator, clang::dataflow::pointerType, statusOrType(), and statusType().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 68 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::get(), locForOk(), locForStatus(), and clang::dataflow::Environment::proves().
Referenced by buildDiagnoseMatchSwitch().
|
static |
Definition at line 210 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::cxxConstructExpr, and statusType().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 104 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::cxxMemberCallExpr, clang::dataflow::cxxMethodDecl, clang::ast_matchers::cxxThisExpr, clang::ast_matchers::expr, clang::dataflow::hasName(), ofClassStatus(), and clang::ast_matchers::unless.
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 205 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::cxxConstructExpr, and statusOrType().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 111 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 64 of file UncheckedStatusOrAccessModel.cpp.
References isTypeNamed().
Referenced by getStatusOrBaseClass().
|
static |
Definition at line 120 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 291 of file UncheckedStatusOrAccessModel.cpp.
References isTypeNamed().
Referenced by evaluateEquality(), evaluatePointerEquality(), and getStatusOrBaseClass().
|
static |
Definition at line 184 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::dataflow::cxxMethodDecl, clang::dataflow::cxxOperatorCallExpr, clang::dataflow::hasOverloadedOperatorName(), statusOrClass(), and clang::ast_matchers::type.
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 194 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::ast_matchers::cxxConstructExpr, clang::ast_matchers::hasAnyName, clang::ast_matchers::namedDecl, statusOrType(), and clang::ast_matchers::type.
Referenced by buildTransferMatchSwitch().
Definition at line 295 of file UncheckedStatusOrAccessModel.cpp.
References isTypeNamed().
Referenced by evaluateEquality(), evaluatePointerEquality(), findStatusType(), and getSyntheticFields().
|
static |
Definition at line 53 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 313 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::RecordStorageLocation::getSyntheticField().
Referenced by initializeStatus(), isSafeUnwrap(), transferStatusCall(), transferStatusConstructor(), transferStatusOkCall(), transferStatusOrConstructor(), transferStatusUpdateCall(), and valForOk().
| RecordStorageLocation & clang::dataflow::statusor_model::locForStatus | ( | RecordStorageLocation & | StatusOrLoc | ) |
Definition at line 309 of file UncheckedStatusOrAccessModel.cpp.
References clang::cast(), and clang::dataflow::RecordStorageLocation::getSyntheticField().
Referenced by evaluatePointerEquality(), evaluateStatusOrEquality(), initializeStatusOr(), isSafeUnwrap(), transferEmplaceCall(), transferStatusCall(), transferStatusOrConstructor(), and transferStatusOrOkCall().
|
static |
Definition at line 42 of file UncheckedStatusOrAccessModel.cpp.
References clang::NamedDecl::getName(), and clang::DeclContext::getParent().
Referenced by isTypeNamed().
|
static |
Definition at line 99 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::hasName().
Referenced by isStatusMemberCallWithName().
| clang::ast_matchers::DeclarationMatcher clang::dataflow::statusor_model::statusClass | ( | ) |
Definition at line 275 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::cxxRecordDecl, and clang::dataflow::hasName().
Referenced by statusType().
| clang::ast_matchers::DeclarationMatcher clang::dataflow::statusor_model::statusOrClass | ( | ) |
Definition at line 268 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::classTemplateSpecializationDecl, clang::dataflow::hasName(), and clang::ast_matchers::type.
Referenced by isStatusOrMemberCallWithName(), isStatusOrOperatorCallWithName(), isStatusOrValueAssignmentCall(), and statusOrType().
| clang::ast_matchers::DeclarationMatcher clang::dataflow::statusor_model::statusOrOperatorBaseClass | ( | ) |
Definition at line 280 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 286 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::hasDeclaration(), clang::ast_matchers::qualType, and statusOrClass().
Referenced by isComparisonOperatorCall(), isPointerComparisonOperatorCall(), isStatusOrConstructor(), and isStatusOrValueConstructor().
|
static |
Definition at line 140 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::hasDeclaration(), clang::ast_matchers::qualType, and statusClass().
Referenced by isComparisonOperatorCall(), isPointerComparisonOperatorCall(), and isStatusConstructor().
|
static |
Definition at line 471 of file UncheckedStatusOrAccessModel.cpp.
References evaluateEquality().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 554 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::getImplicitObjectLocation(), locForStatus(), and valForOk().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 545 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatus().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 537 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatus().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 523 of file UncheckedStatusOrAccessModel.cpp.
References evaluatePointerEquality().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 335 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::copyRecord(), clang::dataflow::getImplicitObjectLocation(), initializeStatusOr(), clang::Expr::isPRValue(), locForOk(), and locForStatus().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 597 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatus(), and locForOk().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 354 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::getImplicitObjectLocation(), and locForOk().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 587 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatusOr(), locForOk(), and locForStatus().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 323 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::getImplicitObjectLocation(), locForStatus(), and valForOk().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 366 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::getImplicitObjectLocation(), locForOk(), and valForOk().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 566 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatusOr().
Referenced by buildTransferMatchSwitch().
|
static |
Definition at line 579 of file UncheckedStatusOrAccessModel.cpp.
References initializeStatusOr().
Referenced by buildTransferMatchSwitch().
| BoolValue & clang::dataflow::statusor_model::valForOk | ( | RecordStorageLocation & | StatusLoc, |
| Environment & | Env ) |
Definition at line 317 of file UncheckedStatusOrAccessModel.cpp.
References clang::dataflow::Environment::get(), initializeStatus(), and locForOk().
Referenced by evaluatePointerEquality(), evaluateStatusEquality(), evaluateStatusOrEquality(), transferEmplaceCall(), transferStatusOrOkCall(), and transferStatusUpdateCall().
|
static |
Definition at line 128 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, and isStatusOrMemberCallWithName().
Referenced by buildDiagnoseMatchSwitch().
|
static |
Definition at line 134 of file UncheckedStatusOrAccessModel.cpp.
References clang::ast_matchers::anyOf, clang::ast_matchers::expr, and isStatusOrOperatorCallWithName().
Referenced by buildDiagnoseMatchSwitch().