clang
20.0.0git
|
#include "clang/Analysis/BodyFarm.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/Analysis/CodeInjector.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/OperatorKinds.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Debug.h"
#include <optional>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "body-farm" |
Typedefs | |
typedef Stmt *(* | FunctionFarmer) (ASTContext &C, const FunctionDecl *D) |
#define DEBUG_TYPE "body-farm" |
Definition at line 29 of file BodyFarm.cpp.
typedef Stmt*(* FunctionFarmer) (ASTContext &C, const FunctionDecl *D) |
Definition at line 259 of file BodyFarm.cpp.
|
static |
Create a fake body for std::call_once.
Emulates the following function body:
Definition at line 346 of file BodyFarm.cpp.
References D.
|
static |
Definition at line 261 of file BodyFarm.cpp.
|
static |
Definition at line 287 of file BodyFarm.cpp.
|
static |
Create a fake body for dispatch_once.
Definition at line 508 of file BodyFarm.cpp.
References Block, clang::UnaryOperator::Create(), clang::CallExpr::Create(), clang::IfStmt::Create(), D, clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::ValueDecl::getType(), clang::If, isDispatchBlock(), clang::Type::isIntegerType(), clang::OK_Ordinary, clang::Ordinary, and clang::VK_PRValue.
|
static |
Create a fake body for dispatch_sync.
Definition at line 592 of file BodyFarm.cpp.
References clang::CallExpr::Create(), D, clang::ValueDecl::getType(), isDispatchBlock(), and clang::VK_PRValue.
|
static |
Construct the If.
Definition at line 618 of file BodyFarm.cpp.
References clang::IfStmt::Create(), D, clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::ValueDecl::getType(), clang::If, clang::Type::isBooleanType(), clang::Type::isIntegralType(), and clang::Ordinary.
|
static |
Create a fake body for 'std::move' or 'std::forward'.
This is just:
Definition at line 320 of file BodyFarm.cpp.
References clang::interp::Cast(), and D.
|
static |
Definition at line 785 of file BodyFarm.cpp.
References findBackingIvar(), clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCIvarDecl::getContainingInterface(), clang::ObjCInterfaceDecl::getImplementation(), clang::QualType::getNonReferenceType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyIvarDecl(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::ValueDecl::getType(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isObjCLifetimeType(), clang::Type::isReferenceType(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), clang::QualType::isTriviallyCopyableType(), clang::ObjCPropertyAttribute::kind_weak, and clang::ObjCImplDecl::property_impls().
Referenced by clang::BodyFarm::getBody().
|
static |
Definition at line 746 of file BodyFarm.cpp.
References clang::ObjCPropertyDecl::getPropertyIvarDecl(), and clang::ObjCPropertyDecl::isReadOnly().
Referenced by createObjCPropertyGetter().
Definition at line 37 of file BodyFarm.cpp.
References clang::Type::getAs(), clang::FunctionProtoType::getNumParams(), clang::BlockPointerType::getPointeeType(), clang::FunctionType::getReturnType(), and clang::Type::isVoidType().
Referenced by create_dispatch_once(), and create_dispatch_sync().