r315462 - [Analyzer] Clarify error messages for undefined result

2017-10-11 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Oct 11 07:49:35 2017 New Revision: 315462 URL: http://llvm.org/viewvc/llvm-project?rev=315462=rev Log: [Analyzer] Clarify error messages for undefined result Differential Revision: https://reviews.llvm.org/D30295 Modified:

[clang-tools-extra] r311984 - [clang-tidy] Fix 'misc-misplaced-widening-cast' assertion error.

2017-08-29 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Aug 28 23:25:24 2017 New Revision: 311984 URL: http://llvm.org/viewvc/llvm-project?rev=311984=rev Log: [clang-tidy] Fix 'misc-misplaced-widening-cast' assertion error. Reviewers: alexfh, xazax.hun, danielmarjamaki Differential Revision:

r309799 - [StaticAnalyzer] Fix false positives for unreachable code in macros.

2017-08-02 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Aug 2 01:26:56 2017 New Revision: 309799 URL: http://llvm.org/viewvc/llvm-project?rev=309799=rev Log: [StaticAnalyzer] Fix false positives for unreachable code in macros. Example: #define MACRO(C) if (C) { static int x; .. } void foo() { MACRO(0); }

r305669 - [analyzer] Fix logical not for pointers with different bit width

2017-06-19 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Jun 19 03:55:51 2017 New Revision: 305669 URL: http://llvm.org/viewvc/llvm-project?rev=305669=rev Log: [analyzer] Fix logical not for pointers with different bit width Differential Revision: https://reviews.llvm.org/D31029 Modified:

r301913 - [analyzer] Detect bad free of function pointers

2017-05-02 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue May 2 06:46:12 2017 New Revision: 301913 URL: http://llvm.org/viewvc/llvm-project?rev=301913=rev Log: [analyzer] Detect bad free of function pointers Differential Revision: https://reviews.llvm.org/D31650 Modified:

