danielmarjamaki created this revision.
danielmarjamaki added a reviewer: alexfh.
danielmarjamaki added a subscriber: cfe-commits.
This fixes the FP in http://llvm.org/bugs/show_bug.cgi?id=25208
http://reviews.llvm.org/D14540
Files:
clang-tidy/misc/MacroParenthesesCheck.cpp
test/clang-tidy/mi
danielmarjamaki closed this revision.
danielmarjamaki added a comment.
Committed with 252608
http://reviews.llvm.org/D14540
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
In http://reviews.llvm.org/D12359#287522, @rsmith wrote:
> Why does this construct justify the compiler emitting a warning? It seems to
> be reporting a fact about the code rather than a bug, and as there are many
> coding styles where variables are not routinel
danielmarjamaki updated this revision to Diff 40040.
danielmarjamaki added a comment.
Moved NonConstUse from VarDecl to ParmVarDecl to avoid waste of memory
http://reviews.llvm.org/D12359
Files:
include/clang/AST/Decl.h
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/Diagnosti
danielmarjamaki accepted this revision.
danielmarjamaki added a reviewer: danielmarjamaki.
danielmarjamaki marked 6 inline comments as done.
This revision is now accepted and ready to land.
Comment at: lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp:120
@@ +119,3 @@
+ if
danielmarjamaki added inline comments.
Comment at: clang-tidy/readability/MisplacedArrayIndexCheck.cpp:43
@@ +42,3 @@
+
+static StringRef getAsString(const MatchFinder::MatchResult &Result,
+ const Expr *E) {
alexfh wrote:
> Looks like
danielmarjamaki set the repository for this revision to rL LLVM.
danielmarjamaki updated this revision to Diff 67144.
danielmarjamaki added a comment.
Fixed review comments.
Repository:
rL LLVM
https://reviews.llvm.org/D21134
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readab
danielmarjamaki removed rL LLVM as the repository for this revision.
danielmarjamaki updated this revision to Diff 67145.
danielmarjamaki added a comment.
Cleanup my previous commit. Ran clang-format.
https://reviews.llvm.org/D21134
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/re
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
In https://reviews.llvm.org/D21134#508511, @aaron.ballman wrote:
> Is there a reason we don't want this check to be a part of the clang
> frontend, rather than as a clang-tidy check?
I discussed this with fronte
danielmarjamaki added a comment.
In https://reviews.llvm.org/D21134#508524, @jroelofs wrote:
> I think the replacement is wrong for something like:
>
> int *arr; int offs1, offs2;
> offs1[arr + offs2] = 42;
>
>
> which I think would give:
>
> int *arr; int offs1, offs2;
> arr + offs2[offs
danielmarjamaki updated this revision to Diff 67322.
danielmarjamaki added a comment.
take care of review comments
https://reviews.llvm.org/D21134
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/MisplacedArrayIndexCheck.cpp
clang-tidy/readability/MisplacedArrayIndexChe
danielmarjamaki marked 4 inline comments as done.
danielmarjamaki added a comment.
as far as I see the only unsolved review comment now is about macros. if it can
be handled better.
Comment at: clang-tidy/readability/MisplacedArrayIndexCheck.cpp:28-29
@@ +27,4 @@
+
danielmarjamaki marked 2 inline comments as done.
Comment at: test/clang-tidy/readability-misplaced-array-index.cpp:31
@@ +30,3 @@
+ x[10] = 0;
+ dostuff(0[0 + ABC]);
+}
aaron.ballman wrote:
> Why is this considered to be "normal syntax" and not worth getting a
danielmarjamaki updated this revision to Diff 67337.
danielmarjamaki added a comment.
More generic diagnostic. Diagnose all integerType[pointerType] expressions.
https://reviews.llvm.org/D21134
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/MisplacedArrayIndexCheck.cpp
danielmarjamaki updated this revision to Diff 67338.
danielmarjamaki added a comment.
ran clang-format
https://reviews.llvm.org/D21134
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/MisplacedArrayIndexCheck.cpp
clang-tidy/readability/MisplacedArrayIndexCheck.h
clang
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
https://reviews.llvm.org/D21134
___
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 67470.
danielmarjamaki added a comment.
Make sure patch can be applied in latest trunk.
Ping.
https://reviews.llvm.org/D13126
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyz
danielmarjamaki updated this revision to Diff 67500.
danielmarjamaki added a comment.
Fix patch so it can be applied in latest trunk. Tried to fix review comments.
https://reviews.llvm.org/D15332
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/NonConstParameterCheck.cpp
danielmarjamaki marked 10 inline comments as done.
Comment at: test/clang-tidy/readability-non-const-parameter.cpp:117-135
@@ +116,21 @@
+// CHECK-MESSAGES: :[[@LINE+1]]:18: warning: pointer parameter 'p' can be
+int return1(int *p) {
+ // CHECK-FIXES: {{^}}int return1(const int
danielmarjamaki updated this revision to Diff 67504.
danielmarjamaki added a comment.
fixed more review comments
https://reviews.llvm.org/D15332
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/NonConstParameterCheck.cpp
clang-tidy/readability/NonConstParameterCheck.h
danielmarjamaki marked 2 inline comments as done.
Comment at: test/clang-tidy/readability-non-const-parameter.cpp:245
@@ +244,3 @@
+ C c(p);
+}
+
I have added tests and fixed FPs in latest diff.
Comment at: test/clang-tidy/readability-non-const-
danielmarjamaki updated this revision to Diff 67506.
danielmarjamaki marked 2 inline comments as done.
danielmarjamaki added a comment.
added this check to the release notes. run clang-format.
https://reviews.llvm.org/D15332
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readabilit
danielmarjamaki updated this revision to Diff 67817.
danielmarjamaki added a comment.
fixed review comments
https://reviews.llvm.org/D13126
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
danielmarjamaki marked 3 inline comments as done.
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:67
@@ +66,3 @@
+ const Stmt *Parent = PM.getParent(Cast);
+ if (!Parent)
+return;
I get assertion failure then when running this test:
Analysis/
danielmarjamaki added inline comments.
Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:95-98
@@ +94,6 @@
+const QualType T = VD->getType();
+if (T->isPointerType() && !T->getPointeeType().isConstQualified())
+ markCanNotBeConst(VD->getInit(), true);
+
danielmarjamaki added a comment.
In http://reviews.llvm.org/D13126#335929, @danielmarjamaki wrote:
> For information, I am testing this patch right now.. it will take a while 1-2
> days.
I have run my latest patch..
In 2215 projects it found 875 warnings.
For comparison the -Wconversion gene
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
ping?
http://reviews.llvm.org/D16310
___
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: clang-tidy/misc/MisplacedWideningCastCheck.cpp:31
@@ +30,3 @@
+
+ Finder->addMatcher(returnStmt(has(Cast)), this);
+ Finder->addMatcher(varDecl(has(Cast)), this);
alexfh wrote:
> FYI, these matchers can be combi
danielmarjamaki updated this revision to Diff 47181.
danielmarjamaki added a comment.
Fixes according to review comments.
http://reviews.llvm.org/D16310
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/MisplacedWideningCastCheck.cpp
clang-tidy/mis
danielmarjamaki updated this revision to Diff 47182.
danielmarjamaki marked 9 inline comments as done.
danielmarjamaki added a comment.
Fixed review comments
http://reviews.llvm.org/D16310
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/MisplacedWi
danielmarjamaki added inline comments.
Comment at: clang-tidy/misc/MisplacedWideningCastCheck.cpp:79
@@ +78,3 @@
+
+void MisplacedWideningCastCheck::check(const MatchFinder::MatchResult &Result)
{
+ const auto *Cast = Result.Nodes.getNodeAs("Cast");
I looked in
danielmarjamaki added inline comments.
Comment at: docs/clang-tidy/checks/misc-misplaced-widening-cast.rst:2
@@ +1,3 @@
+.. title:: clang-tidy - misc-misplaced-widening-cast
+
+misc-misplaced-widening-cast
For information, it seem I had to use -DLLVM_ENABLE_SPHINX
This revision was automatically updated to reflect the committed changes.
Closed by commit rL260223: [clang-tidy] Add 'misc-misplaced-widening-cast'
check. (authored by danielmarjamaki).
Changed prior to commit:
http://reviews.llvm.org/D16310?vs=47182&id=47310#toc
Repository:
rL LLVM
http:/
That is intentional.. you can't get overflow with / , % , & , | , etc...
..
Daniel Marjamäki Senior Engineer
Evidente ES East AB Warfvinges väg 34 SE-112 51 Stockholm Sweden
Mobile:
Hello!
> I'm not sure this is a good fix. What was the specific issue (and on which
> buildbots)?
Ok.
The buildbots said:
FileCheck error:
'/home/linaro/buildbot/clang-cmake-thumbv7-a15/stage1/tools/clang/tools/extra/test/clang-tidy/Output/misc-misplaced-widening-cast.cpp.tmp.cpp.msg'
is em
danielmarjamaki added inline comments.
Comment at:
clang-tools-extra/trunk/clang-tidy/misc/MisplacedWideningCastCheck.cpp:21-23
@@ +20,5 @@
+void MisplacedWideningCastCheck::registerMatchers(MatchFinder *Finder) {
+ auto Calc = expr(anyOf(binaryOperator(anyOf(
+
Hello!
That would make some sense to me.
To catch portability issues users could use different relevant targets. Do you
know if some do that?
Best regards,
Daniel Marjamäki
..
Danie
> You can get overflow with / and %. Consider:
>
> int i = INT_MIN / -1; // similar for %
you are right, I did not think of that.
imho overflow still seems unlikely for / and %.
..
D
danielmarjamaki created this revision.
danielmarjamaki added a reviewer: alexfh.
danielmarjamaki added a subscriber: cfe-commits.
danielmarjamaki set the repository for this revision to rL LLVM.
The misc-misplaced-widening-cast currently only looks at the size to determine
if a cast is widening.
This revision was automatically updated to reflect the committed changes.
Closed by commit rL260665: [clang-tidy] improve misc-misplaced-widening-cast so
it also detects… (authored by danielmarjamaki).
Changed prior to commit:
http://reviews.llvm.org/D17140?vs=47640&id=47771#toc
Repository:
danielmarjamaki added a comment.
ping
http://reviews.llvm.org/D16309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
ping
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 updated this revision to Diff 47962.
danielmarjamaki added a comment.
Run this check on C++ code also. I have rerun the add_new_check python script.
Minor code cleanups.
I have run this on the debian packages again. In 1806 projects there were 9691
warnings. I have so far triage
danielmarjamaki added a comment.
In http://reviews.llvm.org/D15332#352556, @danielmarjamaki wrote:
>
> I see no warning when running on Clang source code (files in
> llvm/tools/clang/lib/...).
For information I rerun with --header-filter=* and got some results.. I will
triage those..
ht
danielmarjamaki marked 2 inline comments as done.
Comment at: docs/clang-tidy/checks/readability-non-const-parameter.rst:15
@@ +14,3 @@
+
+ // warning here; p should be const
+ char f1(char *p) {
LegalizeAdulthood wrote:
> With pointers, there are always two lay
danielmarjamaki updated this revision to Diff 52029.
danielmarjamaki marked 2 inline comments as done.
danielmarjamaki added a comment.
Minor fixes of review comments. Renamed functions to "isNegative" and
"isGreaterEqual" and return bool. Updated comment. Added testcases for false
positives I h
danielmarjamaki added a comment.
In http://reviews.llvm.org/D13126#381772, @zaks.anna wrote:
> Could you add the reduced false positives to the tests file?
>
> > As far as I see the diagnostics are showing the proper path now..
>
>
> What do you mean? Does this refer to supplying more information
danielmarjamaki created this revision.
danielmarjamaki added subscribers: cfe-commits, alexfh.
danielmarjamaki set the repository for this revision to rL LLVM.
This is a quick fix for bugzilla 26273. parentheses should not be inserted in
variable declarations.
This patch will introduce false neg
danielmarjamaki added a comment.
> The "possibleVarDecl" could be much more clever. For instance, variable
> declarations can at least contain :: < & also, I could handle those better
> also but that would mean more false negatives.
I now saw bugzilla 27399 also.
I do need to handle templates
danielmarjamaki removed rL LLVM as the repository for this revision.
danielmarjamaki updated this revision to Diff 59208.
danielmarjamaki added a comment.
Updated diff. Now also handles bugzilla 27399.
http://reviews.llvm.org/D20853
Files:
clang-tidy/misc/MacroParenthesesCheck.cpp
test/clan
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272128 (authored by danielmarjamaki).
Changed prior to commit:
http://reviews.llvm.org/D20853?vs=59208&id=60013#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20853
Files:
clang-tools-extra/trun
danielmarjamaki created this revision.
danielmarjamaki added a reviewer: alexfh.
danielmarjamaki added a subscriber: cfe-commits.
danielmarjamaki set the repository for this revision to rL LLVM.
this is a new check for clang-tidy that diagnoses when it see unusual array
index syntax.
there is no
danielmarjamaki removed rL LLVM as the repository for this revision.
danielmarjamaki updated this revision to Diff 60803.
danielmarjamaki added a comment.
updated releasedocs
deeper lookup if macro is used
only warn when the replacement can be done safely. the expressions "x[y+z]" and
y+z[x]" are
danielmarjamaki updated this revision to Diff 60804.
danielmarjamaki added a comment.
fixed typo in releasenotes
http://reviews.llvm.org/D21134
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/MisplacedArrayIndexCheck.cpp
clang-tidy/readability/MisplacedArrayIndexCheck.
danielmarjamaki added inline comments.
Comment at: test/clang-tidy/readability-non-const-parameter.cpp:3
@@ +2,3 @@
+
+// Currently the checker only warns about pointer arguments.
+//
LegalizeAdulthood wrote:
> danielmarjamaki wrote:
> > LegalizeAdulthood wrote:
>
danielmarjamaki updated this revision to Diff 50032.
danielmarjamaki added a comment.
Updated documentation
http://reviews.llvm.org/D15332
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/NonConstParameterCheck.cpp
clang-tidy/readability/NonConstParameterCheck.h
clang
danielmarjamaki marked 7 inline comments as done.
Comment at: docs/clang-tidy/checks/readability-non-const-parameter.rst:16
@@ +15,3 @@
+ // warning here; the declaration "const char *p" would make the function
+ // interface safer.
+ char f1(char *p)
thanks. I
danielmarjamaki marked 2 inline comments as done.
Comment at: test/clang-tidy/readability-non-const-parameter.cpp:4
@@ +3,3 @@
+// Currently the checker only warns about pointer arguments.
+//
+// It can be defined both that the data is const and that the pointer is const,
---
danielmarjamaki added a comment.
ping.
http://reviews.llvm.org/D15332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
ping
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 marked 12 inline comments as done.
Comment at: docs/clang-tidy/checks/readability-non-const-parameter.rst:6
@@ +5,3 @@
+
+Finds function parameters that should be const. When const is used properly,
+many mistakes can be avoided. Advantages when using const properl
danielmarjamaki updated this revision to Diff 50705.
danielmarjamaki marked 3 inline comments as done.
danielmarjamaki added a comment.
Fixed review comments
http://reviews.llvm.org/D15332
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/NonConstParameterCheck.cpp
clang
danielmarjamaki added a comment.
ping
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.
In http://reviews.llvm.org/D13126#379306, @zaks.anna wrote:
> Why is there such a large jump in the number of warnings reported in the last
> patch iteration?
> It went from "1678 projects where scanned. In total I got 124 warnings" to
> "In 2215 projects it fo
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:84
@@ +83,3 @@
+// Can E value be greater or equal than Val?
+static bool canBeGreaterEqual(CheckerContext &C, const Expr *E,
+ unsigned long long Val)
danielmarjamaki added inline comments.
Comment at: test/clang-tidy/readability-non-const-parameter.cpp:116-134
@@ +115,21 @@
+
+// CHECK-MESSAGES: :[[@LINE+1]]:18: warning: parameter 'p' can be const
+int return1(int *p) {
+ // CHECK-FIXES: {{^}}int return1(const int *p) {{{$}}
+
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:84
@@ +83,3 @@
+// Can E value be greater or equal than Val?
+static bool canBeGreaterEqual(CheckerContext &C, const Expr *E,
+ unsigned long long Val)
danielmarjamaki added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:84
@@ +83,3 @@
+// Can E value be greater or equal than Val?
+static bool canBeGreaterEqual(CheckerContext &C, const Expr *E,
+ unsigned long long Val)
danielmarjamaki added a comment.
Here are some false positives I have marked... let me know if you want more...
I have marked this as a FP:
URL:
ftp://ftp.se.debian.org/debian/pool/main/m/m17n-lib/m17n-lib_1.7.0.orig.tar.gz
File: m17n-lib-1.7.0/src/mtext.c
Line 1946
Code:
int mtext_set_cha
danielmarjamaki updated this revision to Diff 51402.
danielmarjamaki added a comment.
Minor fixes of review comments.
- Improved comments about the checker in the source code.
- Improved capitalization and punctuation in error messages.
- Renamed "canBe..." functions and changed their return type
danielmarjamaki marked 3 inline comments as done.
Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:12
@@ +11,3 @@
+//
+// ConversionChecker generates a subset of the warnings that are reported by
+// Wconversion. It is designed to be an alternative to Wconversion.
---
danielmarjamaki updated this revision to Diff 43997.
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
Refactorings thanks to review comments
http://reviews.llvm.org/D13126
Files:
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/Checker
danielmarjamaki added a comment.
I like the standalone bear tool. should it really be embedded into clang? Will
the standalone tool still be maintained?
Comment at: tools/scan-build-py/libear/ear.c:1
@@ +1,2 @@
+/* -*- coding: utf-8 -*-
+// The LLVM Compiler
danielmarjamaki created this revision.
danielmarjamaki added a subscriber: cfe-commits.
Use getCharWidth() instead of magic number to handle arbitrary char widths.
no change in logical behaviour is intended when getCharWidth() is 8.
http://reviews.llvm.org/D16309
Files:
lib/Frontend/InitPrep
danielmarjamaki added a subscriber: rsmith.
danielmarjamaki added a comment.
ping.. can somebody review.
http://reviews.llvm.org/D11035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
danielmarjamaki created this revision.
danielmarjamaki added subscribers: cfe-commits, alexfh.
This is a new checker for clang-tidy.
This checker will warn when there is a explicit redundant cast of a calculation
result to a bigger type. If the intention of the cast is to avoid loss of
precision
danielmarjamaki added a comment.
In http://reviews.llvm.org/D16310#330367, @LegalizeAdulthood wrote:
> Why not supply a fixit that removes the cast?
I am skeptic. There are different valid fixes.
Example code:
l = (long)(a*1000);
Fix1:
l = ((long)a * 1000);
Fix2:
l = (a * (long)1000
danielmarjamaki removed rL LLVM as the repository for this revision.
danielmarjamaki updated this revision to Diff 45378.
danielmarjamaki added a comment.
Fixed review comment; s/checker/check/
http://reviews.llvm.org/D16310
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/LongCastChec
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
http://reviews.llvm.org/D16310
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
In http://reviews.llvm.org/D16310#330312, @Eugene.Zelenko wrote:
> Clang-tidy has 6 cast related checks. May be this is good time to introduce
> dedicated category for them?
I am not against this.
I don't know which ones you are thinking about.. but if a check
danielmarjamaki marked 7 inline comments as done.
danielmarjamaki added a comment.
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 marked an inline comment as done.
danielmarjamaki added a comment.
http://reviews.llvm.org/D11035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
In http://reviews.llvm.org/D16310#331538, @LegalizeAdulthood wrote:
> If you state what the check does, then
>
> In http://reviews.llvm.org/D16310#331054, @danielmarjamaki wrote:
>
> > In http://reviews.llvm.org/D16310#330367, @LegalizeAdulthood wrote:
> >
> > > W
danielmarjamaki marked an inline comment as done.
Comment at: clang-tidy/misc/LongCastCheck.cpp:43
@@ +42,3 @@
+
+static unsigned getMaxCalculationWidth(ASTContext &C, const Expr *E) {
+ E = E->IgnoreParenImpCasts();
LegalizeAdulthood wrote:
> Prefer anonymous na
danielmarjamaki marked an inline comment as done.
Comment at: clang-tidy/misc/LongCastCheck.cpp:21
@@ +20,3 @@
+ Finder->addMatcher(
+ returnStmt(
+ has(cStyleCastExpr(has(binaryOperator(anyOf(hasOperatorName("+"),
alexfh wrote:
> Any reason to limi
danielmarjamaki added a comment.
In http://reviews.llvm.org/D16310#331538, @LegalizeAdulthood wrote:
> If you state what the check does, then
>
> In http://reviews.llvm.org/D16310#331054, @danielmarjamaki wrote:
>
> > In http://reviews.llvm.org/D16310#330367, @LegalizeAdulthood wrote:
> >
> > > W
danielmarjamaki marked 3 inline comments as done.
Comment at: docs/clang-tidy/checks/misc-long-cast.rst:11
@@ +10,3 @@
+
+Example code::
+
alexfh wrote:
> LegalizeAdulthood wrote:
> > Please add an example for another type other than `long`, such as casting a
> >
danielmarjamaki added inline comments.
Comment at: clang-tidy/misc/LongCastCheck.cpp:97
@@ +96,3 @@
+
+ if (!CastType->isIntegerType() || !SubType->isIntegerType())
+return;
LegalizeAdulthood wrote:
> danielmarjamaki wrote:
> > LegalizeAdulthood wrote:
> > >
danielmarjamaki marked 5 inline comments as done.
danielmarjamaki added a comment.
http://reviews.llvm.org/D16310
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki removed rL LLVM as the repository for this revision.
danielmarjamaki updated this revision to Diff 45854.
danielmarjamaki added a comment.
Fixed review comments
http://reviews.llvm.org/D16310
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-ti
danielmarjamaki closed this revision.
danielmarjamaki added a comment.
Thanks! Committed with r258673
http://reviews.llvm.org/D11035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki marked 13 inline comments as done.
danielmarjamaki added a comment.
http://reviews.llvm.org/D16310
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki added a comment.
For information I have now tested latest patch.
Statistics:
projects: 1804
files:85976
warnings: 100
There were some new interesting warnings and imho they were TP.
http://reviews.llvm.org/D16310
___
cfe-commit
danielmarjamaki updated this revision to Diff 45972.
danielmarjamaki marked 2 inline comments as done.
danielmarjamaki added a comment.
fixed review comments, readded 'loss of sign' checking
http://reviews.llvm.org/D13126
Files:
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/
danielmarjamaki marked 2 inline comments as done.
danielmarjamaki added a comment.
For information, I am testing this patch right now.. it will take a while 1-2
days.
http://reviews.llvm.org/D13126
___
cfe-commits mailing list
cfe-commits@lists.llv
danielmarjamaki created this revision.
danielmarjamaki added a subscriber: cfe-commits.
danielmarjamaki set the repository for this revision to rL LLVM.
This little patch fixes possible array index out of bounds:
[tools/clang/lib/Driver/MSVCToolChain.cpp:147]: (error) Array 'partialKey[256]'
acc
danielmarjamaki added reviewers: rnk, hans, chandlerc, majnemer.
danielmarjamaki added a comment.
adding reviewers according to 'svn blame' and CODE_OWNERS.txt
Repository:
rL LLVM
http://reviews.llvm.org/D16582
___
cfe-commits mailing list
cfe-co
This revision was automatically updated to reflect the committed changes.
Closed by commit rL258911: Fix array index out of bounds (authored by
danielmarjamaki).
Changed prior to commit:
http://reviews.llvm.org/D16582?vs=45991&id=46102#toc
Repository:
rL LLVM
http://reviews.llvm.org/D16582
danielmarjamaki updated this revision to Diff 46235.
danielmarjamaki added a comment.
Refactoring the AST matching
http://reviews.llvm.org/D16310
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/MisplacedWideningCastCheck.cpp
clang-tidy/misc/Mispl
danielmarjamaki added a comment.
In http://reviews.llvm.org/D16310#337563, @LegalizeAdulthood wrote:
> In http://reviews.llvm.org/D16310#335844, @danielmarjamaki wrote:
>
> > There were some new interesting warnings and imho they were TP.
>
>
> TP?
Sorry.. True Positive
Comme
101 - 200 of 222 matches
Mail list logo