clang 22.0.0git
|
Namespaces | |
namespace | internal |
Classes | |
class | LifetimeSafetyReporter |
Enumerations | |
enum class | Confidence : uint8_t { None , Maybe , Definite } |
Enum to track the confidence level of a potential error. More... |
Functions | |
void | runLifetimeSafetyAnalysis (AnalysisDeclContext &AC, LifetimeSafetyReporter *Reporter) |
The main entry point for the analysis. | |
const FunctionDecl * | getDeclWithMergedLifetimeBoundAttrs (const FunctionDecl *FD) |
const CXXMethodDecl * | getDeclWithMergedLifetimeBoundAttrs (const CXXMethodDecl *CMD) |
bool | isNormalAssignmentOperator (const FunctionDecl *FD) |
bool | isAssignmentOperatorLifetimeBound (const CXXMethodDecl *CMD) |
bool | implicitObjectParamIsLifetimeBound (const FunctionDecl *FD) |
|
strong |
Enum to track the confidence level of a potential error.
Enumerator | |
---|---|
None | |
Maybe | |
Definite |
Definition at line 31 of file LifetimeSafety.h.
const CXXMethodDecl * clang::lifetimes::getDeclWithMergedLifetimeBoundAttrs | ( | const CXXMethodDecl * | CMD | ) |
Definition at line 24 of file LifetimeAnnotations.cpp.
References getDeclWithMergedLifetimeBoundAttrs().
const FunctionDecl * clang::lifetimes::getDeclWithMergedLifetimeBoundAttrs | ( | const FunctionDecl * | FD | ) |
Definition at line 19 of file LifetimeAnnotations.cpp.
References clang::FunctionDecl::getMostRecentDecl().
Referenced by getDeclWithMergedLifetimeBoundAttrs(), implicitObjectParamIsLifetimeBound(), isAssignmentOperatorLifetimeBound(), and clang::sema::visitFunctionCallArguments().
bool clang::lifetimes::implicitObjectParamIsLifetimeBound | ( | const FunctionDecl * | FD | ) |
Definition at line 54 of file LifetimeAnnotations.cpp.
References clang::TypeLoc::getAsAdjusted(), clang::AttributedTypeLoc::getAttrAs(), getDeclWithMergedLifetimeBoundAttrs(), clang::AttributedTypeLoc::getModifiedLoc(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), and isNormalAssignmentOperator().
Referenced by ProcessAPINotes(), and clang::sema::visitFunctionCallArguments().
bool clang::lifetimes::isAssignmentOperatorLifetimeBound | ( | const CXXMethodDecl * | CMD | ) |
Definition at line 48 of file LifetimeAnnotations.cpp.
References getDeclWithMergedLifetimeBoundAttrs(), clang::FunctionDecl::getParamDecl(), clang::Decl::hasAttr(), isNormalAssignmentOperator(), and clang::FunctionDecl::param_size().
Referenced by clang::sema::checkExprLifetimeImpl(), and clang::sema::shouldRunGSLAssignmentAnalysis().
bool clang::lifetimes::isNormalAssignmentOperator | ( | const FunctionDecl * | FD | ) |
Definition at line 30 of file LifetimeAnnotations.cpp.
References clang::Decl::getASTContext(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::ASTContext::getLValueReferenceType(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::isCompoundAssignmentOperator(), and clang::Type::isLValueReferenceType().
Referenced by implicitObjectParamIsLifetimeBound(), and isAssignmentOperatorLifetimeBound().
void clang::lifetimes::runLifetimeSafetyAnalysis | ( | AnalysisDeclContext & | AC, |
LifetimeSafetyReporter * | Reporter ) |
The main entry point for the analysis.
Definition at line 72 of file LifetimeSafety.cpp.
References clang::lifetimes::internal::LifetimeSafetyAnalysis::run().
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().