#include "clang/AST/Type.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/CallDescription.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include <optional>
#include <string_view>
#include "TaggedUnionModeling.h"
usingnamespaceclang;
usingnamespaceento;
usingnamespacetagged_union_modeling;
REGISTER_MAP_WITH_PROGRAMSTATE(…) …
namespace clang::ento::tagged_union_modeling {
static const CXXConstructorDecl *
getConstructorDeclarationForCall(const CallEvent &Call) { … }
bool isCopyConstructorCall(const CallEvent &Call) { … }
bool isCopyAssignmentCall(const CallEvent &Call) { … }
bool isMoveConstructorCall(const CallEvent &Call) { … }
bool isMoveAssignmentCall(const CallEvent &Call) { … }
static bool isStdType(const Type *Type, llvm::StringRef TypeName) { … }
bool isStdVariant(const Type *Type) { … }
}
static std::optional<ArrayRef<TemplateArgument>>
getTemplateArgsFromVariant(const Type *VariantType) { … }
static std::optional<QualType>
getNthTemplateTypeArgFromVariant(const Type *varType, unsigned i) { … }
static bool isVowel(char a) { … }
static llvm::StringRef indefiniteArticleBasedOnVowel(char a) { … }
class StdVariantChecker : public Checker<eval::Call, check::RegionChanges> { … };
bool clang::ento::shouldRegisterStdVariantChecker(
clang::ento::CheckerManager const &mgr) { … }
void clang::ento::registerStdVariantChecker(clang::ento::CheckerManager &mgr) { … }