Szelethus added a comment.
Did you have some time to check on those programs? :)
Repository:
rC Clang
https://reviews.llvm.org/D45407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
Szelethus added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.cpp:187
+
+ if (isCalledByConstructor(Context))
+return;
xazax.hun wrote:
> Szelethus wrote:
> > whisperity wrote:
> > > I think somewhere there should be
Szelethus marked 6 inline comments as done.
Szelethus added a comment.
I'm about to update the diff, I changed a quite a lot of stuff, so I'm not sure
that I'd be able to respond to these inline comments.
Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.c
Szelethus updated this revision to Diff 142581.
Szelethus marked 2 inline comments as done.
Szelethus edited the summary of this revision.
Szelethus added a comment.
Among many other things:
- The checker class is now on top of the file.
- Reviewed all comments, fixed typos, tried to make the gen
Szelethus marked 24 inline comments as done.
Szelethus added a comment.
Note that there was a comment made about the test files being too long. I still
haven't split them, as I didn't find a good "splitting point". Is this okay, or
shall I try to split these into numerous smaller ones?
https:/
Szelethus added a comment.
> Btw, what sort of UI are you trying to make these extra note pieces of mine
> work with?
I'm also developing a checker: https://reviews.llvm.org/D45532. This checker
emits very important information in notes. When I tried testing it with
Ericsson's CodeChecker, I r
Szelethus added a comment.
I just had a look with `-analyzer-config notes-as-events=true`, and it works
(with CodeChecker, at least). I'd still implement a better support for notes,
but this is a great workaround for now. Thanks!
Repository:
rC Clang
https://reviews.llvm.org/D45407
_
Szelethus updated this revision to Diff 142624.
Szelethus added a comment.
> Would be interesting to extend this checker (maybe in an upcoming patch) to
> report on uninitialized members not only in constructors, but also copy
> constructors and move constructors.
Added 3 new test cases. to cov
Szelethus updated this revision to Diff 142760.
Szelethus added a comment.
In https://reviews.llvm.org/D45532#1068700, @Szelethus wrote:
> Also, I managed to cause a crash with the class `linked_ptr_internal` from
> google's boringssl when I analyzed the grpc project. I'll look deeper into
> th
Szelethus added a comment.
Can someone commit this for me? I don't have a write access.
Repository:
rC Clang
https://reviews.llvm.org/D45407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cf
Szelethus added a comment.
I'd also like to point out that as I mentioned before, the checker's name
itself is misleading (it is a leftover from an earlier implementation of this
checker). Here are just some ideas I came up with:
- UninitializedObjectChecker
- UninitializedFieldsChecker
- Unin
Szelethus updated this revision to Diff 143875.
Szelethus added a comment.
In this diff I
- added a `Pedantic` flag that is set to false by default to filter out results
from objects that don't have a single field initialized,
- made it so that fields that are declared in system headers are now
Szelethus updated this revision to Diff 144119.
Szelethus added a comment.
Fixes according to inline comments.
https://reviews.llvm.org/D45532
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/CtorUninitializedM
Szelethus marked 3 inline comments as done.
Szelethus added a comment.
By the way, thank you all for taking the time to review my code!
Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.cpp:306
+
+ const RecordDecl *RD =
+ R->getValueType()->getAs()->
Szelethus updated this revision to Diff 144439.
Szelethus marked an inline comment as done.
Szelethus added a comment.
Renamed the checker to `cplusplus.uninitialized.UninitializedObject`.
I've read your comments regarding the category this should be in thoroughly,
and should the clang-tidy cate
Szelethus marked an inline comment as done.
Szelethus added inline comments.
Comment at: test/Analysis/cxx-uninitialized-object.cpp:526
+
+void f23p5() {
+ void *vptr = malloc(sizeof(int));
I haven't marked @a.sidorin's comment as done, but it disappeared becaus
Szelethus updated this revision to Diff 10.
Szelethus added a comment.
Forgot to rename the system header simulator file. Sorry about the spam :)
https://reviews.llvm.org/D45532
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/Sta
Szelethus added a comment.
Thanks @NoQ for taking the time to review my code!
I'm sorry that the patch became this long. It was an error on my part, and I
completely get that the checker now takes an uncomfortably long time to read
and understand. This is my first "bigger" project in the CSA,
Szelethus added a comment.
Polite ping :)
https://reviews.llvm.org/D48325
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Szelethus added a comment.
In https://reviews.llvm.org/D48436#1144380, @NoQ wrote:
> I think we need to finish our dialog on who's responsible for initialization
> and why do we need to filter constructors at all, cause it's kinda hanging
> (i.e. https://reviews.llvm.org/D45532#inline-422673).
Szelethus added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:392
-if (T->isMemberPointerType()) {
- if (isMemberPointerUninit(FR, LocalChain))
+if (T->isPointerType() || T->isReferenceType()) {
+ if (isPointerOrRefere
Szelethus added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:488-491
// TODO: Dereferencing should be done according to the dynamic type.
while (Optional L = DerefdV.getAs()) {
DerefdV = State->getSVal(*L);
}
--
This revision was automatically updated to reflect the committed changes.
Closed by commit rC335964: [analyzer][UninitializedObjectChecker] Added a
NotesAsWarnings flag (authored by Szelethus, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D48285
Files:
lib/StaticAnalyzer/Che
Szelethus added a comment.
In https://reviews.llvm.org/D45532#1145512, @sylvestre.ledru wrote:
> If you are interested, I executed this checker on Firefox code. Results can
> be found here
> http://sylvestre.ledru.info/reports/fx-scan-build/
Absolutely, thank you! :)
> Andi reported this bug
Szelethus added a comment.
Polite ping ^-^
https://reviews.llvm.org/D48436
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Szelethus updated this revision to Diff 154398.
Szelethus added a comment.
MemberPointerTypes are regarded as primitive types from now. I agree with @NoQ,
it makes so much more sense this way :)
https://reviews.llvm.org/D48325
Files:
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
Szelethus updated this revision to Diff 154420.
Szelethus added a comment.
Finding the correct captured variable now works with
`FieldDecl::getFieldIndex()`.
https://reviews.llvm.org/D48291
Files:
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
test/Analysis/cxx-uninitialized-ob
Szelethus marked 3 inline comments as done.
Szelethus added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:691
+StringRef getVariableName(const FieldDecl *Field) {
+ // If \p Field is a captured lambda variable, Field->getName() will re
Szelethus created this revision.
Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs.
Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet,
whisperity.
This diff fixes a long debated issues with pointers/references not being
dereferenced according to their
Szelethus added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:591-609
+// TODO: This function constructs an incorrect string if a void pointer is a
+// part of the chain:
+//
+// struct B { int x; }
+//
+// struct A {
+// void *vp
Szelethus created this revision.
Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs.
Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet,
whisperity.
Repository:
rC Clang
https://reviews.llvm.org/D49228
Files:
lib/StaticAnalyzer/Checkers/Uninitialize
Szelethus updated this revision to Diff 155356.
Szelethus added a comment.
Thank you! ^-^
Rebased to https://reviews.llvm.org/rC336901.
https://reviews.llvm.org/D48325
Files:
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
test/Analysis/cxx-uninitialized-object-ptr-ref.cpp
Inde
This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336994: [analyzer][UninitializedObjectChecker] Support for
MemberPointerTypes (authored by Szelethus, committed by ).
Hera
Szelethus updated this revision to Diff 155361.
Szelethus marked an inline comment as done.
Szelethus added a comment.
Thanks! :)
Rebased to https://reviews.llvm.org/rC336994.
https://reviews.llvm.org/D48291
Files:
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
test/Analysis/cx
This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rC336995: [analyzer][UninitializedObjectChecker] Fixed
captured lambda variable name (authored by Szelethus, committed by ).
Szelethus added a comment.
> I'll think about that a bit more; it might be worth it to track such deferred
> subregions in a state trait and drain it whenever we pop back to an explicit
> constructor.
There are so many things to consider, like the following case:
struct DynTBase {};
struct
Szelethus added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:674
+ const LocationContext *LC = Context.getLocationContext();
+ while ((LC = LC->getParent())) {
+
Szelethus wrote:
> NoQ wrote:
> > george.karpenkov wrote
Szelethus updated this revision to Diff 155913.
Szelethus added a comment.
Rebased to the latest trunk.
https://reviews.llvm.org/D49199
Files:
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
test/Analysis/cxx-uninitialized-object-inheritance.cpp
test/Analysis/cxx-uninitialized-
Szelethus updated this revision to Diff 155915.
Szelethus added a comment.
Rebased to the latest trunk.
https://reviews.llvm.org/D49228
Files:
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
test/Analysis/cxx-uninitialized-object-ptr-ref.cpp
Index: test/Analysis/cxx-uninitialize
Szelethus created this revision.
Szelethus added reviewers: NoQ, george.karpenkov, rnkovacs, xazax.hun.
Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet,
whisperity.
The idea came from both @george.karpenkov
(https://reviews.llvm.org/D45532#1145592) and from bugzilla
(h
Szelethus added a comment.
I left a comment on this issue already:
https://reviews.llvm.org/D49437#1165462. But in short, definitely yes! It's
been very painful to work around pointer/reference objects, too bad I didn't
come up with this idea sooner :)
Repository:
rC Clang
https://reviews.
Szelethus created this revision.
Szelethus added reviewers: dergachev.a, xazax.hun.
Szelethus added a project: clang.
Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet, whisperity.
Herald added a reviewer: george.karpenkov.
Added notes to `-analyzer-output=plist`.
Repository:
Szelethus added a comment.
Thanks!
Repository:
rC Clang
https://reviews.llvm.org/D45407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Szelethus created this revision.
Szelethus added reviewers: NoQ, xazax.hun, dkrupp, whisperity.
Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet, mgorny.
Herald added a reviewer: george.karpenkov.
This checker checks at the end of a constructor call whether all fields of the
obj
Szelethus updated this revision to Diff 142053.
Szelethus added a comment.
Reuploaded the diff with full context.
https://reviews.llvm.org/D45532
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/CtorUninitializ
Szelethus added inline comments.
Comment at: test/Analysis/ctor-uninitialized-member.cpp:869
+void f44() {
+ ContainsUnionWithSimpleUnionTest2(); // xpected-warning{{1 uninitialized
field}}
+}
NoQ wrote:
> Hmm, shouldn't it say "expected"? Do these tests actual
Szelethus added a comment.
In https://reviews.llvm.org/D45532#1064652, @NoQ wrote:
> > In most cases, all fields of a union is regarded as unknown. I checked
> > these cases by regarding unknown fields as uninitialized.
>
> The whole point of making them unknown, as far as i understand, was to
Szelethus added a comment.
In https://reviews.llvm.org/D45532#1064670, @Szelethus wrote:
> I wasn't too clear on this one: unknown fields are regarded as uninitialized,
> what I wrote was a temporary change in the code so I could check whether it
> would work.
Woops, I meant that unknown fiel
501 - 548 of 548 matches
Mail list logo