14#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_UNSAFEBUFFERUSAGE_H
15#define LLVM_CLANG_ANALYSIS_ANALYSES_UNSAFEBUFFERUSAGE_H
22using DefMapTy = llvm::DenseMap<const VarDecl *, std::vector<const VarDecl *>>;
37 bool IsRelatedToDecl) = 0;
52 std::string
s = std::string(
"<# ");
62 bool EmitSuggestions);
__device__ __2f16 float bool s
Encodes a location in the source.
This class handles loading and caching of source files into memory.
Stmt - This represents one statement.
The interface that lets the caller handle unsafe buffer usage analysis results by overriding this cla...
virtual void handleUnsafeOperation(const Stmt *Operation, bool IsRelatedToDecl)=0
Invoked when an unsafe operation over raw pointers is found.
virtual void handleUnsafeVariableGroup(const VarDecl *Variable, const DefMapTy &VarGrpMap, FixItList &&Fixes)=0
Invoked when a fix is suggested against a variable.
virtual bool isSafeBufferOptOut(const SourceLocation &Loc) const =0
Returns a reference to the Preprocessor:
UnsafeBufferUsageHandler()=default
virtual ~UnsafeBufferUsageHandler()=default
virtual std::string getUserFillPlaceHolder(StringRef HintTextToUser="placeholder") const
Returns the text indicating that the user needs to provide input there:
Represents a variable declaration or definition.
bool anyConflict(const llvm::SmallVectorImpl< FixItHint > &FixIts, const SourceManager &SM)
void checkUnsafeBufferUsage(const Decl *D, UnsafeBufferUsageHandler &Handler, bool EmitSuggestions)
llvm::DenseMap< const VarDecl *, std::vector< const VarDecl * > > DefMapTy