danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki updated this revision to Diff 116865.
danielmarjamaki added a comment.
fixed review comments
Repository:
rL LLVM
https://reviews.llvm.org/D30295
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
lib
This revision was automatically updated to reflect the committed changes.
Closed by commit rL314499: [Sema] Suppress warnings for C's zero initializer
(authored by danielmarjamaki).
Changed prior to commit:
https://reviews.llvm.org/D28148?vs=82849&id=117107#toc
Repository:
rL LLVM
https://r
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D36471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki updated this revision to Diff 117956.
danielmarjamaki added a comment.
Herald added a subscriber: szepet.
Fixes according to review comments. Reuse ast matchers in LoopUnrolling.cpp.
Avoid some recursion (however the isChanged() is still recursive but it is very
small and simple)
danielmarjamaki marked an inline comment as done.
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:107
+/** Recursively check if variable is changed in code. */
+static bool isChanged(const Stmt *S, const VarDecl *VD, bool Write) {
+ if (
danielmarjamaki added a reviewer: danielmarjamaki.
danielmarjamaki added a comment.
> However, the checker seems to work with a low false positive rate. (<15 on
> the LLVM, 6 effectively different)
This does not sound like a low false positive rate to me. Could you describe
what the false posi
danielmarjamaki added a comment.
LGTM
https://reviews.llvm.org/D38674
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
In https://reviews.llvm.org/D38675#891912, @xazax.hun wrote:
> In https://reviews.llvm.org/D38675#891750, @danielmarjamaki wrote:
>
> > > However, the checker seems to work with a low false positive rate. (<15
> > > on the LLVM, 6 effectively different)
> >
> >
danielmarjamaki added a reviewer: danielmarjamaki.
danielmarjamaki added a comment.
I think a test for -Wtautological-pointer-compare should be added that shows
that the bug is fixed.
Comment at: test/Sema/conditional-expr.c:84
+ //char x;
+ return (((x != ((void *) 0)) ? (*
danielmarjamaki added a comment.
LGTM! However I would like to see a review from somebody else also.
There are a number of diagnostics that might be affected. The
Sema::DiagnoseAlwaysNonNullPointer diagnoses these:
diag::warn_this_null_compare
diag::warn_this_bool_conversion
diag::warn_address_
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D36471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL315462: [Analyzer] Clarify error messages for undefined
result (authored by danielmarjamaki).
Changed prior to commit:
https://reviews.llvm.org/D30295?vs=116865&id=118620#toc
Repository:
rL LLVM
htt
danielmarjamaki added a comment.
In https://reviews.llvm.org/D37897#892667, @dcoughlin wrote:
> Apologies for the delay reviewing! As I noted inline, I'm pretty worried
> about the performance impact of this. Is it possible to do the analysis in a
> single traversal of the translation unit?
I
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:123
+ // Is variable changed anywhere in TU?
+ for (const Decl *D : AMgr.getASTContext().getTranslationUnitDecl()->decls())
{
+if (isChanged(D, VD))
dcoughlin wrote:
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:123
+ // Is variable changed anywhere in TU?
+ for (const Decl *D : AMgr.getASTContext().getTranslationUnitDecl()->decls())
{
+if (isChanged(D, VD))
danielmarjamaki w
danielmarjamaki updated this revision to Diff 118947.
danielmarjamaki added a comment.
Track modification of global static variables in CallGraph construction
Repository:
rL LLVM
https://reviews.llvm.org/D37897
Files:
include/clang/AST/Decl.h
include/clang/StaticAnalyzer/Core/PathSensiti
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:123
+ // Is variable changed anywhere in TU?
+ for (const Decl *D : AMgr.getASTContext().getTranslationUnitDecl()->decls())
{
+if (isChanged(D, VD))
danielmarjamaki w
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D36471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
LGTM.. however I would like approval from somebody else also.
https://reviews.llvm.org/D38921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
LGTM
https://reviews.llvm.org/D38801
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki created this revision.
Herald added a subscriber: szepet.
Example code:
void test3_simplified_offset(int x, unsigned long long y) {
int buf[100];
if (x < 0)
x = 0;
for (int i = y - x; i > 0 && i < 100; i++)
buf[i] = 0; // no-warning
}
Without this patc
danielmarjamaki added a reviewer: danielmarjamaki.
danielmarjamaki added a comment.
Stylistically this looks pretty good to me. Just a minor nit.
Comment at: lib/Analysis/BodyFarm.cpp:389
+ for (unsigned int i = 2; i < D->getNumParams(); i++) {
+
+const ParmVarDecl *PDecl
danielmarjamaki added a comment.
I like this patch overall.. here are some stylistic nits.
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:610
+} else {
+ if (*lInt >= *rInt) {
+newRhsExt = lInt->getExtValue() - rInt->getExtVal
danielmarjamaki added a comment.
> I think it is much better when the assert failure tells the developer _what_
> value is failing, rather than saying "oops we are dead".
yes of course, more informative assert messages is better.
https://reviews.llvm.org/D38986
_
danielmarjamaki added inline comments.
Comment at: cfe/trunk/lib/Analysis/BodyFarm.cpp:139
-DeclRefExpr *ASTMaker::makeDeclRefExpr(const VarDecl *D,
- bool RefersToEnclosingVariableOrCapture,
- bool Get
danielmarjamaki updated this revision to Diff 119590.
danielmarjamaki added a comment.
Herald added a subscriber: szepet.
As suggested, use a ProgramState trait to detect VLA overflows.
I did not yet manage to get a SubRegion from the DeclStmt that matches the
location SubRegion. Therefore I am
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D31029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
danielmarjamaki marked an inline comment as done.
Closed by commit rL305669: [analyzer] Fix logical not for pointers with
different bit width (authored by danielmarjamaki).
Changed prior to commit:
https://reviews.llvm.or
danielmarjamaki abandoned this revision.
danielmarjamaki added a comment.
I will not continue working on this checker
Repository:
rL LLVM
https://reviews.llvm.org/D32346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.or
danielmarjamaki updated this revision to Diff 103585.
danielmarjamaki added a comment.
Fix review comments
Repository:
rL LLVM
https://reviews.llvm.org/D30295
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
lib/S
danielmarjamaki marked 4 inline comments as done.
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:126
+ << BinaryOperator::getOpcodeStr(B->getOpcode())
+ << "' expression is undefined due to shift count >=
This revision was automatically updated to reflect the committed changes.
Closed by commit rL311984: [clang-tidy] Fix 'misc-misplaced-widening-cast'
assertion error. (authored by danielmarjamaki).
Changed prior to commit:
https://reviews.llvm.org/D36670?vs=110940&id=113026#toc
Repository:
rL
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added inline comments.
Comment at: tools/scan-build-py/libscanbuild/analyze.py:165
+with open(filename, 'r') as in_file:
+for line in in_file:
+yield line
I believe you can write:
for line in op
danielmarjamaki added a comment.
small nits
Comment at: include/clang/CrossTU/CrossTranslationUnit.h:58
+
+/// \brief This function can parse an index file that determines which
+///translation unit contains which definition.
I suggest that "can" is rem
danielmarjamaki accepted this revision.
danielmarjamaki added inline comments.
This revision is now accepted and ready to land.
Comment at: tools/scan-build-py/libscanbuild/analyze.py:165
+with open(filename, 'r') as in_file:
+for line in in_file:
+
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki updated this revision to Diff 113969.
danielmarjamaki added a comment.
minor code cleanup
Repository:
rL LLVM
https://reviews.llvm.org/D36471
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lib/StaticAnalyzer/Core/ExprEngineC.cpp
lib/StaticAna
danielmarjamaki added a comment.
This is not committed as far as I see.. do you have write permission or do you
want that I commit it?
https://reviews.llvm.org/D28148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D36471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki created this revision.
I saw a false positive where the analyzer made wrong conclusions about a static
variable.
Static variables that are not written have known values (initialized values).
This is the (simplified) code that motivated me to create this patch:
static char *al
danielmarjamaki updated this revision to Diff 115385.
danielmarjamaki added a comment.
Minor cleanups. Changed names. Updated comments.
Repository:
rL LLVM
https://reviews.llvm.org/D37897
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lib/StaticAnalyzer/Core/ExprEngi
danielmarjamaki added a comment.
In https://reviews.llvm.org/D37897#871858, @xazax.hun wrote:
> Out of curiosity, does the false positive disappear after making the static
> variables const?
Yes that fixes the false positive
Repository:
rL LLVM
https://reviews.llvm.org/D37897
_
danielmarjamaki created this revision.
Herald added a subscriber: whisperity.
This fixes a FP. Without the fix, the checker says that "static int x;" is
unreachable.
Repository:
rL LLVM
https://reviews.llvm.org/D36141
Files:
lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
test/An
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309799: [StaticAnalyzer] Fix false positives for unreachable
code in macros. (authored by danielmarjamaki).
Changed prior to commit:
https://reviews.llvm.org/D36141?vs=109086&id=109294#toc
Repository:
danielmarjamaki updated this revision to Diff 109590.
danielmarjamaki added a comment.
Cleaned up the patch a little. Thanks Gabor for telling me about
SValBuilder::getKnownValue()
Repository:
rL LLVM
https://reviews.llvm.org/D30295
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/C
danielmarjamaki created this revision.
In the code below the division result should be a value between 5 and 25.
if (a >= 10 && a <= 50) {
int b = a / 2;
}
This patch will calculate results for additions, subtractions and divisions.
I intentionally do not try to handle all possible case
danielmarjamaki updated this revision to Diff 110220.
danielmarjamaki added a comment.
A minor code cleanup. No functional change.
Repository:
rL LLVM
https://reviews.llvm.org/D36471
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lib/StaticAnalyzer/Core/ExprEn
danielmarjamaki added a comment.
In https://reviews.llvm.org/D36471#835410, @xazax.hun wrote:
> Can't you reuse somehow some machinery already available to evaluate the
> arithmetic operators? Those should already handle most of your TODOs and
> overflows.
Sounds good.. I have not seen that m
danielmarjamaki updated this revision to Diff 110378.
danielmarjamaki added a comment.
Refactoring, use BasicValueFactory::evalAPSInt
Repository:
rL LLVM
https://reviews.llvm.org/D36471
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lib/StaticAnalyzer/Core/Exp
danielmarjamaki added a comment.
Should evalAPSInt() have machinery to do standard sign/type promotions? I
suggest that I add one more argument `bool promote = false`, do you think that
sounds good?
Repository:
rL LLVM
https://reviews.llvm.org/D36471
_
danielmarjamaki added a comment.
LGTM. I let others approve this.
Repository:
rL LLVM
https://reviews.llvm.org/D36670
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
LGTM. But others should approve.
Repository:
rL LLVM
https://reviews.llvm.org/D36672
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki abandoned this revision.
danielmarjamaki added a comment.
No reviews => I will not contribute.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92634/new/
https://reviews.llvm.org/D92634
___
danielmarjamaki created this revision.
danielmarjamaki added reviewers: NoQ, xazax.hun.
Herald added subscribers: steakhal, ASDenysPetrov, martong, Charusso, dkrupp,
donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet,
baloghadamsoftware.
danielmarjamaki requested review of this r
danielmarjamaki added a comment.
> Do you mind writing some tests with multidimensional arrays to check what do
> we lose if we remove that code?
I have spent a few hours trying to write a test case that shows there is false
negatives caused by this change. And fail.
I see lots of false negati
danielmarjamaki updated this revision to Diff 121726.
danielmarjamaki added a comment.
Herald added a subscriber: szepet.
I have updated the patch so it uses evalBinOpNN. This seems to work properly.
I have a number of TODOs in the test cases that should be fixed. Truncations
are not handled pro
danielmarjamaki added a comment.
> Could you do a similar analysis that I did above to check why does this not
> work for the multidimensional case? (I.e.: checking what constraints are
> generated and what the analyzer does with them.)
the "location.dump()" will just say "x".
the ProgramState
danielmarjamaki added a comment.
> So what are the arguments that are passed to getSimplifiedOffset() in that
> case? 0? That does not seem to be correct.
yes.
so the conclusion is:
- this code does not work
- this code is untested
- this code is not even used in the use cases it was intended
danielmarjamaki added a comment.
Thanks for working on these. imo these are false positives.
Comment at: lib/AST/Expr.cpp:1893
+
+ const IntegerLiteral *lit = dyn_cast(getInit(0));
+ if (!lit) {
I would recommend capital first letter for this variable
=
danielmarjamaki created this revision.
danielmarjamaki added reviewers: zaks.anna, dcoughlin.
danielmarjamaki added a subscriber: cfe-commits.
danielmarjamaki set the repository for this revision to rL LLVM.
Example code:
void f1(int x) {
int a[20] = {0};
if (x==25) {}
if (a[x] == 1
danielmarjamaki created this revision.
danielmarjamaki added a reviewer: NoQ.
danielmarjamaki added a subscriber: cfe-commits.
danielmarjamaki set the repository for this revision to rL LLVM.
This fix the crash reported in https://llvm.org/bugs/show_bug.cgi?id=31173
Repository:
rL LLVM
https:
danielmarjamaki added a comment.
In https://reviews.llvm.org/D28278#639710, @xazax.hun wrote:
> Did you experience any problems with the array out of bounds check lately? In
> case it was stable on large code-bases and did not give too many false
> positives, I think it might be worth to move t
danielmarjamaki accepted this revision.
danielmarjamaki added a reviewer: danielmarjamaki.
danielmarjamaki added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D28148
___
cfe-commits mailing list
cfe-commit
danielmarjamaki added a comment.
Ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki created this revision.
The Static Analyzer assumed that all pointers had the same bit width. Now pass
the type to the 'makeNull' method, to construct a null
pointer of the appropiate bit width.
Example code that does not work well:
int main(void) {
__cm void *cm_p = 0;
danielmarjamaki added a comment.
I am not sure where to look. I heard somebody say OpenCL has different pointer
widths.
Repository:
rL LLVM
https://reviews.llvm.org/D31029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm
danielmarjamaki updated this revision to Diff 92150.
danielmarjamaki added a comment.
Fix review comments
Repository:
rL LLVM
https://reviews.llvm.org/D30295
Files:
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
lib/St
danielmarjamaki marked 2 inline comments as done.
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:100
+ BinaryOperatorKind BOK,
+
danielmarjamaki created this revision.
Herald added a subscriber: JDevlieghere.
This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32246
To avoid spurious warnings, clang-tidy should not warn about misplaced widening
casts for implicit casts in function calls.
Repository:
rL LLVM
https:
danielmarjamaki added a comment.
In my opinion, we should stop warning about all implicit casts.
Take for instance:
long l1;
if (condition)
l1 = n << 8; // <- implicit cast
else
l1 = ~0L;
That is fine. Nothing suspicious. Just because the destination variable is long
doesn't hav
danielmarjamaki added a comment.
In https://reviews.llvm.org/D31097#704628, @alexfh wrote:
> In https://reviews.llvm.org/D31097#704626, @alexfh wrote:
>
> > In https://reviews.llvm.org/D31097#704621, @xazax.hun wrote:
> >
> > > I wonder whether warning on implicit casts still makes sense for ex
danielmarjamaki updated this revision to Diff 92315.
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
Fix review comment. Made isShiftOverflow() static.
Repository:
rL LLVM
https://reviews.llvm.org/D30295
Files:
include/clang/StaticAnalyzer/Core/PathSensit
danielmarjamaki updated this revision to Diff 92322.
danielmarjamaki added a comment.
Remove warnings for implicit casts.
Repository:
rL LLVM
https://reviews.llvm.org/D31097
Files:
clang-tidy/misc/MisplacedWideningCastCheck.cpp
clang-tidy/misc/MisplacedWideningCastCheck.h
docs/clang-ti
danielmarjamaki added a comment.
I believe there is pointless code in relativeIntSizes etc. If there is for
instance "a+b" then the result can't be a char type.
static int relativeIntSizes(BuiltinType::Kind Kind) {
switch (Kind) {
case BuiltinType::UChar:
return 1;
case Built
danielmarjamaki added a comment.
In https://reviews.llvm.org/D31097#707385, @baloghadamsoftware wrote:
> Hi!
>
> There is an option to disable the checking of widening casts. It is enabled
> by default. You can disable it any time. Or, if you find too much false
> positives, we can discuss abou
danielmarjamaki added a comment.
Well.. feel free to provide an alternative fix. If the message is more specific
and it must be enabled explicitly by an option then maybe it's good enough for
me.
Repository:
rL LLVM
https://reviews.llvm.org/D31097
danielmarjamaki updated this revision to Diff 92634.
danielmarjamaki added a comment.
I added more testcases. There are several undetected "TODO: loss of precision"
right now in the tests that I would like to fix. If this patch to fix FP is
accepted I will commit it and continue working on the T
danielmarjamaki updated this revision to Diff 92773.
danielmarjamaki added a comment.
Added a testcase that will crash without the fix. Used the amdgcn target as
that happens to use different pointer bit widths for different address spaces.
Updated the comment. I am not good at english so I hope
danielmarjamaki added a comment.
In https://reviews.llvm.org/D31029#703428, @zaks.anna wrote:
> Are there other cases where makeNull would need to be replaced?
There might be. As I understand it, this is the only known case at the moment.
Repository:
rL LLVM
https://reviews.llvm.org/D31029
danielmarjamaki updated this revision to Diff 92810.
danielmarjamaki added a comment.
Updated the patch so all the loss of precision are detected also
Repository:
rL LLVM
https://reviews.llvm.org/D25596
Files:
lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
test/Analysis/conversion.c
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
In https://reviews.llvm.org/D31029#708567, @danielmarjamaki wrote:
> In https://reviews.llvm.org/D31029#703428, @zaks.anna wrote:
>
> > Are there other cases where makeNull would need to be replaced?
>
>
> There mi
danielmarjamaki added inline comments.
Comment at: include/clang/AST/ASTContext.h:42
#include "clang/Basic/Specifiers.h"
+#include "clang/Basic/VersionTuple.h"
#include "llvm/ADT/APSInt.h"
I don't see why this is included here.
Comment at: in
danielmarjamaki added a comment.
Ping
Repository:
rL LLVM
https://reviews.llvm.org/D31029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
Ping
Repository:
rL LLVM
https://reviews.llvm.org/D30295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
Ping
Repository:
rL LLVM
https://reviews.llvm.org/D25596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added inline comments.
Comment at: tools/xtu-analysis/xtu-analyze.py:29
+
+threading_factor = int(multiprocessing.cpu_count() * 1.5)
+analyser_output_formats = ['plist-multi-file', 'plist', 'plist-html',
gerazo wrote:
> danielmarjamaki wrote:
> >
This revision was automatically updated to reflect the committed changes.
Closed by commit rL299523: [analyzer] alpha.core.Conversion - Fix false
positive for 'U32 += S16;'… (authored by danielmarjamaki).
Changed prior to commit:
https://reviews.llvm.org/D25596?vs=92810&id=94176#toc
Repository
danielmarjamaki added a comment.
In https://reviews.llvm.org/D31650#717691, @NoQ wrote:
> Is freeing function pointers always undefined?
I guess not.. however I don't personally see why it would be useful to allocate
function pointers with malloc.
> I wonder what happens if we take some JIT
danielmarjamaki added a comment.
> void *p = malloc(sizeof(fnptr));
sorry ... I guess that should be something like "void *p = malloc(100);"
Repository:
rL LLVM
https://reviews.llvm.org/D31650
___
cfe-commits mailing list
cfe-commits@lists.llvm.
danielmarjamaki updated this revision to Diff 94509.
danielmarjamaki added a comment.
This is just work in progress!!
With these changes Clang static analyzer will detect overflow in this sample
code:
void foo(int X) {
char *Data = new char[X];
Data[X] = 0; // <- error
delete[] Da
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:49
+ /// Recursively descends into symbolic expressions and replaces symbols
+ /// with thier known values (in the sense of the getKnownValue() method).
+ SVal simplifySVal(Program
danielmarjamaki added a comment.
Thanks! Looks like a valueable addition.
Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2004
+void CStringChecker::evalMemset(CheckerContext &C, const CallExpr *CE) const {
+ if (CE->getNumArgs() < 3)
+return;
e
danielmarjamaki added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h:45
+: public ProgramStatePartialTrait {
+ static void *GDMIndex() { static int index = 0; return &index; }
+};
Nit: =0 is redundant
https://
danielmarjamaki added a comment.
Ping
Repository:
rL LLVM
https://reviews.llvm.org/D31029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 170 matches
Mail list logo