ziqingluo-90 added inline comments.
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:551-555
+allOf(declStmt().bind("any_ds"), notInSafeBufferOptOut())
+// We match all DREs regardless of whether they are in safe-buffer
+// opt-out region. Because an u
ziqingluo-90 added inline comments.
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:543
#define GADGET(x)
\
-x ## Gadget::matcher().bind(#x),
+allOf(x ## Gadget::matcher().bind(#x), notInSafeBuffe
NoQ added inline comments.
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:551-555
+allOf(declStmt().bind("any_ds"), notInSafeBufferOptOut())
+// We match all DREs regardless of whether they are in safe-buffer
+// opt-out region. Because an unclaimed
ziqingluo-90 added inline comments.
Comment at: clang/include/clang/Basic/Diagnostic.h:1040-1043
+ // An ordered sequence of "-Wunsafe-buffer-usage" opt-out regions in one
+ // translation unit. Each region is represented by a pair of start and end
+ // locations.
+ SmallVect
NoQ added inline comments.
Comment at: clang/include/clang/Basic/Diagnostic.h:1040-1043
+ // An ordered sequence of "-Wunsafe-buffer-usage" opt-out regions in one
+ // translation unit. Each region is represented by a pair of start and end
+ // locations.
+ SmallVector, 8>
S
ziqingluo-90 updated this revision to Diff 489136.
ziqingluo-90 added a comment.
Rebase the patch.
Move the check of whether a node is in an opt-out region to an earlier
stage---the AST matching stage.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140179/new/
https://reviews.llvm.org/
ziqingluo-90 added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:943
+def warn_pragma_unsafe_buffer_usage_misorder :
+ExtWarn<"pragma unsafe_buffer_usage used in misorder">,
+ InGroup;
NoQ wrote:
> IIUC `ExtWarn` means it's a warn
ziqingluo-90 updated this revision to Diff 483645.
ziqingluo-90 added a comment.
Addressing comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140179/new/
https://reviews.llvm.org/D140179
Files:
clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
clang/include/clang/Basi
jkorous added inline comments.
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2379
+for (auto UnsafeUse : UnsafeUses)
+ if (!DE.isSafeBufferOptOut(SM, UnsafeUse->getBeginLoc()))
+UnsafeUsesToReport.push_back(UnsafeUse);
NoQ wrote:
> I belie
ziqingluo-90 updated this revision to Diff 483579.
ziqingluo-90 added a comment.
Fixing bugs in my test.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140179/new/
https://reviews.llvm.org/D140179
Files:
clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
clang/include/clang/B
NoQ added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:943
+def warn_pragma_unsafe_buffer_usage_misorder :
+ExtWarn<"pragma unsafe_buffer_usage used in misorder">,
+ InGroup;
IIUC `ExtWarn` means it's a warning of the form "warni
11 matches
Mail list logo