danielmarjamaki marked an inline comment as done.
Comment at: clang-tidy/misc/MisplacedWideningCastCheck.cpp:33
@@ +32,3 @@
+ Finder->addMatcher(varDecl(has(Cast)), this);
+ Finder->addMatcher(binaryOperator(hasOperatorName("="), hasRHS(Cast)), this);
+}
I have
danielmarjamaki updated this revision to Diff 40505.
danielmarjamaki added a comment.
I have problems with the "default" handling of expressions.
I want to warn about loss of precision for such code:
unsigned int x = 256;
unsigned char c;
c = x;
The analyser tells me that the RHS value is
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
Does anybody else think that this should be moved to clang-tidy?
I believe that the noise level is very low when I scan various open source
projects. My script tries to run clang on all projects in the debian arch
danielmarjamaki created this revision.
danielmarjamaki added subscribers: cfe-commits, alexfh.
This is a small code cleanup. No change in logical behaviour is intended.
http://reviews.llvm.org/D14977
Files:
clang-tidy/misc/AssertSideEffectCheck.cpp
Index: clang-tidy/misc/AssertSideEffectCheck
danielmarjamaki closed this revision.
danielmarjamaki added a comment.
Committed with 254066.
http://reviews.llvm.org/D14977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
ping..
the latest patch has an alternative approach, where the checker track values of
symbols.
REGISTER_MAP_WITH_PROGRAMSTATE(DeclVal, const ValueDecl *, SVal)
The reason I don't use normal ProgramState values is that these symbol values
are truncated.
I w
danielmarjamaki updated this revision to Diff 41858.
danielmarjamaki added a comment.
Another diff.
This time I have stripped the checker to make it simpler to review, triage, etc.
It will now only warn about loss of precision in assignments when RHS is a
variable.
For me, triaging these resul
danielmarjamaki marked 2 inline comments as done.
danielmarjamaki added a comment.
In http://reviews.llvm.org/D13126#302647, @dcoughlin wrote:
> In http://reviews.llvm.org/D13126#302328, @danielmarjamaki wrote:
>
> > When scanning 692 projects with this checker I got 56 warnings. I've
> > triage
danielmarjamaki updated this revision to Diff 42164.
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
Moved warning to clang-tidy.
In this patch I am more careful about function calls. Sometimes when it is
technically possible to use const it's still not a good
danielmarjamaki added a subscriber: alexfh.
danielmarjamaki added a reviewer: alexfh.
danielmarjamaki added a comment.
Alexander: I add you as reviewer since this was moved to clang-tidy.
http://reviews.llvm.org/D12359
___
cfe-commits mailing list
c
danielmarjamaki added a comment.
In http://reviews.llvm.org/D12359#304772, @danielmarjamaki wrote:
> Moved warning to clang-tidy.
>
> In this patch I am more careful about function calls. Sometimes when it is
> technically possible to use const it's still not a good idea.
>
> For instance when u
danielmarjamaki created this revision.
danielmarjamaki added reviewers: alexfh, aaron.ballman, rsmith.
danielmarjamaki added subscribers: cfe-commits, sberg.
This is a new clang-tidy checker that will warn when function parameters should
be const.
See also related discussions in http://reviews.l
danielmarjamaki abandoned this revision.
danielmarjamaki added a comment.
I have created a new revision: http://reviews.llvm.org/D15332
http://reviews.llvm.org/D12359
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-
danielmarjamaki updated this revision to Diff 42292.
danielmarjamaki added a comment.
I have tried to fix the comments.
This patch is mostly untested. I have only run 'make check-all'. I am running
more tests right now.
http://reviews.llvm.org/D15332
Files:
clang-tidy/readability/CMakeLists
danielmarjamaki marked 12 inline comments as done.
Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:44
@@ +43,3 @@
+ if (B->isAssignmentOp())
+markCanNotBeConst(B, false);
+} else if (const auto *CE = dyn_cast(S)) {
I tried to unify l
danielmarjamaki marked 3 inline comments as done.
danielmarjamaki added a comment.
In http://reviews.llvm.org/D15332#305976, @alexfh wrote:
> Please add tests with templates and macros. Please also run this on
> LLVM/Clang to ensure a) it doesn't crash; b) the number of warnings is sane;
> c) a
danielmarjamaki added a comment.
In http://reviews.llvm.org/D15332#306097, @Eugene.Zelenko wrote:
> This check partially implements PR19419. Could it be extended to variables?
Yes, I don't see any technical reasons why that would not work. However
politically, some people like const variables
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
I have looked all warnings that I got. 1678 projects where scanned. In total I
got 124 warnings.
I classified 91 warnings as TP. 14 as FP. and then there were 19 that I failed
to triage. I for instance failed to
danielmarjamaki added a comment.
> I classified 91 warnings as TP. 14 as FP. and then there were 19 that I
> failed to triage. I for instance failed to triage code implemented in headers
> when I don't know what values function arguments will have.
Sorry I calculated wrong.
I classified 91 wa
danielmarjamaki added a comment.
ping. I would like to have a review on this.
http://reviews.llvm.org/D13126
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
Thanks a lot for those comments. I'll try your suggestions. I will try to
upload some samples where I think the ProgramState is wrong.
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:78
@@ +77,3 @@
+
+// Can E value be greater or e
danielmarjamaki marked 4 inline comments as done.
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:41
@@ +40,3 @@
+const Stmt *Parent = PM.getParent(Cast);
+if (!Parent)
+ return;
a.sidorin wrote:
> Parent should always exist for an impli
201 - 222 of 222 matches
Mail list logo