isuckatcs added inline comments.
Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411,
dkrupp, donat.nagy, baloghadamsoftware.
Herald added a project: All.
Comment at:
cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:222
This revision was automatically updated to reflect the committed changes.
Closed by commit rL342213: [analyzer][UninitializedObjectChecker] Fixed
dereferencing (authored by Szelethus, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D510
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Looks good i guess. I'm glad this is sorted out^^
https://reviews.llvm.org/D51057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.
Szelethus added a comment.
I ran the checker on LLVM/Clang and grpc, and saw no crashes at all! Quite
confident about the current diff. However, I'm not 100% sure it doesn't break
on Objective C++ codes. Can you recommend a project like that?
https://reviews.llvm.org/D51057
Szelethus added inline comments.
Comment at: test/Analysis/cxx-uninitialized-object.cpp:879-902
+struct LambdaWrapper {
+ void *func; // no-crash
+ int dontGetFilteredByNonPedanticMode = 0;
+
+ LambdaWrapper(void *ptr) : func(ptr) {} // expected-warning{{1 uninitialized
field
NoQ added inline comments.
Comment at:
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:126-127
if (V.isUndef()) {
+assert(!FR->getDecl()->getType()->isReferenceType() &&
+ "References must be initialized!");
return addFieldToUninits
Szelethus added inline comments.
Comment at:
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:126-127
if (V.isUndef()) {
+assert(!FR->getDecl()->getType()->isReferenceType() &&
+ "References must be initialized!");
return addFieldToU
Szelethus updated this revision to Diff 163992.
Szelethus added a comment.
Fixed an assertation failure where a lambda field's this capture was undefined.
https://reviews.llvm.org/D51057
Files:
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h
lib/StaticAnalyzer/Checkers
Szelethus updated this revision to Diff 163499.
Szelethus added a comment.
Reuploaded with `-U9`. Oops.
https://reviews.llvm.org/D51057
Files:
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker
Szelethus updated this revision to Diff 163185.
Szelethus added a comment.
Fixed two crashes. Interesting how many much better this approach works, as
I've never encountered `FunctionType`d objects or only forward declared typed
pointers after dereferencing.
https://reviews.llvm.org/D51057
Fi
Szelethus added a comment.
I managed to cause a bunch of crashes with this patch, so consider it as a work
in progress for now :/
https://reviews.llvm.org/D51057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/
Szelethus marked 5 inline comments as done.
Szelethus added inline comments.
Comment at:
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:259
+ return T->isBuiltinType() || T->isEnumeralType() ||
+ T->isMemberPointerType() || T->isBlockPointerType()
Szelethus updated this revision to Diff 162198.
Szelethus added a comment.
Addressed the inline comments.
- Added a `llvm::SmallSet` to further ensure the termination of the loop.
- Changed `isLocType` to `isDereferencableType`, block pointers are regarded as
primitive objects.
- Added new tests
NoQ added a comment.
Yup, this looks great and that's exactly how i imagined it.
Comment at:
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:261-265
+inline bool isLocType(const QualType &T) {
+ return T->isAnyPointerType() || T->isReferenceType() ||
+
Szelethus added a comment.
@NoQ, is this how you imagined derefercing to work? I'm still a little
uncertain that I implemented this in a way that addresses all your concerns.
Repository:
rC Clang
https://reviews.llvm.org/D51057
___
cfe-commits m
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 patch aims to fix derefencing, which has been debated for months now.
Instead of working with `SVal`
16 matches
Mail list logo