clang 20.0.0git
|
#include "clang/AST/CharUnits.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h"
Go to the source code of this file.
Functions | |
static bool | evenFlexibleArraySize (ASTContext &Ctx, CharUnits RegionSize, CharUnits TypeSize, QualType ToPointeeTy) |
Check if we are casting to a struct with a flexible array at the end. | |
|
static |
Check if we are casting to a struct with a flexible array at the end.
or
In these cases it is also valid to allocate size of struct foo + a multiple of struct bar.
Definition at line 50 of file CastSizeChecker.cpp.
References clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::RecordType::getDecl(), clang::ASTContext::getTypeSizeInChars(), clang::RecordDecl::hasFlexibleArrayMember(), clang::CharUnits::isZero(), Iter, and clang::Last.