Skip to content

Commit 927b2f6

Browse files
committed
Update UnsafeBufferUsage.h
1 parent d349daa commit 927b2f6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_UNSAFEBUFFERUSAGE_H
1515
#define LLVM_CLANG_ANALYSIS_ANALYSES_UNSAFEBUFFERUSAGE_H
1616

17+
#include "clang/AST/ASTTypeTraits.h"
1718
#include "clang/AST/Decl.h"
1819
#include "clang/AST/Expr.h"
1920
#include "clang/AST/Stmt.h"
@@ -139,6 +140,12 @@ class UnsafeBufferUsageHandler {
139140
FixItList &&Fixes, const Decl *D,
140141
const FixitStrategy &VarTargetTypes) = 0;
141142

143+
// Invoked when an array subscript operator[] is used on a
144+
// std::unique_ptr<T[]>.
145+
virtual void handleUnsafeUniquePtrArrayAccess(const DynTypedNode &Node,
146+
bool IsRelatedToDecl,
147+
ASTContext &Ctx) = 0;
148+
142149
#ifndef NDEBUG
143150
public:
144151
bool areDebugNotesRequested() {

0 commit comments

Comments
 (0)