zaks.anna added a comment.
This checker is now in alpha.unix, because it is new and is in active
development. However, alpha checkers are not supported and are not turned on by
default, so we should move it into unix package once we think it is ready to be
used.
Evaluation on a large real code
zaks.anna added a comment.
The thread from cfe-dev is called "Clang Static Analyzer: False Positive
Suppression Support":
http://clang-developers.42468.n3.nabble.com/Clang-Static-Analyzer-False-Positive-Suppression-Support-tt4053071.html
https://reviews.llvm.org/D24411
__
zaks.anna added a comment.
Sorry, I do not understand the question. What are block numbers?
https://reviews.llvm.org/D24759
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna added inline comments.
Comment at: test/Analysis/ReturnNonBoolTest.c:67
@@ +66,3 @@
+
+ if (rc < 0)
+// error handling
How about addressing this as follows: in checkBranchCondition, you check for
any comparisons of the tracked value other than comp
zaks.anna added a comment.
LGTM. Thanks.
https://reviews.llvm.org/D22494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: zaks
Date: Tue Sep 20 15:28:50 2016
New Revision: 282011
URL: http://llvm.org/viewvc/llvm-project?rev=282011&view=rev
Log:
[analyzer] Add a checker that detects blocks in critical sections
This checker should find the calls to blocking functions (for example: sleep,
getc, fgets,read,recv
zaks.anna added a comment.
> However, the assert here has a reason: we clearly shouldn't be trying to
> analyze synthesized bodies as top-level functions.
Yes, seems like we should update r264687 so that we use the available body when
analyzing as top level.
Another possible issue is that we
zaks.anna added a comment.
Can you give a bit more context? Do you see the crash on a redefinition of the
OSAtomicCompareAndSwapPtr or one of the other standard functions or do you have
another similarly named function that should not be modeled?
Repository:
rL LLVM
https://reviews.llvm.org
zaks.anna added a comment.
One approach would be to skip analyzing the functions which we model as top
level.
- a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -688,6 +688,9 @@ void AnalysisConsumer::ActionExprEngine(Decl *D, bool
Ob
zaks.anna added a comment.
Thanks!
@alexshap, Do yon have commit access or should we commit on your behalf?
Repository:
rL LLVM
https://reviews.llvm.org/D24792
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/
zaks.anna added a comment.
Here are more comments. Could you address/answer these and upload the latest
patch that compares NSNumber to other numbers?
Thanks!
Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:88
@@ +87,3 @@
+
+auto NSNumberExprM =
+
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
I have no further comments.
https://reviews.llvm.org/D24278
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/c
zaks.anna added inline comments.
Comment at: test/Analysis/copypaste/functions.cpp:7
@@ -6,3 +6,3 @@
-int max(int a, int b) { // expected-warning{{Detected code clone.}}
+int max(int a, int b) { // expected-warning{{Clone of this code was detected}}
log();
"w
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
LGTM and Devin's comments have been addressed.
https://reviews.llvm.org/D24915
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
zaks.anna added inline comments.
Comment at: test/Analysis/copypaste/suspicious-clones.cpp:61
@@ -60,3 +60,3 @@
b /= a + b;
- c -= b * a; // expected-warning{{suspicious code clone detected; did you
mean to use 'a'?}}
+ c -= b * a; // expected-warning{{Suspicious code clone
zaks.anna added inline comments.
Comment at: test/Analysis/copypaste/macros.cpp:8
@@ -7,3 +7,3 @@
-int foo(int a) { // expected-warning{{Detected code clone.}}
+int foo(int a) { // expected-warning{{Clones of this code were detected}}
a = a + 1;
- Duplicate c
zaks.anna added inline comments.
Comment at: test/Analysis/copypaste/suspicious-clones.cpp:61
@@ -60,3 +60,3 @@
b /= a + b;
- c -= b * a; // expected-warning{{suspicious code clone detected; did you
mean to use 'a'?}}
+ c -= b * a; // expected-warning{{Suspicious code clone
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D24916
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
zaks.anna added a comment.
Looks good overall. Very minor nits.
> BugReporterVisitors.cpp:1274
>
> + // In the code below, Term is a CFG terminator, and Cond is a branch
> + // condition expression upon which the decision is made on this terminator.
nit: no comma before "and".
> BugReport
zaks.anna added a comment.
Should this revision be closed?
https://reviews.llvm.org/D23853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: zaks
Date: Tue Oct 4 15:49:31 2016
New Revision: 283253
URL: http://llvm.org/viewvc/llvm-project?rev=283253&view=rev
Log:
[analyzer] Add PostStmt callback for ArraySubscriptExpr
A patch by Jan Smets!
Differential Revision: https://reviews.llvm.org/D25009
Modified:
cfe/trunk/lib/Sta
zaks.anna added a comment.
Daniel, please, add reviewers to this patch.
Repository:
rL LLVM
https://reviews.llvm.org/D25326
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna accepted this revision.
zaks.anna added a comment.
Please, fix the style issues before committing.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:266
+ExplodedNode *Pred,
+const ReturnSt
zaks.anna added a comment.
I am in support of this as well.
https://reviews.llvm.org/D25429
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna added a comment.
Do you have results that show how this effects performance on average code and
machine generated code?
One concern is that multiset is malloc intensive. See
http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-for-a-task.
Maybe SparseSet/Spars
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
LGTM!
I would add info on how much speedup you see in the cryptographic libraries to
the commit message. (You could say something like "on a cryptographic library
that uses code generat
zaks.anna added a comment.
Please, provide more information on why this patch is needed and why the
existing processing of the -f flags does not work as expected. Looks like the
last modifications to the -f flags were made in r186138.
(Please, submit patches with more context:
http://llvm.org/
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Just realized that this is super old and has probably been fixed by r186138.
Closing.
https://reviews.llvm.org/D1805
___
cfe-commits maili
zaks.anna added a comment.
Ping? Is there something blocking progress here? This functionality is very
useful and almost done.
Thanks!
https://reviews.llvm.org/D20811
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cg
zaks.anna accepted this revision.
zaks.anna added inline comments.
This revision is now accepted and ready to land.
Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:479
+ InPackage,
+ HelpText<"Check for erroneous conversions of number pointers into numbers">,
+ D
zaks.anna added a comment.
We should pattern match for this specific macro pattern (ex: do{...}while(0) )
instead of suppressing all warnings coming from macros. Maybe we could use the
same heuristic as -Wunreachable-code-return compiler warning?
Repository:
rL LLVM
https://reviews.llvm.org
I approve.Thanks Hans!
Anna
> On Aug 21, 2017, at 1:05 PM, Hans Wennborg wrote:
>
> I'm ok with it if Anna approves.
>
> On Mon, Aug 21, 2017 at 9:06 AM, Artem Dergachev wrote:
>> Hello,
>>
>> Do we have time to merge this change into release 5.0.0? It's an assertion
>> failure fix, which show
Author: zaks
Date: Fri Nov 17 15:19:04 2017
New Revision: 318567
URL: http://llvm.org/viewvc/llvm-project?rev=318567&view=rev
Log:
Change code owner for Clang Static Analyzer to Devin Coughlin.
Differential Revision: https://reviews.llvm.org/D39964
Modified:
cfe/trunk/CODE_OWNERS.TXT
Modifi
Author: zaks
Date: Thu Dec 15 16:55:03 2016
New Revision: 289883
URL: http://llvm.org/viewvc/llvm-project?rev=289883&view=rev
Log:
[analyzer] Include type name in Retain Count Checker diagnostics
The more detailed diagnostic will make identifying which object the
diagnostics refer to easier.
Dif
Author: zaks
Date: Thu Dec 15 16:55:15 2016
New Revision: 289885
URL: http://llvm.org/viewvc/llvm-project?rev=289885&view=rev
Log:
[analyzer] Refine the diagnostics in the nullability checker to differentiate
between nil and null
This is a big deal for ObjC, where nullability annotations are ext
Author: zaks
Date: Thu Dec 15 16:55:11 2016
New Revision: 289884
URL: http://llvm.org/viewvc/llvm-project?rev=289884&view=rev
Log:
[analyzer] Refer to macro names in diagnostics for macros representing a literal
When a macro expending to a literal is used in a comparison, use the macro name
in th
Author: zaks
Date: Thu Dec 15 16:55:18 2016
New Revision: 289886
URL: http://llvm.org/viewvc/llvm-project?rev=289886&view=rev
Log:
[analyzer] Teach the analyzer that pointers can escape into __cxa_demangle
This fixes a reported false positive in the malloc checker.
Differential Revision: https:/
Author: zaks
Date: Thu Dec 15 16:55:21 2016
New Revision: 289887
URL: http://llvm.org/viewvc/llvm-project?rev=289887&view=rev
Log:
[asan][docs] Fix the documentation to use clang++ for the C++ example
After Darwin has been updated not to link in stdc++ on Darwin this actually
started to break.
D
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Thanks!
https://reviews.llvm.org/D22090
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
zaks.anna added a comment.
In https://reviews.llvm.org/D23853#524945, @xazax.hun wrote:
> > Also: I think r270511 is unlikely to be the change that caused this -- that
> > is a change in LLVM's treatment of DebugInfo, which shouldn't affect the
> > analyzer.
>
>
> I think Peter means that, that
zaks.anna added a comment.
-nostdlib is often used to build parts of libsystem. It's worth noting that
ASan and TSan are not supported for use on libsystem on darwin (and
elsewhere?), though some subcomponents of it can be sanitized. I am not sure
how this relates to UBSan.
The user experience
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:216
@@ +215,3 @@
+llvm::raw_svector_ostream warning(buf);
+warning << "warning: Path diagnostic report is not generated. Current "
+<< "output format does not support diagno
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:216
@@ +215,3 @@
+llvm::raw_svector_ostream warning(buf);
+warning << "warning: Path diagnostic report is not generated. Current "
+<< "output format does not support diagno
zaks.anna added a comment.
I've added kcc as a reviewer to see what his opinion is.
The way I see this, is that the sanitizer flags and the -nodefaultlibs and
-nostdlib flags are not fully compatible since sanitizers will not work for
some users who explicitly pass the "-no*" flags.
libcxx hap
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003
@@ +1002,3 @@
+//
+ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C,
+ const CXXNewExpr *NE,
I am not sure thi
zaks.anna added a comment.
> -fsanitize=* as a driver argument *when linking* is an explicit request to
> link against the sanitizer runtimes.
Sanitizer users pass this option to the clang driver to get the runtime
checking. Not all of them understand the implications and immediately realize
zaks.anna added a comment.
> I don't see the point of adding another flag to control this when we already
> have a perfectly good set of
> flags that already do the right thing -- that takes us three levels deep in
> flags overriding the behavior of
> other flags, and I don't see how it ac
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003
@@ +1002,3 @@
+//
+ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C,
+ const CXXNewExpr *NE,
NoQ wrote:
> dkru
zaks.anna added a comment.
Thanks!
Looks good overall. Several comments below.
Comment at: lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:160
@@ +159,3 @@
+[](const IntrusiveRefCntPtr &p) {
+ return isa(p.get());
+});
--
zaks.anna added a comment.
@NoQ,
Let's test in an IDE. Can you send screenshots?
https://reviews.llvm.org/D23300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna added a comment.
Let's test it on more real word bugs.
Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:11
@@ +10,3 @@
+// This file defines BoolConversionChecker, which checks for a particular
+// common mistake when dealing with NSNumber and OSBoolea
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Thanks!
Do you have commit access?
Repository:
rL LLVM
https://reviews.llvm.org/D24484
___
cfe-commits mailing list
cfe-commits@lists.l
zaks.anna added a comment.
Do you have commit access or should we commit?
Repository:
rL LLVM
https://reviews.llvm.org/D21506
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
Future steps:
How do we plan to bring this checker out of alpha? Have you evaluated it on
large codebases?
Repository:
rL LLVM
https://reviews.llvm.org/D21506
_
zaks.anna added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:2055
@@ -2054,1 +2054,3 @@
}
+def WarnImpcastToBoolDocs : Documentation {
+ let Category = DocCatFunction;
You probably need to "propose" the attribute to the clang community. I'd send
zaks.anna added a comment.
It is not clear to me that we've reached a consensus on cfe-dev list that
suppressing with comments and printing the checker name is the way to go.
https://reviews.llvm.org/D24411
___
cfe-commits mailing list
cfe-commits@
zaks.anna added a comment.
I do not have any more comments; however, let's wait for @NoQ to review this as
well.
Thanks!
https://reviews.llvm.org/D24307
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/l
Author: zaks
Date: Thu Jan 12 18:50:57 2017
New Revision: 291869
URL: http://llvm.org/viewvc/llvm-project?rev=291869&view=rev
Log:
[analyzer] Add LocationContext as a parameter to checkRegionChanges
This patch adds LocationContext to checkRegionChanges and removes
wantsRegionChangeUpdate as it wa
Author: zaks
Date: Thu Jan 12 18:50:41 2017
New Revision: 291866
URL: http://llvm.org/viewvc/llvm-project?rev=291866&view=rev
Log:
[analyzer] Fix false positives in Keychain API checker
The checker has several false positives that this patch addresses:
- Do not check if the return status has been
Author: zaks
Date: Thu Jan 12 18:50:50 2017
New Revision: 291868
URL: http://llvm.org/viewvc/llvm-project?rev=291868&view=rev
Log:
[tsan] Do not report errors in __destroy_helper_block_
There is a synchronization point between the reference count of a block
dropping to zero and it's destruction,
Author: zaks
Date: Thu Jan 12 18:50:47 2017
New Revision: 291867
URL: http://llvm.org/viewvc/llvm-project?rev=291867&view=rev
Log:
[analyzer] Support inlining of '[self classMethod]' and '[[self class]
classMethod]'
Differential Revision: https://reviews.llvm.org/D28495
Modified:
cfe/trunk/
Yes, ok to merge!
Thank you.
Sent from my iPhone
> On Jan 23, 2017, at 1:50 PM, Hans Wennborg wrote:
>
> Sounds good to me.
>
> Anna, you're the code owner here. Ok to merge this?
>
> Thanks,
> Hans
>
>> On Mon, Jan 23, 2017 at 10:37 AM, Artem Dergachev
>> wrote:
>> Hans,
>>
>> Could we m
Fine with merging. Thank you!
Anna.
> On Feb 1, 2017, at 11:00 AM, Hans Wennborg wrote:
>
> If Anna is Ok with it, I'm fine with merging.
>
> Thanks,
> Hans
>
> On Wed, Feb 1, 2017 at 10:29 AM, Artem Dergachev wrote:
>> Hans,
>>
>> This is a fixed and tested version of the previously-merged-a
Thank you!
On Friday, February 24, 2017, Hans Wennborg wrote:
> Yes, this looks very straight-forward. Merged in r296154.
>
> On Fri, Feb 24, 2017 at 4:29 AM, Sam McCall via cfe-commits
> > wrote:
> > Thanks Anna, I'm new to the release process here.
> >
> > Hans: this is a simple fix for a null
Author: zaks
Date: Wed Mar 8 18:01:07 2017
New Revision: 297324
URL: http://llvm.org/viewvc/llvm-project?rev=297324&view=rev
Log:
[analyzer] Add bug visitor for taint checker.
Add a bug visitor to the taint checker to make it easy to distinguish where
the tainted value originated. This is especi
Author: zaks
Date: Wed Mar 8 18:01:10 2017
New Revision: 297325
URL: http://llvm.org/viewvc/llvm-project?rev=297325&view=rev
Log:
[analyzer] Improve usability of ExprInspectionChecker
Some of the magic functions take arguments of arbitrary type. However,
for semantic correctness, the compiler st
Author: zaks
Date: Wed Mar 8 18:01:01 2017
New Revision: 297323
URL: http://llvm.org/viewvc/llvm-project?rev=297323&view=rev
Log:
[analyzer] Teach the MallocChecker about about Glib API
A patch by Leslie Zhai!
Differential Revision: https://reviews.llvm.org/D28348
Added:
cfe/trunk/test/Ana
Author: zaks
Date: Wed Mar 8 18:01:16 2017
New Revision: 297326
URL: http://llvm.org/viewvc/llvm-project?rev=297326&view=rev
Log:
[analyzer] Extend taint propagation and checking to support LazyCompoundVal
A patch by Vlad Tsyrklevich!
Differential Revision: https://reviews.llvm.org/D28445
Modi
Author: zaks
Date: Thu Mar 9 18:33:19 2017
New Revision: 297429
URL: http://llvm.org/viewvc/llvm-project?rev=297429&view=rev
Log:
[analyzer] Turn suppress-c++-stdlib on by default
We have several reports of false positives coming from libc++. For example,
there are reports of false positives in
zaks.anna added a comment.
Hi and welcome to the project!
This patch definitely looks quite complex for a first contribution, so great
job at digging through the analyzer internals!
One higher level comment I have is that you should try and split patches
whenever possible. For example, in the
zaks.anna added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/Checker.h:325
+ const CallEvent *Call,
+ const LocationContext *LCtx) {
+return ((const CHECKER *) checker)->checkRegionChanges(state, invalidated,
---
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Looks great!
https://reviews.llvm.org/D26759
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Core/CheckerManager.cpp:535
+ ExplicitRegions, Regions,
+ Call, LCtx);
}
Looks like the other patch leaked i
Author: zaks
Date: Wed Nov 16 16:59:01 2016
New Revision: 287175
URL: http://llvm.org/viewvc/llvm-project?rev=287175&view=rev
Log:
[analyzer] Remove unused check::RegionChanges::wantsRegionChangeUpdate callback
Remove the check::RegionChanges::wantsRegionChangeUpdate callback as it is no
longer u
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Thank you for the cleanup!!! For bonus points, please add comments to the class
APIs:)
https://reviews.llvm.org/D26773
___
cfe-commits mai
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:423
+
+void IteratorPastEndChecker::handleComparison(CheckerContext &C,
+ const SVal &LVal,
baloghadamsoftware wrote:
zaks.anna added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/Checker.h:325
+ const CallEvent *Call,
+ const LocationContext *LCtx) {
+return ((const CHECKER *) checker)->checkRegionChanges(state, invalidated,
---
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
LGTM. Thank you!
Repository:
rL LLVM
https://reviews.llvm.org/D25606
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://list
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Thank you for the cleanup!
Anna.
https://reviews.llvm.org/D25663
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp:72
assert(Conv);
- const Expr *Osboolean = Result.Nodes.getNodeAs("osboolean");
- const Expr *Nsnumber = Result.Nodes.getNodeAs("nsnumber");
- bool IsObjC = (bool)Nsnu
zaks.anna added a comment.
Looks like you've also added handling of Xor, Or , Div, and Rem. Should there
be tests for those?
Repository:
rL LLVM
https://reviews.llvm.org/D25596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp:111
+ QualType ObjT = (IsCpp || IsObjC)
+ ? Obj->getType().getCanonicalType().getUnqualifiedType()
+ : Obj->getType();
---
zaks.anna created this revision.
zaks.anna added reviewers: kcc, kubabrecka, dvyukov.
zaks.anna added a subscriber: cfe-commits.
This introduces a function annotation that disables TSan checking for the
function at run time. The benefit over __attribute__((no_sanitize("thread")))
is that the acc
zaks.anna added inline comments.
Comment at: test/Analysis/number-object-conversion.c:14
+ if (p) {} // expected-warning{{Converting 'CFNumberRef' to a plain boolean
value for branching; please compare the pointer to NULL instead to suppress
this warning}}
+ if (!p) {} // exp
zaks.anna created this revision.
zaks.anna added reviewers: dcoughlin, NoQ.
zaks.anna added subscribers: cfe-commits, rgov.
This patch contains 2 improvements to the CFNumber checker:
- Checking of CFNumberGetValue misuse.
- Treating all CFNumber API misuse errors as non-fatal. (Previously we tre
zaks.anna updated this revision to Diff 75488.
zaks.anna added a comment.
Address comments from Devin.
https://reviews.llvm.org/D25876
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
test/Analysis/CFNumber.c
Index: test/A
zaks.anna added a comment.
Looks good overall!
https://reviews.llvm.org/D25909
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Minor nit below.
Thanks for iterating so much on this!
Anna.
Comment at: test/Analysis/number-object-conversion.cpp:46
+#ifdef PEDANTIC
+ if (p) {} // expected-warnin
zaks.anna added inline comments.
Comment at: test/Analysis/CFNumber.c:39
+ unsigned char scalar = 0;
+ CFNumberGetValue(x, kCFNumberSInt16Type, &scalar); // expected-warning{{A
CFNumber object that represents a 16-bit integer is used to initialize an 8-bit
integer; 8 bits of
zaks.anna added a comment.
Please, add multi-file tests and tests where a line is covered more than once.
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:262
+
+static void dumpCoverageInfo(llvm::SmallVectorImpl &Path,
+ SourceManager &SM) {
-
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:274
+if (Invalid)
+ continue;
+std::ofstream OutFile(FilePath.c_str());
zaks.anna wrote:
> Would it be better to break if the buffer is invalid?
> Should this be hois
Author: zaks
Date: Wed Oct 26 17:51:47 2016
New Revision: 285253
URL: http://llvm.org/viewvc/llvm-project?rev=285253&view=rev
Log:
[analyzer] Report CFNumberGetValue API misuse
This patch contains 2 improvements to the CFNumber checker:
- Checking of CFNumberGetValue misuse.
- Treating all CFNu
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
Looks great! Please, commit.
https://reviews.llvm.org/D25909
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/
zaks.anna added a comment.
>> Actually, I always test first on real code, and it seemed to be inlined. But
>> now, even if I
>> removed the pragma it was not inlined.
Looks like this patch is interfering with this inlining suppression. We had
many false positives without it. Mainly, the analy
Author: zaks
Date: Thu Oct 27 16:38:44 2016
New Revision: 285349
URL: http://llvm.org/viewvc/llvm-project?rev=285349&view=rev
Log:
[docs] Update the TSan and MSan docs to refer to the new no_sanitize attribute
TSan and MSan were the only remaining sanitizers referring to the deprecated
attribute
zaks.anna added a comment.
How about this imperfect solution that will work quite well in practice? For
the ssize_t case, where type size cannot be used, we check the function name, #
of arguments , and check that the functions are coming from the system header.
https://reviews.llvm.org/D25940
zaks.anna added a comment.
Thanks for the review! I'll submit the updated patches soon.
https://reviews.llvm.org/D25857
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna updated this revision to Diff 76643.
zaks.anna added a comment.
Addressed the review comments.
I also added ObjC +initialize method to the list because TSan does not observe
the guaranteed synchronization between +initialize and initial object accesses.
https://reviews.llvm.org/D2585
zaks.anna added a comment.
Please, explain what variants are for in comments.
https://reviews.llvm.org/D25940
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zaks.anna accepted this revision.
zaks.anna added a comment.
This revision is now accepted and ready to land.
LGTM other than the missing explanation in comments.
https://reviews.llvm.org/D25940
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
1 - 100 of 363 matches
Mail list logo