#include "clang/Analysis/CFG.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.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/PrettyPrinter.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/ConstructionContext.h"
#include "clang/Analysis/Support/BumpVector.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/ExceptionSpecificationType.h"
#include "clang/Basic/JsonSupport.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DOTGraphTraits.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <memory>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
Go to the source code of this file.
namespace llvm Diagnostic wrappers for TextAPI types for error reporting.Expr Op NumExpr
form, if NumExpr is an integer literal or an enum constant.
x == Foo && x == Bar
, this determines whether the Foo
and Bar
are either of the same enumeration type, or both integer literals.
For an expression x == Foo && x == Bar
, this determines whether the Foo
and Bar
are either of the same enumeration type, or both integer literals.
It's an error to pass this arguments that are not either IntegerLiterals or DeclRefExprs (that have decls of type EnumConstantDecl)
Definition at line 148 of file CFG.cpp.
◆ bothKnownTrue() static TryResult bothKnownTrue ( TryResult R1, TryResult R2 ) staticDefinition at line 423 of file CFG.cpp.
◆ CanThrow() ◆ FindVA() ◆ GetEndLoc() ◆ getReferenceInitTemporaryType() static QualType getReferenceInitTemporaryType ( const Expr * Init, bool * FoundMTE =nullptr
) static ◆ isFallthroughStatement() ◆ isImmediateSinkBlock() ◆ IsIntegerLiteralConstantExpr() static bool IsIntegerLiteralConstantExpr ( const Expr * E ) static
Returns true on constant values based around a single IntegerLiteral.
Allow for use of parentheses, integer casts, and negative signs. FIXME: it would be good to unify this function with getIntegerLiteralSubexpressionValue at some point given the similarity between the functions.
Definition at line 79 of file CFG.cpp.
References E, and clang::Expr::IgnoreParens().
Referenced by tryTransformToIntOrEnumConstant().
◆ print_block() static void print_block ( raw_ostream & OS, const CFG * cfg, const CFGBlock & B, StmtPrinterHelper & Helper, bool print_edges, bool ShowColors ) staticDefinition at line 5925 of file CFG.cpp.
References clang::CFGBlock::begin(), clang::C, E, clang::CFGBlock::end(), clang::CFGBlock::getBlockID(), clang::CFG::getEntry(), clang::CXXCatchStmt::getExceptionDecl(), clang::CFG::getExit(), clang::SEHExceptStmt::getFilterExpr(), clang::CFG::getIndirectGotoBlock(), clang::CFGBlock::getLabel(), clang::LabelStmt::getName(), clang::CFGBlock::getTerminator(), clang::CFGBlock::hasNoReturnElement(), clang::CFGTerminator::isValid(), clang::CFGBlock::Label, clang::CFGBlock::pred_begin(), clang::CFGBlock::pred_empty(), clang::CFGBlock::pred_end(), clang::CFGBlock::pred_size(), print_elem(), clang::Stmt::printPretty(), ShowColors, clang::CFGBlock::succ_begin(), clang::CFGBlock::succ_empty(), clang::CFGBlock::succ_end(), and clang::CFGBlock::succ_size().
Referenced by llvm::DOTGraphTraits< const CFG * >::getNodeLabel(), clang::CFGBlock::print(), and clang::CFG::print().
◆ print_construction_context() static void print_construction_context ( raw_ostream & OS, StmtPrinterHelper & Helper, const ConstructionContext * CC ) staticDefinition at line 5675 of file CFG.cpp.
References clang::ConstructionContext::ArgumentKind, clang::ConstructionContext::CXX17ElidedCopyConstructorInitializerKind, clang::ConstructionContext::CXX17ElidedCopyReturnedValueKind, clang::ConstructionContext::CXX17ElidedCopyVariableKind, clang::ConstructionContext::ElidedTemporaryObjectKind, clang::ConstructionContext::getKind(), clang::ConstructionContext::LambdaCaptureKind, clang::ConstructionContext::NewAllocatedObjectKind, print_initializer(), clang::ConstructionContext::SimpleConstructorInitializerKind, clang::ConstructionContext::SimpleReturnedValueKind, clang::ConstructionContext::SimpleTemporaryObjectKind, and clang::ConstructionContext::SimpleVariableKind.
Referenced by print_elem().
◆ print_elem() static void print_elem ( raw_ostream & OS, StmtPrinterHelper & Helper, const CFGElement & E ) staticDefinition at line 5769 of file CFG.cpp.
References clang::CFGElement::AutomaticObjectDtor, clang::CFGElement::BaseDtor, clang::CompoundStmt::body_rbegin(), clang::CFGElement::CleanupFunction, clang::CFGElement::Constructor, clang::CFGElement::CXXRecordTypedCall, clang::CFGElement::DeleteDtor, E, clang::CFGNewAllocator::getAllocatorExpr(), clang::CXXDeleteExpr::getArgument(), clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), clang::CFGDeleteDtor::getCXXRecordDecl(), clang::CFGDeleteDtor::getDeleteExpr(), clang::CFGInitializer::getInitializer(), clang::NamedDecl::getName(), clang::BinaryOperator::getOpcode(), clang::NamedDecl::getQualifiedNameAsString(), getReferenceInitTemporaryType(), clang::BinaryOperator::getRHS(), clang::CFGStmt::getStmt(), clang::Stmt::getStmtClassName(), clang::StmtExpr::getSubStmt(), clang::ValueDecl::getType(), clang::CXXBaseSpecifier::getType(), clang::Expr::getType(), clang::CFGLifetimeEnds::getVarDecl(), clang::CFGScopeBegin::getVarDecl(), clang::CFGScopeEnd::getVarDecl(), clang::CFGAutomaticObjDtor::getVarDecl(), clang::CFGElement::Initializer, clang::Type::isReferenceType(), clang::CFGElement::LifetimeEnds, clang::CFGElement::LoopExit, clang::CFGElement::MemberDtor, clang::CFGElement::NewAllocator, clang::QualType::print(), print_construction_context(), print_initializer(), clang::CFGElement::ScopeBegin, clang::CFGElement::ScopeEnd, clang::CFGElement::Statement, clang::T, and clang::CFGElement::TemporaryDtor.
Referenced by clang::CFGElement::dumpToStream(), and print_block().
◆ print_initializer() static void print_initializer ( raw_ostream & OS, StmtPrinterHelper & Helper, const CXXCtorInitializer * I ) static ◆ shouldAddCase() ◆ tryNormalizeBinaryOperator() ◆ tryTransformToIntOrEnumConstant() static const Expr * tryTransformToIntOrEnumConstant ( const Expr * E ) static ◆ GraphHelper StmtPrinterHelper* GraphHelper staticRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4