|
clang 24.0.0git
|
#include "clang/Analysis/Analyses/ThreadSafety.h"#include "clang/AST/Attr.h"#include "clang/AST/Decl.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclGroup.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/OperationKinds.h"#include "clang/AST/Stmt.h"#include "clang/AST/StmtVisitor.h"#include "clang/AST/Type.h"#include "clang/Analysis/Analyses/PostOrderCFGView.h"#include "clang/Analysis/Analyses/ThreadSafetyCommon.h"#include "clang/Analysis/Analyses/ThreadSafetyTIL.h"#include "clang/Analysis/Analyses/ThreadSafetyUtil.h"#include "clang/Analysis/AnalysisDeclContext.h"#include "clang/Analysis/CFG.h"#include "clang/Basic/Builtins.h"#include "clang/Basic/LLVM.h"#include "clang/Basic/OperatorKinds.h"#include "clang/Basic/SourceLocation.h"#include "clang/Basic/Specifiers.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/ImmutableMap.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/ScopeExit.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringRef.h"#include "llvm/Support/Allocator.h"#include "llvm/Support/Casting.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/TrailingObjects.h"#include "llvm/Support/raw_ostream.h"#include <cassert>#include <functional>#include <iterator>#include <memory>#include <optional>#include <string>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | clang::threadSafety::BeforeSet |
Namespaces | |
| namespace | clang |
| The JSON file list parser is used to communicate input to InstallAPI. | |
| namespace | clang::threadSafety |
Functions | |
| static bool | isCallbackParam (const ParmVarDecl *Param) |
True if capability attributes on Param describe the function reached through it rather than the argument bound to it. | |
| static void | warnInvalidLock (ThreadSafetyHandler &Handler, const Expr *MutexExp, const NamedDecl *D, const Expr *DeclExp, StringRef Kind) |
| Issue a warning about an invalid lock expression. | |
| static void | findBlockLocations (CFG *CFGraph, const PostOrderCFGView *SortedGraph, std::vector< CFGBlockInfo > &BlockInfo) |
| Find the appropriate source locations to use when producing diagnostics for each block in the CFG. | |
| static const ValueDecl * | getValueDecl (const Expr *Exp) |
| Gets the value decl pointer from DeclRefExprs or MemberExprs. | |
| static bool | getStaticBooleanValue (Expr *E, bool &TCond) |
| static const Expr * | UnpackConstruction (const Expr *E) |
| static bool | neverReturns (const CFGBlock *B) |
|
static |
Find the appropriate source locations to use when producing diagnostics for each block in the CFG.
Definition at line 925 of file ThreadSafety.cpp.
References clang::DeclStmt::getBeginLoc(), clang::CFG::getExit(), and clang::SourceLocation::isValid().
Definition at line 1605 of file ThreadSafety.cpp.
References getStaticBooleanValue(), and clang::isa().
Referenced by getStaticBooleanValue().
Gets the value decl pointer from DeclRefExprs or MemberExprs.
Definition at line 1442 of file ThreadSafety.cpp.
References getValueDecl().
Referenced by getValueDecl().
|
static |
True if capability attributes on Param describe the function reached through it rather than the argument bound to it.
Sema accepts capability attributes on a parameter for two unrelated purposes: a scoped-lockable parameter, where the attributes describe the locks the passed scope object holds, and a parameter naming a function to call – a function pointer or a function reference – where they describe the requirements of the function called through it.
Definition at line 73 of file ThreadSafety.cpp.
References clang::T.
Definition at line 2807 of file ThreadSafety.cpp.
References clang::CFGBlock::back(), clang::CFGBlock::empty(), clang::CFGBlock::hasNoReturnElement(), clang::isa(), and clang::Last.
Definition at line 2627 of file ThreadSafety.cpp.
References clang::CastExpr::getCastKind(), clang::CastExpr::getSubExpr(), and clang::Expr::IgnoreParens().
|
static |
Issue a warning about an invalid lock expression.
Definition at line 79 of file ThreadSafety.cpp.
References clang::Expr::getExprLoc(), clang::threadSafety::ThreadSafetyHandler::handleInvalidLockExp(), and clang::SourceLocation::isValid().