ziqingluo-90 updated this revision to Diff 520859.
ziqingluo-90 added a comment.
Visit `LambdaExpr` properly
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146342/new/
https://reviews.llvm.org/D146342
Files:
clang/include/clang/Sema/AnalysisBasedWarnings.h
clang/lib/Sema/AnalysisBas
ziqingluo-90 updated this revision to Diff 521176.
ziqingluo-90 added a comment.
Clean up the code for early return in case of ignoring `unsafe_buffer_usage`
warnings.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146342/new/
https://reviews.llvm.org/D146342
Files:
clang/include/cla
ziqingluo-90 updated this revision to Diff 521177.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146342/new/
https://reviews.llvm.org/D146342
Files:
clang/include/clang/Sema/AnalysisBasedWarnings.h
clang/lib/Sema/AnalysisBasedWarnings.cpp
clang/lib/Sema/Sema.cpp
clang/test/SemaCX
ziqingluo-90 updated this revision to Diff 521184.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146342/new/
https://reviews.llvm.org/D146342
Files:
clang/include/clang/Sema/AnalysisBasedWarnings.h
clang/lib/Sema/AnalysisBasedWarnings.cpp
clang/lib/Sema/Sema.cpp
clang/test/SemaCX
ziqingluo-90 created this revision.
ziqingluo-90 added reviewers: jkorous, NoQ, malavikasamak, t-rasmud.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
ziqingluo-90 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
For fix
ziqingluo-90 updated this revision to Diff 521409.
ziqingluo-90 added a comment.
Address comments: refactor the callable-definition visitor to take a lambda
Callback, who calls various analyses that need whole-TU information.If one
needs to add a new such analysis later, just add a call i
ziqingluo-90 marked an inline comment as done.
ziqingluo-90 added inline comments.
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2364
+ Node->getBeginLoc())) {
+ UnsafeBufferUsageReporter R(S);
+ clang::checkUnsafeBufferUsage(Node, R, Unsa
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
ziqingluo-90 marked an inline comment as done.
Closed by commit rG6d861d498de1: [-Wunsafe-buffer-usage] Move the whole
analysis to the end of a translation unit (author
ziqingluo-90 accepted this revision.
ziqingluo-90 added a comment.
This revision is now accepted and ready to land.
LGTM, Thanks!
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146773/new/
https://reviews.llvm.org/D146773
ziqingluo-90 updated this revision to Diff 517413.
ziqingluo-90 added a comment.
Move the traversal framework to `AnalysisBasedWarnings` so that the
`UnsafeBufferUsage` analyzer (as well as other possible analyzers) is still
function based. It is in the same pattern as the original `IssueWarnin
ziqingluo-90 updated this revision to Diff 518608.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146342/new/
https://reviews.llvm.org/D146342
Files:
clang/include/clang/Sema/AnalysisBasedWarnings.h
clang/lib/Sema/AnalysisBasedWarnings.cpp
clang/lib/Sema/Sema.cpp
clang/test/SemaCX
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1e270be0886c: [-Wunsafe-buffer-usage] Add fix-its for
function parameters using the `span`… (authored by ziqingluo-90).
Herald added a project: clang
ziqingluo-90 created this revision.
ziqingluo-90 added reviewers: NoQ, t-rasmud, jkorous, malavikasamak.
Herald added a project: All.
ziqingluo-90 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
For a function `F` whose parameters need to b
ziqingluo-90 added inline comments.
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:2085
continue;
}
for (const auto &F : Fixables) {
I changed the rest of this function drastically so let me explain what I did.
The table `FixItsForVariable
ziqingluo-90 added inline comments.
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:2264
+ // variable `x` implicates fixing `y`:
DepMapTy PtrAssignmentGraph{};
+
ziqingluo-90 wrote:
> How about changing the variable name to `PtrImplicationGraph`? For t
ziqingluo-90 added inline comments.
Comment at: clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp:16
+void testArraySubscripts(int *p, int **pp) {
+ foo(p[0], // expected-warning{{unchecked operation on raw buffer
in expression}}
+ pp[0][0], // expected-w
ziqingluo-90 updated this revision to Diff 480703.
ziqingluo-90 added a comment.
Addressing all the comments we have so far.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137379/new/
https://reviews.llvm.org/D137379
Files:
clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadget
ziqingluo-90 created this revision.
ziqingluo-90 added reviewers: jkorous, NoQ, t-rasmud, malavikasamak,
aaron.ballman, xazax.hun, gribozavr.
Herald added a subscriber: rnkovacs.
Herald added a project: All.
ziqingluo-90 requested review of this revision.
Herald added a project: clang.
Herald adde
ziqingluo-90 created this revision.
ziqingluo-90 added reviewers: jkorous, NoQ, malavikasamak, t-rasmud.
Herald added a project: All.
ziqingluo-90 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Add a pair of clang pragmas:
`#pragma clang u
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
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
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 483658.
ziqingluo-90 added a comment.
Addressing comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138318/new/
https://reviews.llvm.org/D138318
Files:
clang/lib/Analysis/UnsafeBufferUsage.cpp
clang/test/SemaCXX/warn-unsafe-buffer-usa
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6d1d055fad50: [-Wunsafe-buffer-usage] Add warnings for
unsafe buffer accesses by array… (authored by ziqingluo-90).
Repository:
rG LLVM Github Mon
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG04202b94b684: [-Wunsafe-buffer-usage] Improve pointer
matching pattern (authored by ziqingluo-90).
Changed prior to commit:
https://reviews.llvm.o
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf6c54cdbc439: [-Wunsafe-buffer-usage] Ignore array subscript
on literal zero (authored by ziqingluo-90).
Changed prior to commit:
https://reviews.
201 - 226 of 226 matches
Mail list logo