r299523 - [analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16; ' expression, that is not unsafe

2017-04-05 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Apr 5 03:57:04 2017 New Revision: 299523 URL: http://llvm.org/viewvc/llvm-project?rev=299523=rev Log: [analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe Summary: The alpha.core.Conversion was too strict about

r297283 - [analyzer] Clarify 'uninitialized function argument' messages

2017-03-08 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Mar 8 09:22:24 2017 New Revision: 297283 URL: http://llvm.org/viewvc/llvm-project?rev=297283=rev Log: [analyzer] Clarify 'uninitialized function argument' messages Differential Revision: https://reviews.llvm.org/D30341 Modified:

r297187 - [analyzer] Fix crashes in CastToStruct checker for undefined structs

2017-03-07 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Mar 7 13:20:48 2017 New Revision: 297187 URL: http://llvm.org/viewvc/llvm-project?rev=297187=rev Log: [analyzer] Fix crashes in CastToStruct checker for undefined structs This crash was reported in https://bugs.llvm.org//show_bug.cgi?id=31173 Differential

r296477 - [Sema] Detect more array index out of bounds when C++ overloaded operators are used

2017-02-28 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Feb 28 08:53:50 2017 New Revision: 296477 URL: http://llvm.org/viewvc/llvm-project?rev=296477=rev Log: [Sema] Detect more array index out of bounds when C++ overloaded operators are used Differential Revision: https://reviews.llvm.org/D30192 Modified:

r296326 - [analyzer] clarify 'result is garbage value' when it is out of bounds

2017-02-27 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Feb 27 04:44:24 2017 New Revision: 296326 URL: http://llvm.org/viewvc/llvm-project?rev=296326=rev Log: [analyzer] clarify 'result is garbage value' when it is out of bounds Differential Revision: https://reviews.llvm.org/D28278 Modified:

[clang-tools-extra] r296100 - [clang-tidy] Fix readability-redundant-declaration false positive

2017-02-24 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Fri Feb 24 03:02:44 2017 New Revision: 296100 URL: http://llvm.org/viewvc/llvm-project?rev=296100=rev Log: [clang-tidy] Fix readability-redundant-declaration false positive Differential Revision: https://reviews.llvm.org/D27048 Modified:

r295548 - [analyzer] Revert 295545. There are buildbot failures.

2017-02-18 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Sat Feb 18 10:31:35 2017 New Revision: 295548 URL: http://llvm.org/viewvc/llvm-project?rev=295548=rev Log: [analyzer] Revert 295545. There are buildbot failures. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp

r295545 - [analyzer] Fix crash in CastToStruct when there is no record definition

2017-02-18 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Sat Feb 18 05:18:57 2017 New Revision: 295545 URL: http://llvm.org/viewvc/llvm-project?rev=295545=rev Log: [analyzer] Fix crash in CastToStruct when there is no record definition This crash was reported in https://bugs.llvm.org//show_bug.cgi?id=31173 Differential

[clang-tools-extra] r287550 - clang-tidy: improve my test for readability-redundant-declaration

2016-11-21 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Nov 21 10:08:17 2016 New Revision: 287550 URL: http://llvm.org/viewvc/llvm-project?rev=287550=rev Log: clang-tidy: improve my test for readability-redundant-declaration Modified: clang-tools-extra/trunk/test/clang-tidy/readability-redundant-declaration.cpp

[clang-tools-extra] r287546 - clang-tidy: Attempt to fix build bot failure with mismatching size_t platform type.

2016-11-21 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Nov 21 09:46:40 2016 New Revision: 287546 URL: http://llvm.org/viewvc/llvm-project?rev=287546=rev Log: clang-tidy: Attempt to fix build bot failure with mismatching size_t platform type. Modified:

[clang-tools-extra] r287540 - readability-redundant-declaration: Fix crash

2016-11-21 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Nov 21 08:29:53 2016 New Revision: 287540 URL: http://llvm.org/viewvc/llvm-project?rev=287540=rev Log: readability-redundant-declaration: Fix crash Differential Revision: https://reviews.llvm.org/D26911 Modified:

[clang-tools-extra] r285689 - [clang-tidy] Add check readability-redundant-declaration

2016-11-01 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Nov 1 08:26:15 2016 New Revision: 285689 URL: http://llvm.org/viewvc/llvm-project?rev=285689=rev Log: [clang-tidy] Add check readability-redundant-declaration Finds redundant variable and function declarations. extern int X; extern int X; // <- redundant

r284477 - alpha.core.UnreachableCode - don't warn about unreachable code inside macro

2016-10-18 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Oct 18 08:16:53 2016 New Revision: 284477 URL: http://llvm.org/viewvc/llvm-project?rev=284477=rev Log: alpha.core.UnreachableCode - don't warn about unreachable code inside macro In macros, 'do {...} while (0)' is often used. Don't warn about the condition 0

r283725 - Fix style issue. Spaces in argument list.

2016-10-10 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Oct 10 02:39:39 2016 New Revision: 283725 URL: http://llvm.org/viewvc/llvm-project?rev=283725=rev Log: Fix style issue. Spaces in argument list. Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h Modified:

r283554 - [analyzer] Don't merge different return nodes in ExplodedGraph

2016-10-07 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Fri Oct 7 09:21:08 2016 New Revision: 283554 URL: http://llvm.org/viewvc/llvm-project?rev=283554=rev Log: [analyzer] Don't merge different return nodes in ExplodedGraph Returns when calling an inline function should not be merged in the ExplodedGraph unless they

r283096 - [StaticAnalyser] Add test case to ensure that unreachable code is found.

2016-10-03 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Oct 3 04:45:35 2016 New Revision: 283096 URL: http://llvm.org/viewvc/llvm-project?rev=283096=rev Log: [StaticAnalyser] Add test case to ensure that unreachable code is found. https://reviews.llvm.org/D24905 Modified:

r283095 - [StaticAnalyzer] Fix UnreachableCode false positives.

2016-10-03 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Oct 3 03:28:51 2016 New Revision: 283095 URL: http://llvm.org/viewvc/llvm-project?rev=283095=rev Log: [StaticAnalyzer] Fix UnreachableCode false positives. When there is 'do { } while (0);' in the code the ExplodedGraph and UnoptimizedCFG did not match.

r282574 - [StaticAnalyzer] Fix false positives for vardecls that are technically unreachable but they are needed.

2016-09-28 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Sep 28 05:39:53 2016 New Revision: 282574 URL: http://llvm.org/viewvc/llvm-project?rev=282574=rev Log: [StaticAnalyzer] Fix false positives for vardecls that are technically unreachable but they are needed. Example: switch (x) { int a; // <- This is

r282411 - [analyzer] Improve CastToStruct checker so it can also detect widening casts of struct data

2016-09-26 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Sep 26 10:17:18 2016 New Revision: 282411 URL: http://llvm.org/viewvc/llvm-project?rev=282411=rev Log: [analyzer] Improve CastToStruct checker so it can also detect widening casts of struct data Example: struct AB { int A; int B; }; struct ABC { int A;

r282242 - Minor tweak. Avoid hardcoding.

2016-09-23 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Fri Sep 23 07:23:44 2016 New Revision: 282242 URL: http://llvm.org/viewvc/llvm-project?rev=282242=rev Log: Minor tweak. Avoid hardcoding. Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp URL:

r282233 - Fix indentation

2016-09-23 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Fri Sep 23 03:27:24 2016 New Revision: 282233 URL: http://llvm.org/viewvc/llvm-project?rev=282233=rev Log: Fix indentation Modified: cfe/trunk/test/Sema/constant-conversion.c Modified: cfe/trunk/test/Sema/constant-conversion.c URL:

r282156 - Fix Wbitfield-constant-conversion false positives

2016-09-22 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Thu Sep 22 09:13:46 2016 New Revision: 282156 URL: http://llvm.org/viewvc/llvm-project?rev=282156=rev Log: Fix Wbitfield-constant-conversion false positives Summary: The diagnostic did not handle ~ well. An expression such as ~0 is often used when 'all ones' is

[clang-tools-extra] r281206 - [clang-tidy] readability-misplaced-array-index: add new check that warns when array index is misplaced.

2016-09-12 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Sep 12 07:04:13 2016 New Revision: 281206 URL: http://llvm.org/viewvc/llvm-project?rev=281206=rev Log: [clang-tidy] readability-misplaced-array-index: add new check that warns when array index is misplaced. Reviewers: alexfh Differential Revision:

[clang-tools-extra] r279507 - [clang-tidy] readability-non-const-parameter: add new check that warns when function parameters should be const

2016-08-23 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Aug 23 05:09:08 2016 New Revision: 279507 URL: http://llvm.org/viewvc/llvm-project?rev=279507=rev Log: [clang-tidy] readability-non-const-parameter: add new check that warns when function parameters should be const The check will warn when the constness will

[clang-tools-extra] r272128 - [clang-tidy] misc-macro-parentheses - avoid adding parentheses in variable declarations

2016-06-08 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Jun 8 05:30:24 2016 New Revision: 272128 URL: http://llvm.org/viewvc/llvm-project?rev=272128=rev Log: [clang-tidy] misc-macro-parentheses - avoid adding parentheses in variable declarations Fixes bugzilla issues 26273 and 27399 Reviewers: alexfh

[clang-tools-extra] r260667 - [clang-tidy] Fix failure in 'misc-misplaced-widening-cast' test.

2016-02-12 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Fri Feb 12 03:38:38 2016 New Revision: 260667 URL: http://llvm.org/viewvc/llvm-project?rev=260667=rev Log: [clang-tidy] Fix failure in 'misc-misplaced-widening-cast' test. I added portability warnings when int results are casted to long. I forgot to handle uint,

[clang-tools-extra] r260665 - [clang-tidy] improve misc-misplaced-widening-cast so it also detects portability problems.

2016-02-11 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Fri Feb 12 01:51:10 2016 New Revision: 260665 URL: http://llvm.org/viewvc/llvm-project?rev=260665=rev Log: [clang-tidy] improve misc-misplaced-widening-cast so it also detects portability problems. Reviewers: alexfh Subscribers: cfe-commits Differential Revision:

[clang-tools-extra] r260223 - [clang-tidy] Add 'misc-misplaced-widening-cast' check.

2016-02-09 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Feb 9 08:08:49 2016 New Revision: 260223 URL: http://llvm.org/viewvc/llvm-project?rev=260223=rev Log: [clang-tidy] Add 'misc-misplaced-widening-cast' check. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16310

[clang-tools-extra] r260225 - [clang-tidy] Add -target in misc-misplaced-widening-cast test so it will work on various bots

2016-02-09 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Feb 9 09:43:05 2016 New Revision: 260225 URL: http://llvm.org/viewvc/llvm-project?rev=260225=rev Log: [clang-tidy] Add -target in misc-misplaced-widening-cast test so it will work on various bots Modified:

r258911 - Fix array index out of bounds

2016-01-26 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Jan 27 01:33:50 2016 New Revision: 258911 URL: http://llvm.org/viewvc/llvm-project?rev=258911=rev Log: Fix array index out of bounds Differential Revision: http://reviews.llvm.org/D16582 Modified: cfe/trunk/lib/Driver/MSVCToolChain.cpp Modified:

r258673 - [Sema] Improve constness

2016-01-25 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Jan 25 03:29:38 2016 New Revision: 258673 URL: http://llvm.org/viewvc/llvm-project?rev=258673=rev Log: [Sema] Improve constness Modified: cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/trunk/lib/Sema/SemaChecking.cpp URL:

[clang-tools-extra] r254066 - [clang-tidy] code cleanup using isAssignmentOp()

2015-11-25 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Nov 25 05:30:00 2015 New Revision: 254066 URL: http://llvm.org/viewvc/llvm-project?rev=254066=rev Log: [clang-tidy] code cleanup using isAssignmentOp() Modified: clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.cpp Modified:

[clang-tools-extra] r252608 - [clang-tidy] misc-macro-parentheses: fix fp when using object member pointers

2015-11-10 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Tue Nov 10 08:32:25 2015 New Revision: 252608 URL: http://llvm.org/viewvc/llvm-project?rev=252608=rev Log: [clang-tidy] misc-macro-parentheses: fix fp when using object member pointers Fixes http://llvm.org/PR25208. Modified:

r244435 - [Static Analyzer] Warn when inner and outer conditions are identical. The inner condition is always true.

2015-08-10 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Mon Aug 10 02:18:29 2015 New Revision: 244435 URL: http://llvm.org/viewvc/llvm-project?rev=244435view=rev Log: [Static Analyzer] Warn when inner and outer conditions are identical. The inner condition is always true. Reviewed in http://reviews.llvm.org/D10892.