dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
LGTM.
We should probably be warning any time the address of a block variable is taken
since the address is not stable -- but that's a job for a different checker or
possibly even Sema.
dcoughlin added a comment.
Thanks for the patch!
Would it be possible to split this up into several patches? I think it is
important to separate the interface layering changes from the formatting
changes, renaming changes, and minor optimization changes. This will make the
patches easier to re
Author: dcoughlin
Date: Tue Nov 1 17:16:39 2016
New Revision: 285759
URL: http://llvm.org/viewvc/llvm-project?rev=285759&view=rev
Log:
[analyzer] Fix capitalization in ObjCSuperDealloc checker diagnostic.
Change "use of 'self'..." to "Use of 'self'...". The convention is to
start diagnostics wit
dcoughlin added a comment.
Thanks for iterating on the patch! Some comments in-line.
Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:569
+ // allocating functions initialized to nullptr, which will never equal a
+ //non-null IdentifierInfo*, and nev
dcoughlin added a comment.
Thanks for upstreaming this! (And it was great to meet you at the developer
conference.)
Comment at: lib/StaticAnalyzer/Checkers/SpinLockChecker.cpp:61
+
+const ErrorCategoryStr LockInfo::LockErrCategory("Lock Error");
+const FunctionNameStr LockInfo
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
This seems reasonable and it looks good to me (as long as there is a later
patch coming that calls the new method).
However: is there a situation where `Contains()` is preferable to `Loo
dcoughlin added a comment.
In https://reviews.llvm.org/D26373#589614, @ddcc wrote:
> Even though there isn't a performance difference, I think it is semantically
> clearer since it is explicit that the value is unneeded.
Makes sense to me!
https://reviews.llvm.org/D26373
_
> On Nov 8, 2016, at 9:44 AM, Malcolm Parsons wrote:
>
> On 8 November 2016 at 16:59, Alexander Kornienko wrote:
>> On Nov 8, 2016 2:11 AM, "Malcolm Parsons" wrote:
>>> Oh, I was using clang-analyzer-alpha.cplusplus.VirtualCall.
>>>
>>> Should clang-tidy have an option to enable experimental
+ Anna, Alexander, and Artem.
> On Nov 9, 2016, at 10:50 AM, Devin Coughlin via cfe-commits
> wrote:
>
>
>> On Nov 8, 2016, at 9:44 AM, Malcolm Parsons
>> wrote:
>>
>> On 8 November 2016 at 16:59, Alexander Kornienko wrote:
>>> On Nov 8, 2016
dcoughlin added a comment.
Thanks for adding the path notes and adopting CallDescription. I've added some
additional comments inline, which are mostly minor nits.
Two additional important changes -- and I should have noted these in the
initial review -- is that it would be good to remove a MemR
dcoughlin added a comment.
In https://reviews.llvm.org/D26340#590882, @khazem wrote:
> Devin, based on Artem's review of the other checker that I have posted [1] I
> am wondering about merging both this SpinLockChecker and the MutexChecker
> into PthreadLockChecker. Do you think it is still wor
Author: dcoughlin
Date: Fri Nov 11 15:31:38 2016
New Revision: 286633
URL: http://llvm.org/viewvc/llvm-project?rev=286633&view=rev
Log:
[analyzer] Teach RetainCountChecker about VTCompressionSessionEncodeFrame()
The context argument passed to VideoToolbox's
VTCompressionSessionEncodeFrame() funct
Author: dcoughlin
Date: Fri Nov 11 19:03:06 2016
New Revision: 286694
URL: http://llvm.org/viewvc/llvm-project?rev=286694&view=rev
Log:
[analyzer] Improve misleading RetainCountChcker diagnostic under ARC
Under automated reference counting the analyzer treats a methods -- even those
starting with
Author: dcoughlin
Date: Fri Nov 11 19:23:01 2016
New Revision: 286697
URL: http://llvm.org/viewvc/llvm-project?rev=286697&view=rev
Log:
[analyzer] Fix copy-pasta in NullableReturnedFromNonnullChecker checker name.
The name of the NullableReturnedFromNonnullChecker in Checkers.td
was accidentally
Author: dcoughlin
Date: Fri Nov 11 19:50:04 2016
New Revision: 286700
URL: http://llvm.org/viewvc/llvm-project?rev=286700&view=rev
Log:
[analyzer] Update 'Automated' to 'Automatic' from r286694.
ARC is 'Automatic Reference Counting' and not 'Automated Reference Counting'.
Modified:
cfe/trunk
Hi Sean,
Ted provided more details off-list. He suspects that the problem is that we
likely don't add MemSpaceRegions to the worklist because every region is a
subregion of a MemSpaceRegion, and thus we would invalidate, by default, all
regions that were in the same MemSpace as the regions we w
dcoughlin added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:843
@@ +842,3 @@
+ if (!Length)
+return true;
+
There doesn't seem to be a test that cares about this returning true (as
compared to false).
Comment
Author: dcoughlin
Date: Tue Sep 8 18:50:22 2015
New Revision: 247103
URL: http://llvm.org/viewvc/llvm-project?rev=247103&view=rev
Log:
Revert "[Static Analyzer] BugReporter.cpp:2869: Assertion failed:
!RemainingNodes.empty() && "No error node found in the trimmed graph""
This is making our inte
dcoughlin created this revision.
dcoughlin added reviewers: zaks.anna, xazax.hun.
dcoughlin added a subscriber: cfe-commits.
Update the static analyzer buildbot script to set -isysroot to the OS X SDK
path when analyzing preprocessed files.
http://reviews.llvm.org/D12769
Files:
utils/analyzer
dcoughlin added inline comments.
Comment at: utils/analyzer/SATestBuild.py:277
@@ +276,3 @@
+# For now, we assume the preprocessed files should be analyzed
+# with the OS X SDK.
+SDKPath = getSDKPath("macosx")
xazax.hun wrote:
> I think it might be bet
dcoughlin added inline comments.
Comment at: utils/analyzer/SATestBuild.py:277
@@ +276,3 @@
+# For now, we assume the preprocessed files should be analyzed
+# with the OS X SDK.
+SDKPath = getSDKPath("macosx")
xazax.hun wrote:
> dcoughlin wrote:
> > xa
dcoughlin updated this revision to Diff 34471.
dcoughlin added a comment.
Pass -cc1 to clang even when SDK path is not found.
http://reviews.llvm.org/D12769
Files:
utils/analyzer/SATestBuild.py
Index: utils/analyzer/SATestBuild.py
=
dcoughlin created this revision.
dcoughlin added reviewers: zaks.anna, krememek.
dcoughlin added subscribers: jordan_rose, cfe-commits, xazax.hun.
The analyzer trims unnecessary nodes from the exploded graph before reporting
path diagnostics. However, in some cases it can trim all nodes (includin
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
LGTM. I will commit. Thanks Sean!
http://reviews.llvm.org/D12406
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.
dcoughlin added a comment.
I'll look at this today. Thanks for your patience!
http://reviews.llvm.org/D12358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: dcoughlin
Date: Fri Sep 11 15:14:05 2015
New Revision: 247463
URL: http://llvm.org/viewvc/llvm-project?rev=247463&view=rev
Log:
[analyzer] Add -analyzer-config option for function size the inliner considers
as large
Add an option (-analyzer-config min-blocks-for-inline-large=14) to contr
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247463: [analyzer] Add -analyzer-config option for function
size the inliner… (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12406?vs=34196&id=34574#toc
Repository:
rL LLV
dcoughlin marked 3 inline comments as done.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:229
@@ -228,2 +228,3 @@
+ /// checkers should use generateErrorNode() instead.
ExplodedNode *generateSink(ProgramStateRef State = nullptr,
dcoughlin added a comment.
I looked at the behavior of invalidateRegions() under the patch. It looks like
MemSpaceRegions //are// being added to the worklist but these regions don't
have clusters associated with them so invalidating the regions themselves
doesn't remove any bindings.
Ted: What
Author: dcoughlin
Date: Mon Sep 14 16:22:24 2015
New Revision: 247617
URL: http://llvm.org/viewvc/llvm-project?rev=247617&view=rev
Log:
[analyzer] Update SATestBuild.py to set -isysroot for preprocessed files
Update the static analyzer buildbot script to set -isysroot to the OS X SDK path
when an
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247617: [analyzer] Update SATestBuild.py to set -isysroot
for preprocessed files (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12769?vs=34471&id=34733#toc
Repository:
rL
Author: dcoughlin
Date: Mon Sep 14 20:13:53 2015
New Revision: 247653
URL: http://llvm.org/viewvc/llvm-project?rev=247653&view=rev
Log:
[analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.
In Objective-C, method calls with nil receivers are essentially no-ops. They
do not fault
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247653: [analyzer] Skip Pre/Post handlers for ObjC calls
when receiver is nil. (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12123?vs=33836&id=34772#toc
Repository:
rL LL
Author: dcoughlin
Date: Mon Sep 14 22:28:27 2015
New Revision: 247660
URL: http://llvm.org/viewvc/llvm-project?rev=247660&view=rev
Log:
[analyzer] Restore behavior change introduced by r247657.
r247657 fixed warnings about unused variables when compiling without asserts
but changed behavior. This
dcoughlin created this revision.
dcoughlin added reviewers: xazax.hun, zaks.anna.
dcoughlin added a subscriber: cfe-commits.
Move the logic looking for additional checkers in the SA_ADDITIONAL_CHECKERS
environmental variable from SATestBuild's main() to runScanBuild(). This allows
SATestAdd.py t
Author: dcoughlin
Date: Tue Sep 15 20:52:32 2015
New Revision: 247767
URL: http://llvm.org/viewvc/llvm-project?rev=247767&view=rev
Log:
[analyzer] SATestBuild.py: Move additional checkers logic so SATestAdd.py can
use it as well.
Move the logic looking for additional checkers in the SA_ADDITIONA
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247767: [analyzer] SATestBuild.py: Move additional checkers
logic so SATestAdd.py can… (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12891?vs=34853&id=34864#toc
Repository:
dcoughlin updated this revision to Diff 34917.
dcoughlin added a comment.
Added checks for null generated error nodes in the few cases in checkers were
they were missing and updated comments.
http://reviews.llvm.org/D12780
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext
dcoughlin added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:321
@@ +320,3 @@
+// sink, we assume that a client requesting a transition to a state that is
+// the same as the predecessor state has made a mistake. We return t
Author: dcoughlin
Date: Wed Sep 16 17:03:05 2015
New Revision: 247859
URL: http://llvm.org/viewvc/llvm-project?rev=247859&view=rev
Log:
[analyzer] Add generateErrorNode() APIs to CheckerContext.
The analyzer trims unnecessary nodes from the exploded graph before reporting
path diagnostics. Howeve
This revision was automatically updated to reflect the committed changes.
Closed by commit rL247859: [analyzer] Add generateErrorNode() APIs to
CheckerContext. (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12780?vs=34917&id=34930#toc
Repository:
rL LLVM
http://r
> On Sep 16, 2015, at 4:01 PM, NAKAMURA Takumi wrote:
>
> Did you forget to update examples/analyzer-plugin? Fixed in r247862.
Yes — thank you!
Devin
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
dcoughlin added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:198
@@ +197,3 @@
+
+ // Return true if the destination buffer of the copy function must/may be in
+ // bound.
Since this returns true on unknown, it should be "may".
===
dcoughlin added a comment.
Here is a reduced test case:
class B {
public:
B &operator= (const B &v) {
return *this;
}
};
class A {
int a[1];
B b;
};
typedef long int ptrdiff_t;
void copyInto(A *first, A *last, A *result) {
ptrdiff_t n;
for
dcoughlin created this revision.
dcoughlin added reviewers: krememek, zaks.anna.
dcoughlin added subscribers: cfe-commits, seaneveson.
This is a patch to support Sean Eveson's work on loop widening. It adds a new
TK_EntireMemSpace invalidation trait that, when applied to a MemSpaceRegion,
indicat
dcoughlin added a comment.
There is a patch to add memspace region invalidation in
http://reviews.llvm.org/D12993.
http://reviews.llvm.org/D12358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo
dcoughlin added a comment.
Ismail, is 24710 the right bug? It is "clang-tidy segfaults with relative
include paths". https://llvm.org/bugs/show_bug.cgi?id=24710
http://reviews.llvm.org/D12482
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
dcoughlin added a comment.
You should add a test covering the added logic in SValBuilder. For example:
clang_analyzer_eval(__is_trivial(NonTrivial)); // expected-warning {{FALSE}}
And while we're at it, it would be good to add a test for
UnaryExprOrTypeTraitExpr as well:
clang_analyzer_eva
dcoughlin added inline comments.
Comment at: lib/StaticAnalyzer/Core/LoopWidening.cpp:149
@@ +148,3 @@
+ break;
+}
+
This doesn't seem quite right. Consider:
```
int i;
for (i = 0; i < 21; i += 3) {}
clang_analyzer_eval(i == 23);
```
The value of `i` sho
dcoughlin added a comment.
I will commit. Thanks!
http://reviews.llvm.org/D5102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: dcoughlin
Date: Tue Sep 22 15:31:19 2015
New Revision: 248318
URL: http://llvm.org/viewvc/llvm-project?rev=248318&view=rev
Log:
[analyzer] Create one state for a range switch case instead of multiple.
This fixes PR16833, in which the analyzer was using large amounts of memory
for switch s
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248318: [analyzer] Create one state for a range switch case
instead of multiple. (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D5102?vs=32664&id=35411#toc
Repository:
rL L
Author: dcoughlin
Date: Tue Sep 22 17:47:14 2015
New Revision: 248336
URL: http://llvm.org/viewvc/llvm-project?rev=248336&view=rev
Log:
[analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0).
Currently realloc(ptr, 0) is treated as free() which seems to be not correct. C
standard (N1570
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248336: [analyzer] Make realloc(ptr, 0) handling equivalent
to malloc(0). (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D9040?vs=34583&id=35432#toc
Repository:
rL LLVM
ht
dcoughlin added a comment.
Aditya, can you update the patch title and summary to a commit message so I can
commit it? Thanks!
http://reviews.llvm.org/D9924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailma
Author: dcoughlin
Date: Tue Sep 22 18:58:04 2015
New Revision: 248350
URL: http://llvm.org/viewvc/llvm-project?rev=248350&view=rev
Log:
[analyzer] Improve localizability checks for iOS / OS X.
Various improvements to the localization checker:
* Adjusted copy to be consistent with diagnostic text
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248350: [analyzer] Improve localizability checks for iOS /
OS X. (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12417?vs=35404&id=35445#toc
Repository:
rL LLVM
http://rev
Author: dcoughlin
Date: Tue Sep 22 19:17:52 2015
New Revision: 248351
URL: http://llvm.org/viewvc/llvm-project?rev=248351&view=rev
Log:
Revert "[analyzer] Improve localizability checks for iOS / OS X."
This reverts commit r248350. The pluralization checks are failing on some bots.
Modified:
dcoughlin added a comment.
This is causing tests to fail on the bots:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/31373
/home/llvmbb/llvm-build-dir/clang-x86_64-debian-fast/llvm.obj/Release+Asserts/bin/clang
-cc1 -internal-isystem
/home/llvmbb/llvm-build-dir/clang-x86_
Author: dcoughlin
Date: Wed Sep 23 16:43:21 2015
New Revision: 248432
URL: http://llvm.org/viewvc/llvm-project?rev=248432&view=rev
Log:
[analyzer] Improve localizability checks for iOS / OS X.
Various improvements to the localization checker:
* Adjusted copy to be consistent with diagnostic text
Author: dcoughlin
Date: Wed Sep 23 18:27:55 2015
New Revision: 248446
URL: http://llvm.org/viewvc/llvm-project?rev=248446&view=rev
Log:
[analyzer] Discard malloc-overflow bug-report when a known size is malloc'ed.
This patch ignores malloc-overflow bug in two cases:
Case1:
x = a/b; where n < b
ma
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248446: [analyzer] Discard malloc-overflow bug-report when a
known size is malloc'ed. (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D9924?vs=35461&id=35572#toc
Repository:
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
Looks good to me! Thanks Pierre! I will commit.
http://reviews.llvm.org/D12571
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
Thanks for fixing this!
Devin
> On Sep 23, 2015, at 7:49 PM, NAKAMURA Takumi via cfe-commits
> wrote:
>
> Author: chapuni
> Date: Wed Sep 23 21:49:00 2015
> New Revision: 248458
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248458&view=rev
> Log:
> clang/test/Analysis/malloc-overflow2.c: A
Author: dcoughlin
Date: Thu Sep 24 11:52:56 2015
New Revision: 248516
URL: http://llvm.org/viewvc/llvm-project?rev=248516&view=rev
Log:
[analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire
region.
Change the analyzer's modeling of memcpy to be more precise when copying in
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248516: [analyzer] When memcpy'ing into a fixed-size array,
do not invalidate entire… (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12571?vs=35505&id=35644#toc
Repository:
dcoughlin added inline comments.
Comment at:
tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPICheckerPathSensitive.cpp:34
@@ +33,3 @@
+ if (MR->getBaseRegion()->getAs())
+return;
+
You may be able to use `StoreManager::iterBindings()`, which iterates o
dcoughlin added a comment.
Sean,
One important difference between what you are proposing and what Cousot and
Cousot describe in the paper you cite is that they don't drop coverage. They
widen for termination on infinite-height lattices and their narrowing still
maintains an over-approximation
dcoughlin requested changes to this revision.
dcoughlin added a comment.
This revision now requires changes to proceed.
Thanks for the patch Ismail! Some comments inline.
Comment at: lib/StaticAnalyzer/Core/Store.cpp:408
@@ +407,3 @@
+if (!Base.isZeroConstant()) {
+ if
dcoughlin added a comment.
Thanks for the patch! This looks very useful. What browsers does the JavaScript
support?
One thing I noticed is that after immediately loading a new report page the 'j'
and 'k' shortcuts don't work for me. In Safari, I get:
TypeError: null is not an object (evaluat
dcoughlin added inline comments.
Comment at: test/Analysis/array-struct-region.cpp:128
@@ +127,3 @@
+#if __cplusplus
+ clang_analyzer_eval((void *)&PFONew->secondField != (void *)&PFONew); //
expected-warning{{TRUE}}
+#endif
ismailp wrote:
> I might be missing s
dcoughlin added a comment.
> What do people think about me creating a new patch based on your feedback?
I don't think you need to create a new review -- we can update this one and
keep the history.
> The aim would be to widen any non-exiting loops by invalidation. The initial
> patch would
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249063: [analyzer] Add TK_EntireMemSpace invalidation trait.
(authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D12993?vs=35170&id=36288#toc
Repository:
rL LLVM
http://reviews
Author: dcoughlin
Date: Thu Oct 1 15:09:11 2015
New Revision: 249063
URL: http://llvm.org/viewvc/llvm-project?rev=249063&view=rev
Log:
[analyzer] Add TK_EntireMemSpace invalidation trait.
This commit supports Sean Eveson's work on loop widening. It is NFC for now.
It adds a new TK_EntireMemSpace
dcoughlin added a comment.
Sean, I've committed this patch. You can update to trunk to get it.
Repository:
rL LLVM
http://reviews.llvm.org/D12993
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
dcoughlin added a comment.
Thanks for the update. Unfortunately, we can't accept the mousetrap code. Any
code contributed to clang needs to be under the UIUC license. The original
copyright owner would need to contribute the code under that license.
I think it would be fine to revert to your p
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
Has a typo but otherwise LGTM.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:258
@@ +257,3 @@
+ /// the condition.
+ bool hasNonNullArguments
dcoughlin added a comment.
I'm still looking at this. Higher-level comments coming soon.
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1110
@@ +1109,3 @@
+ assert(RO.getOffset() >= 0 && "Offset should not be negative");
+ uint64_t LowerOffset = RO.getOffset();
+
dcoughlin added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp:68
@@ +67,3 @@
+ // Methods that require a localized string
+ mutable llvm::StringMap> UIMethods;
+ // Methods that return a localized string
FWIW,
#include "
dcoughlin added a comment.
You should consider what should happen when the memcpy may write past the end
of the fixed-size array and add tests that specify correct behavior for these
cases. An important example is:
struct Foo {
char data[4];
int i;
};
Foo f;
f.i = 10;
me
dcoughlin created this revision.
dcoughlin added reviewers: zaks.anna, jordan_rose, xazax.hun.
dcoughlin added a subscriber: cfe-commits.
Herald added a subscriber: aemerson.
In Objective-C, method calls with nil receivers are essentially no-ops. They
do not fault (although the returned value may
dcoughlin updated the summary for this revision.
dcoughlin updated this revision to Diff 32638.
dcoughlin added a comment.
Update patch to address review comments. I've also updated the
CheckerDocumentation checker to document the new ObjCMessageNil callback.
This version of the patch also resto
dcoughlin marked 5 inline comments as done.
Comment at: include/clang/StaticAnalyzer/Core/CheckerManager.h:96
@@ -95,1 +95,3 @@
+enum class ObjCCheckerKind {
+ PreVisit,
xazax.hun wrote:
> I do not really like the name ObjCCheckerKind, because it is not kind of
dcoughlin marked 2 inline comments as done.
Comment at: lib/StaticAnalyzer/Core/ExprEngineObjC.cpp:197
@@ +196,3 @@
+ // Generate a transition to non-Nil state, dropping any potential
+ // non-nil flow.
+ if (notNilState != State) {
xazax.hun wrote:
dcoughlin updated this revision to Diff 32864.
dcoughlin added a comment.
Update comments to correct nil/non-nil mistakes.
http://reviews.llvm.org/D12123
Files:
include/clang/StaticAnalyzer/Core/Checker.h
include/clang/StaticAnalyzer/Core/CheckerManager.h
lib/StaticAnalyzer/Checkers/CallA
dcoughlin marked an inline comment as done.
dcoughlin added a comment.
http://reviews.llvm.org/D12123
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dcoughlin added a comment.
Thanks for adding handling of the symbolic cases! Some more comments inline.
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:825
@@ -816,1 +824,3 @@
+ProgramStateRef CStringChecker::IsFirstBufInBound(CheckerContext &C,
+
dcoughlin added a comment.
Other than one teeny nit, looks good to me.
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:863
@@ +862,3 @@
+
+ const ElementRegion *ER = dyn_cast(R);
+ // Cast is safe as BufVal's region is a FieldRegion.
You can use cas
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
I will commit. Thanks for your work on this, Pierre!
http://reviews.llvm.org/D11832
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
dcoughlin accepted this revision.
dcoughlin added a comment.
I ran our build-bot scripts with this and it looks good to me, although I've
noted two places with trailing whitespace. Thanks for your patience!
Comment at: tools/scan-build/scan-build:1403
@@ +1402,3 @@
+ my $Args
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246345: [analyzer] When memcpy'ing into a fixed-size array,
do not invalidate entire… (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D11832?vs=33402&id=33478#toc
Repository:
Author: dcoughlin
Date: Fri Aug 28 17:26:05 2015
New Revision: 246345
URL: http://llvm.org/viewvc/llvm-project?rev=246345&view=rev
Log:
[analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire
region.
Change the analyzer's modeling of memcpy to be more precise when copying in
dcoughlin updated this revision to Diff 33836.
dcoughlin added a comment.
I've updated ExprEngine::VisitObjCMessage to create a pre-statement program
point node for the ObjCMessageExpr when the receiver is definitely nil and
changed the MessageNil checker handlers to run on a post-statement prog
dcoughlin added a comment.
> There is a loss of precision for loops that need to be executed exactly
> maxBlockVisitOnPath times, as the loop body is executed with the widened
> state instead of the last iteration.
I think this is an acceptable loss of precision because, in general, it is
unl
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250237: [analyzer] Don’t invalidate CXXThis when
conservatively evaluating const… (authored by dcoughlin).
Changed prior to commit:
http://reviews.llvm.org/D13099?vs=37084&id=37291#toc
Repository:
rL
This isn’t just the static analyzer. There are Sema failures here as well:
• Clang.Sema.exprs.c
• Clang.Sema.shift.c
• Clang.Sema.uninit-variables.c
• Clang.Sema.warn-unreachable.c
• Clang.SemaCXX.runtimediag-ppe.cpp
• Clang.SemaCXX.uninitialized.cpp
dcoughlin added a comment.
Hi Sean,
Sorry it took me so long to get back to you.
Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:266
@@ +265,3 @@
+ /// \sa shouldWidenLoops
+ bool WidenLoops;
+
Is this field used?
Comment at:
dcoughlin added a comment.
Hi Yury,
Thanks for the patch. This is definitely interesting for upstream!
One thing to note (which I assume you are already aware of) is that we already
have the "security.insecureAPI.vfork" checker, an AST check that warns on
*every* use of vfork. This check is on
dcoughlin added a comment.
> For example, doing 'x = malloc(4); *x = 0;' in the child process seems fine
> to me.
I don't think this is necessarily safe. For example, malloc() could end up both
modifying memory shared between the child and parent process but only modifying
process state for t
Author: dcoughlin
Date: Sat Oct 24 20:30:18 2015
New Revision: 251218
URL: http://llvm.org/viewvc/llvm-project?rev=251218&view=rev
Log:
[analyzer] scan-build: Teach ccc-analyzer about -Xclang.
Update ccc-analyzer to forward both -Xclang and its following argument to the
the compiler driver. Previ
101 - 200 of 429 matches
Mail list logo