clang 20.0.0git
Classes | Namespaces | Functions
StdVariantChecker.cpp File Reference
#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"

Go to the source code of this file.

Classes

class  StdVariantChecker
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::ento
 
namespace  clang::ento::tagged_union_modeling
 

Functions

const CXXConstructorDeclclang::ento::tagged_union_modeling::getConstructorDeclarationForCall (const CallEvent &Call)
 
bool clang::ento::tagged_union_modeling::isCopyConstructorCall (const CallEvent &Call)
 
bool clang::ento::tagged_union_modeling::isCopyAssignmentCall (const CallEvent &Call)
 
bool clang::ento::tagged_union_modeling::isMoveConstructorCall (const CallEvent &Call)
 
bool clang::ento::tagged_union_modeling::isMoveAssignmentCall (const CallEvent &Call)
 
bool clang::ento::tagged_union_modeling::isStdType (const Type *Type, llvm::StringRef TypeName)
 
bool clang::ento::tagged_union_modeling::isStdVariant (const Type *Type)
 
static std::optional< ArrayRef< TemplateArgument > > getTemplateArgsFromVariant (const Type *VariantType)
 
static std::optional< QualTypegetNthTemplateTypeArgFromVariant (const Type *varType, unsigned i)
 
static bool isVowel (char a)
 
static llvm::StringRef indefiniteArticleBasedOnVowel (char a)
 

Function Documentation

◆ getNthTemplateTypeArgFromVariant()

static std::optional< QualType > getNthTemplateTypeArgFromVariant ( const Type varType,
unsigned  i 
)
static

Definition at line 102 of file StdVariantChecker.cpp.

References getTemplateArgsFromVariant().

◆ getTemplateArgsFromVariant()

static std::optional< ArrayRef< TemplateArgument > > getTemplateArgsFromVariant ( const Type VariantType)
static

◆ indefiniteArticleBasedOnVowel()

static llvm::StringRef indefiniteArticleBasedOnVowel ( char  a)
static

Definition at line 124 of file StdVariantChecker.cpp.

References isVowel().

◆ isVowel()

static bool isVowel ( char  a)
static

Definition at line 111 of file StdVariantChecker.cpp.

Referenced by indefiniteArticleBasedOnVowel().