r372462 - Attempt to fix a windows buildbot failure

2019-09-21 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Sep 21 00:56:40 2019 New Revision: 372462 URL: http://llvm.org/viewvc/llvm-project?rev=372462&view=rev Log: Attempt to fix a windows buildbot failure Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/

r372419 - Fix a documentation error

2019-09-20 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Sep 20 11:28:04 2019 New Revision: 372419 URL: http://llvm.org/viewvc/llvm-project?rev=372419&view=rev Log: Fix a documentation error Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cp

r372414 - Reland '[analyzer][MallocChecker][NFC] Document and reorganize some functions'

2019-09-20 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Sep 20 10:59:20 2019 New Revision: 372414 URL: http://llvm.org/viewvc/llvm-project?rev=372414&view=rev Log: Reland '[analyzer][MallocChecker][NFC] Document and reorganize some functions' Differential Revision: https://reviews.llvm.org/D54823 Modified: cfe/trunk/li

r372269 - [analyzer] PR43102: Fix an assertion and an out-of-bounds error for diagnostic location construction

2019-09-18 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Sep 18 15:24:26 2019 New Revision: 372269 URL: http://llvm.org/viewvc/llvm-project?rev=372269&view=rev Log: [analyzer] PR43102: Fix an assertion and an out-of-bounds error for diagnostic location construction Summary: https://bugs.llvm.org/show_bug.cgi?id=43102 In to

r371765 - [CFG] Add dumps for CFGElement and CFGElementRef

2019-09-12 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Sep 12 12:52:34 2019 New Revision: 371765 URL: http://llvm.org/viewvc/llvm-project?rev=371765&view=rev Log: [CFG] Add dumps for CFGElement and CFGElementRef Seems like we never had these, so here we go! I also did some refactoring as I was chasing a bug unrelated to th

r371760 - [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-12 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Sep 12 12:09:24 2019 New Revision: 371760 URL: http://llvm.org/viewvc/llvm-project?rev=371760&view=rev Log: [analyzer][NFC] Fix inconsistent references to checkers as "checks" Traditionally, clang-tidy uses the term check, and the analyzer uses checker, but in the very

r371756 - [analyzer] Don't run the analyzer for -analyzer-list-enabled-checkers

2019-09-12 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Sep 12 11:53:48 2019 New Revision: 371756 URL: http://llvm.org/viewvc/llvm-project?rev=371756&view=rev Log: [analyzer] Don't run the analyzer for -analyzer-list-enabled-checkers Short and sweet. Whenever I use -analyzer-list-enabled-checkers, I'm only interested about

r370798 - [analyzer] NonNullParamChecker and CStringChecker parameter number in checker message

2019-09-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Sep 3 10:57:01 2019 New Revision: 370798 URL: http://llvm.org/viewvc/llvm-project?rev=370798&view=rev Log: [analyzer] NonNullParamChecker and CStringChecker parameter number in checker message There are some functions which can't be given a null pointer as parameter

r370767 - [analyzer] Add a checker option to detect nested dead stores

2019-09-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Sep 3 08:22:43 2019 New Revision: 370767 URL: http://llvm.org/viewvc/llvm-project?rev=370767&view=rev Log: [analyzer] Add a checker option to detect nested dead stores Enables the users to specify an optional flag which would warn for more dead stores. Previously it i

[clang-tools-extra] r369763 - [clang-tidy] Possibility of displaying duplicate warnings

2019-08-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Aug 23 07:57:27 2019 New Revision: 369763 URL: http://llvm.org/viewvc/llvm-project?rev=369763&view=rev Log: [clang-tidy] Possibility of displaying duplicate warnings Summary: In case a checker is registered multiple times as an alias, the emitted warnings are uniqued

r369760 - [analyzer] Avoid unnecessary enum range check on LValueToRValue casts

2019-08-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Aug 23 07:21:13 2019 New Revision: 369760 URL: http://llvm.org/viewvc/llvm-project?rev=369760&view=rev Log: [analyzer] Avoid unnecessary enum range check on LValueToRValue casts Summary: EnumCastOutOfRangeChecker should not perform enum range checks on LValueToRValue

r369616 - [analyzer] Enable control dependency condition tracking by default

2019-08-21 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 21 20:08:48 2019 New Revision: 369616 URL: http://llvm.org/viewvc/llvm-project?rev=369616&view=rev Log: [analyzer] Enable control dependency condition tracking by default This patch concludes my GSoC'19 project by enabling track-conditions by default. Differential

r369613 - [analyzer] Don't track the condition of foreach loops

2019-08-21 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 21 19:44:19 2019 New Revision: 369613 URL: http://llvm.org/viewvc/llvm-project?rev=369613&view=rev Log: [analyzer] Don't track the condition of foreach loops As discussed on the mailing list, notes originating from the tracking of foreach loop conditions are always

r369596 - [analyzer] Mention whether an event is about a condition in a bug report part 2

2019-08-21 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 21 15:38:00 2019 New Revision: 369596 URL: http://llvm.org/viewvc/llvm-project?rev=369596&view=rev Log: [analyzer] Mention whether an event is about a condition in a bug report part 2 In D65724, I do a pretty thorough explanation about how I'm solving this problem,

r369589 - [analyzer] Don't make ConditionBRVisitor events prunable when the condition is an interesting field

2019-08-21 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 21 14:59:22 2019 New Revision: 369589 URL: http://llvm.org/viewvc/llvm-project?rev=369589&view=rev Log: [analyzer] Don't make ConditionBRVisitor events prunable when the condition is an interesting field Exactly what it says on the tin! Note that we're talking abo

r369583 - [analyzer][NFC] Add different interestingness kinds

2019-08-21 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 21 14:33:25 2019 New Revision: 369583 URL: http://llvm.org/viewvc/llvm-project?rev=369583&view=rev Log: [analyzer][NFC] Add different interestingness kinds We defined (on the mailing list and here on phabricator) 2 different cases where retrieving information about

r369574 - [analyzer] Mention whether an event is about a condition in a bug report part 1

2019-08-21 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 21 13:43:27 2019 New Revision: 369574 URL: http://llvm.org/viewvc/llvm-project?rev=369574&view=rev Log: [analyzer] Mention whether an event is about a condition in a bug report part 1 Can't add much more to the title! This is part 1, the case where the collapse poi

r369195 - [analyzer] Turn an assert into an if condition

2019-08-17 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Aug 17 09:49:54 2019 New Revision: 369195 URL: http://llvm.org/viewvc/llvm-project?rev=369195&view=rev Log: [analyzer] Turn an assert into an if condition Shocker, turns out that terminator conditions that are binary operators aren't always logical operators. Modified

r368980 - [analyzer] Warn about -analyzer-configs being meant for development purposes only

2019-08-15 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Aug 15 01:53:16 2019 New Revision: 368980 URL: http://llvm.org/viewvc/llvm-project?rev=368980&view=rev Log: [analyzer] Warn about -analyzer-configs being meant for development purposes only This is more of a temporary fix, long term, we should convert AnalyzerOptions

r368979 - [analyzer] Add docs for cplusplus.InnerPointer

2019-08-15 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Aug 15 01:52:10 2019 New Revision: 368979 URL: http://llvm.org/viewvc/llvm-project?rev=368979&view=rev Log: [analyzer] Add docs for cplusplus.InnerPointer Differential Revision: https://reviews.llvm.org/D60281 Modified: cfe/trunk/docs/analyzer/checkers.rst Modifi

r368883 - [CFG] Introduce CFGElementRef, a wrapper that knows it's position in a CFGBlock

2019-08-14 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 14 10:05:55 2019 New Revision: 368883 URL: http://llvm.org/viewvc/llvm-project?rev=368883&view=rev Log: [CFG] Introduce CFGElementRef, a wrapper that knows it's position in a CFGBlock Previously, collecting CFGElements in a set was practially impossible, because bo

r368853 - [analyzer][NFC] Prove that we only track the evaluated part of the condition

2019-08-14 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 14 06:51:52 2019 New Revision: 368853 URL: http://llvm.org/viewvc/llvm-project?rev=368853&view=rev Log: [analyzer][NFC] Prove that we only track the evaluated part of the condition ...because we're working with a BugReporterVisitor, and the non-evaluated part of th

r368836 - [analyzer][CFG] Don't track the condition of asserts

2019-08-14 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 14 05:20:08 2019 New Revision: 368836 URL: http://llvm.org/viewvc/llvm-project?rev=368836&view=rev Log: [analyzer][CFG] Don't track the condition of asserts Well, what is says on the tin I guess! Some more changes: * Move isInevitablySinking() from BugReporter.cp

r368817 - [analyzer] Note last writes to a condition only in a nested stackframe

2019-08-14 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Aug 14 02:39:38 2019 New Revision: 368817 URL: http://llvm.org/viewvc/llvm-project?rev=368817&view=rev Log: [analyzer] Note last writes to a condition only in a nested stackframe Exactly what it says on the tin! The comments in the code detail this a little more too.

r368777 - [analyzer][NFC] Prepare visitors for different tracking kinds

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 17:48:57 2019 New Revision: 368777 URL: http://llvm.org/viewvc/llvm-project?rev=368777&view=rev Log: [analyzer][NFC] Prepare visitors for different tracking kinds When we're tracking a variable that is responsible for a null pointer dereference or some other sin

r368773 - [analyzer] Track the right hand side of the last store regardless of its value

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 16:48:10 2019 New Revision: 368773 URL: http://llvm.org/viewvc/llvm-project?rev=368773&view=rev Log: [analyzer] Track the right hand side of the last store regardless of its value Summary: The following code snippet taken from D64271#1572188 has an issue: namely

r368771 - [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 16:22:33 2019 New Revision: 368771 URL: http://llvm.org/viewvc/llvm-project?rev=368771&view=rev Log: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value During the evaluation of D62883, I noticed a bunch of totally mean

r368755 - [analyzer][NFC] Make sure that the BugReport is not modified during the construction of non-visitor pieces

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 15:03:08 2019 New Revision: 368755 URL: http://llvm.org/viewvc/llvm-project?rev=368755&view=rev Log: [analyzer][NFC] Make sure that the BugReport is not modified during the construction of non-visitor pieces I feel this is kinda important, because in a followup

r368752 - [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of interestingness propagation

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 14:48:17 2019 New Revision: 368752 URL: http://llvm.org/viewvc/llvm-project?rev=368752&view=rev Log: [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of interestingness propagation Apparently this does literally nothing. When you think about

r368745 - [analyzer][NFC] Address inlines of D65484

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 13:42:48 2019 New Revision: 368745 URL: http://llvm.org/viewvc/llvm-project?rev=368745&view=rev Log: [analyzer][NFC] Address inlines of D65484 Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporte

r368737 - [analyzer][NFC] Refactoring BugReporter.cpp P5.: Compact mile long function invocations into objects

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 12:01:33 2019 New Revision: 368737 URL: http://llvm.org/viewvc/llvm-project?rev=368737&view=rev Log: [analyzer][NFC] Refactoring BugReporter.cpp P5.: Compact mile long function invocations into objects In D65379, I briefly described the construction of bug path

r368735 - [analyzer][NFC] Refactoring BugReporter.cpp P4.: If it can be const, make it const

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 11:48:08 2019 New Revision: 368735 URL: http://llvm.org/viewvc/llvm-project?rev=368735&view=rev Log: [analyzer][NFC] Refactoring BugReporter.cpp P4.: If it can be const, make it const When I'm new to a file/codebase, I personally find C++'s strong static type s

r368717 - [analyzer][NFC] Refactoring BugReporter.cpp P3.: std::shared_pointer -> PathDiagnosticPieceRef

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 09:45:48 2019 New Revision: 368717 URL: http://llvm.org/viewvc/llvm-project?rev=368717&view=rev Log: [analyzer][NFC] Refactoring BugReporter.cpp P3.: std::shared_pointer -> PathDiagnosticPieceRef find clang/ -type f -exec sed -i 's/std::shared_ptr/PathDiagnost

r368694 - [analyzer][NFC] Refactoring BugReporter.cpp P2.: Clean up the construction of bug paths and finding a valid report

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 06:56:12 2019 New Revision: 368694 URL: http://llvm.org/viewvc/llvm-project?rev=368694&view=rev Log: [analyzer][NFC] Refactoring BugReporter.cpp P2.: Clean up the construction of bug paths and finding a valid report This patch refactors the utility functions an

r368689 - [analyzer][NFC] Refactoring BugReporter.cpp P1.: Store interesting symbols/regions in a simple set

2019-08-13 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Aug 13 06:09:48 2019 New Revision: 368689 URL: http://llvm.org/viewvc/llvm-project?rev=368689&view=rev Log: [analyzer][NFC] Refactoring BugReporter.cpp P1.: Store interesting symbols/regions in a simple set The goal of this refactoring effort was to better understand

r365209 - Removed the test case added in D63538 due to windows buildbot failures

2019-07-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Jul 5 07:22:10 2019 New Revision: 365209 URL: http://llvm.org/viewvc/llvm-project?rev=365209&view=rev Log: Removed the test case added in D63538 due to windows buildbot failures Modified: cfe/trunk/unittests/Analysis/CFGTest.cpp Modified: cfe/trunk/unittests/Anal

r365208 - [analyzer] Add a debug analyzer config to place an event for each tracked condition

2019-07-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Jul 5 07:00:08 2019 New Revision: 365208 URL: http://llvm.org/viewvc/llvm-project?rev=365208&view=rev Log: [analyzer] Add a debug analyzer config to place an event for each tracked condition Differential Revision: https://reviews.llvm.org/D63642 Modified: cfe/tr

r365207 - [analyzer] Track terminator conditions on which a tracked expression depends

2019-07-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Jul 5 06:29:54 2019 New Revision: 365207 URL: http://llvm.org/viewvc/llvm-project?rev=365207&view=rev Log: [analyzer] Track terminator conditions on which a tracked expression depends This patch is a major part of my GSoC project, aimed to improve the bug reports of t

r365197 - [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Jul 5 05:17:44 2019 New Revision: 365197 URL: http://llvm.org/viewvc/llvm-project?rev=365197&view=rev Log: [analyzer][IDF] Add a control dependency calculator + a new debug checker I intend to improve the analyzer's bug reports by tracking condition expressions. 01 b

r365181 - Fix a buildbot failure due to the AST's lifetime ending before the test

2019-07-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Jul 5 04:14:57 2019 New Revision: 365181 URL: http://llvm.org/viewvc/llvm-project?rev=365181&view=rev Log: Fix a buildbot failure due to the AST's lifetime ending before the test Modified: cfe/trunk/unittests/Analysis/CFGTest.cpp Modified: cfe/trunk/unittests/Ana

r365179 - [analyzer][Dominators][NFC] Add unit tests

2019-07-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Jul 5 03:16:36 2019 New Revision: 365179 URL: http://llvm.org/viewvc/llvm-project?rev=365179&view=rev Log: [analyzer][Dominators][NFC] Add unit tests Differential Revision: https://reviews.llvm.org/D62611 Added: cfe/trunk/unittests/Analysis/CFGBuildResult.h c

r365177 - [CFG] Add a new function to get the proper condition of a CFGBlock

2019-07-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Jul 5 02:52:00 2019 New Revision: 365177 URL: http://llvm.org/viewvc/llvm-project?rev=365177&view=rev Log: [CFG] Add a new function to get the proper condition of a CFGBlock getTerminatorCondition() returned a condition that may be outside of the block, while the new

r365037 - Revert "[analyzer][CFG] Return the correct terminator condition"

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 06:03:33 2019 New Revision: 365037 URL: http://llvm.org/viewvc/llvm-project?rev=365037&view=rev Log: Revert "[analyzer][CFG] Return the correct terminator condition" This reverts commit 7a57118a6fcfa3770f984453543bbdfd0b233e84. Causes a bunch of crashes, I need

r365036 - [analyzer][CFG] Return the correct terminator condition

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 05:53:19 2019 New Revision: 365036 URL: http://llvm.org/viewvc/llvm-project?rev=365036&view=rev Log: [analyzer][CFG] Return the correct terminator condition For the following terminator statement: if (A && B && C && D) The built CFG is the following: [B5 (ENTR

r365030 - Make a buildbot using a buggy gcc happy

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 05:06:10 2019 New Revision: 365030 URL: http://llvm.org/viewvc/llvm-project?rev=365030&view=rev Log: Make a buildbot using a buggy gcc happy When specializing a template in a namespace, it has to be in a namespace block, else gcc will get confused. Hopefully thi

r365029 - Specialize an anchor() function in the correct namespace

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 04:54:47 2019 New Revision: 365029 URL: http://llvm.org/viewvc/llvm-project?rev=365029&view=rev Log: Specialize an anchor() function in the correct namespace Modified: cfe/trunk/lib/Analysis/Dominators.cpp Modified: cfe/trunk/lib/Analysis/Dominators.cpp URL

r365028 - [analyzer][Dominator] Add post dominators to CFG + a new debug checker

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 04:39:12 2019 New Revision: 365028 URL: http://llvm.org/viewvc/llvm-project?rev=365028&view=rev Log: [analyzer][Dominator] Add post dominators to CFG + a new debug checker Transform clang::DominatorTree to be able to also calculate post dominators. * Tidy up th

r365026 - [Dominators] PR42041: Skip nullpointer successors

2019-07-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jul 3 04:14:42 2019 New Revision: 365026 URL: http://llvm.org/viewvc/llvm-project?rev=365026&view=rev Log: [Dominators] PR42041: Skip nullpointer successors https://bugs.llvm.org/show_bug.cgi?id=42041 In Clang's CFG, we use nullpointers to represent unreachable nodes

r363512 - [analyzer] Push correct version of 'Track indices of arrays'

2019-06-16 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sun Jun 16 08:41:25 2019 New Revision: 363512 URL: http://llvm.org/viewvc/llvm-project?rev=363512&view=rev Log: [analyzer] Push correct version of 'Track indices of arrays' Messed up the commit, oops. Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

r363510 - [analyzer] Track indices of arrays

2019-06-16 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sun Jun 16 07:52:56 2019 New Revision: 363510 URL: http://llvm.org/viewvc/llvm-project?rev=363510&view=rev Log: [analyzer] Track indices of arrays Often times, when an ArraySubscriptExpr was reported as null or undefined, the bug report was difficult to understand, because

r363509 - [analyzer][NFC] Tease apart and clang-format NoStoreFuncVisitor

2019-06-16 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sun Jun 16 07:09:11 2019 New Revision: 363509 URL: http://llvm.org/viewvc/llvm-project?rev=363509&view=rev Log: [analyzer][NFC] Tease apart and clang-format NoStoreFuncVisitor Make several methods static functions Move non-trivial methods out-of-line Add a divider Turn non

r362887 - [analyzer][NFC] Add dividers to BugReporterVisitors.cpp

2019-06-08 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Jun 8 13:25:39 2019 New Revision: 362887 URL: http://llvm.org/viewvc/llvm-project?rev=362887&view=rev Log: [analyzer][NFC] Add dividers to BugReporterVisitors.cpp Some minor formatting to make the file more readable. Added //===--===// around the implementatio

r361566 - [analyzer] List checker/plugin options in 3 categories: released, alpha, developer

2019-05-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu May 23 15:52:09 2019 New Revision: 361566 URL: http://llvm.org/viewvc/llvm-project?rev=361566&view=rev Log: [analyzer] List checker/plugin options in 3 categories: released, alpha, developer Same patch as D62093, but for checker/plugin options, the only difference bei

r361561 - [analyzer] Hide developer-only checker/package options by default

2019-05-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu May 23 15:07:16 2019 New Revision: 361561 URL: http://llvm.org/viewvc/llvm-project?rev=361561&view=rev Log: [analyzer] Hide developer-only checker/package options by default These options are now only visible under -analyzer-checker-option-help-developer. Differential

r361558 - [analyzer] List checkers in 3 categories: released, alpha, developer

2019-05-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu May 23 14:46:51 2019 New Revision: 361558 URL: http://llvm.org/viewvc/llvm-project?rev=361558&view=rev Log: [analyzer] List checkers in 3 categories: released, alpha, developer Previously, the only way to display the list of available checkers was to invoke the analyze

r361552 - [analyzer] Add a new frontend flag to display all checker options

2019-05-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu May 23 13:47:28 2019 New Revision: 361552 URL: http://llvm.org/viewvc/llvm-project?rev=361552&view=rev Log: [analyzer] Add a new frontend flag to display all checker options Add the new frontend flag -analyzer-checker-option-help to display all checker/package options.

r361505 - [analyzer][NFC] Prettify some RUN: lines in test files.

2019-05-23 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu May 23 08:49:04 2019 New Revision: 361505 URL: http://llvm.org/viewvc/llvm-project?rev=361505&view=rev Log: [analyzer][NFC] Prettify some RUN: lines in test files. This is a test commit in disguise. Modified: cfe/trunk/test/Analysis/bsd-string.c cfe/trunk/test

r361099 - [analyzer] PR41753: Include complex integer types in NonLoc::isCompoundType

2019-05-18 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat May 18 05:34:08 2019 New Revision: 361099 URL: http://llvm.org/viewvc/llvm-project?rev=361099&view=rev Log: [analyzer] PR41753: Include complex integer types in NonLoc::isCompoundType https://bugs.llvm.org/show_bug.cgi?id=41753 Differential Revision: https://reviews.l

r361042 - [analyzer] Remove the default value arg from getChecker*Option

2019-05-17 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri May 17 08:52:13 2019 New Revision: 361042 URL: http://llvm.org/viewvc/llvm-project?rev=361042&view=rev Log: [analyzer] Remove the default value arg from getChecker*Option Since D57922, the config table contains every checker option, and it's default value, so having it

Re: r361011 - [analyzer] Validate checker option names and values

2019-05-17 Thread Kristof Umann via cfe-commits
ernal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. From: Kristof Umann via cfe-commits mailto:cfe-commits@lists.llvm.org>> Date: Fri, May 17, 2019 at 5:49 AM To: mailto:cfe-commits@lists.llvm.org>>

Re: r361011 - [analyzer] Validate checker option names and values

2019-05-17 Thread Kristof Umann via cfe-commits
with preprocessed source if appropriate. See for instructions. From: Kristof Umann via cfe-commits mailto:cfe-commits@lists.llvm.org>> Date: Fri, May 17, 2019 at 5:49 AM To: mailto:cfe-commits@lists.llvm.org>> Author: szelethus Date: Fri May 17 02:51:59 2019 New Revision: 361011 URL: http:

r361011 - [analyzer] Validate checker option names and values

2019-05-17 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri May 17 02:51:59 2019 New Revision: 361011 URL: http://llvm.org/viewvc/llvm-project?rev=361011&view=rev Log: [analyzer] Validate checker option names and values Validate whether the option exists, and also whether the supplied value is of the correct type. With this pat

r361006 - [analyzer] Insert checker options into AnalyzerOption::ConfigTable

2019-05-17 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri May 17 02:29:44 2019 New Revision: 361006 URL: http://llvm.org/viewvc/llvm-project?rev=361006&view=rev Log: [analyzer] Insert checker options into AnalyzerOption::ConfigTable The more entries we have in AnalyzerOptions::ConfigTable, the more helpful debug.ConfigDumper

r360910 - [analyzer] Add a test plugin for checker option handling

2019-05-16 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu May 16 08:55:07 2019 New Revision: 360910 URL: http://llvm.org/viewvc/llvm-project?rev=360910&view=rev Log: [analyzer] Add a test plugin for checker option handling Differential Revision: https://reviews.llvm.org/D59465 Added: cfe/trunk/test/Analysis/plugins/Check

r360891 - Reland "[analyzer] Add an example plugin for checker dependency handling"

2019-05-16 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu May 16 06:22:04 2019 New Revision: 360891 URL: http://llvm.org/viewvc/llvm-project?rev=360891&view=rev Log: Reland "[analyzer] Add an example plugin for checker dependency handling" Buildbots complained that they couldn't find the newly added plugins. The solution was

r360805 - Revert "[analyzer] Add a test for plugins using checker dependencies"

2019-05-15 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed May 15 13:19:51 2019 New Revision: 360805 URL: http://llvm.org/viewvc/llvm-project?rev=360805&view=rev Log: Revert "[analyzer] Add a test for plugins using checker dependencies" Buildbots don't seem to find the new plugin. Added: cfe/trunk/examples/analyzer-plugin

r360799 - [analyzer] Add a test for plugins using checker dependencies

2019-05-15 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed May 15 12:47:26 2019 New Revision: 360799 URL: http://llvm.org/viewvc/llvm-project?rev=360799&view=rev Log: [analyzer] Add a test for plugins using checker dependencies Also, I moved the existing analyzer plugin to test/ as well, in order not to give the illusion that

[clang-tools-extra] r360779 - [clang-tidy] new check: bugprone-branch-clone

2019-05-15 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed May 15 08:06:25 2019 New Revision: 360779 URL: http://llvm.org/viewvc/llvm-project?rev=360779&view=rev Log: [clang-tidy] new check: bugprone-branch-clone Implement a check for detecting if/else if/else chains where two or more branches are Type I clones of each other (

r359998 - [analyzer][UninitializedObjectChecker] PR41741: Regard all scalar types as primitive.

2019-05-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sun May 5 12:42:33 2019 New Revision: 359998 URL: http://llvm.org/viewvc/llvm-project?rev=359998&view=rev Log: [analyzer][UninitializedObjectChecker] PR41741: Regard all scalar types as primitive. https://bugs.llvm.org/show_bug.cgi?id=41741 Pretty much the same as D6124

r359727 - [analyzer] Fix buildbot failures caused by a forgotten initialization

2019-05-01 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed May 1 14:09:32 2019 New Revision: 359727 URL: http://llvm.org/viewvc/llvm-project?rev=359727&view=rev Log: [analyzer] Fix buildbot failures caused by a forgotten initialization Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h Modified: cfe/

r359720 - [analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden

2019-05-01 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed May 1 12:56:47 2019 New Revision: 359720 URL: http://llvm.org/viewvc/llvm-project?rev=359720&view=rev Log: [analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden During my work on analyze

r359539 - [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive

2019-04-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Apr 30 01:47:56 2019 New Revision: 359539 URL: http://llvm.org/viewvc/llvm-project?rev=359539&view=rev Log: [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive https://bugs.llvm.org/show_bug.cgi?id=41611 Similarly to D61106, the checker ra

r359230 - [analyzer][UninitializedObjectChecker] PR41590: Regard _Atomic types as primitive

2019-04-25 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Apr 25 13:00:51 2019 New Revision: 359230 URL: http://llvm.org/viewvc/llvm-project?rev=359230&view=rev Log: [analyzer][UninitializedObjectChecker] PR41590: Regard _Atomic types as primitive https://bugs.llvm.org/show_bug.cgi?id=41590 For the following code snippet, U

r358877 - [analyzer][www] Moving MoveChecker out of alpha is no longer an open project.

2019-04-22 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Mon Apr 22 02:20:23 2019 New Revision: 358877 URL: http://llvm.org/viewvc/llvm-project?rev=358877&view=rev Log: [analyzer][www] Moving MoveChecker out of alpha is no longer an open project. Modified: cfe/trunk/www/analyzer/open_projects.html Modified: cfe/trunk/www/an

r358797 - [analyzer] Move UninitializedObjectChecker out of alpha

2019-04-19 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Apr 19 16:33:50 2019 New Revision: 358797 URL: http://llvm.org/viewvc/llvm-project?rev=358797&view=rev Log: [analyzer] Move UninitializedObjectChecker out of alpha Moved UninitializedObjectChecker from the 'alpha.cplusplus' to the 'optin.cplusplus' package. Differenti

r358752 - [analyzer][NFC] Reimplement checker options

2019-04-19 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Apr 19 05:32:10 2019 New Revision: 358752 URL: http://llvm.org/viewvc/llvm-project?rev=358752&view=rev Log: [analyzer][NFC] Reimplement checker options TL;DR: * Add checker and package options to the TableGen files * Added a new class called CmdLineOption, and both Pa

r358750 - [analyzer] Fix an assertion failure if plugins added dependencies

2019-04-19 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Apr 19 04:01:35 2019 New Revision: 358750 URL: http://llvm.org/viewvc/llvm-project?rev=358750&view=rev Log: [analyzer] Fix an assertion failure if plugins added dependencies Ideally, there is no reason behind not being able to depend on checkers that come from a differ

r358694 - [analyzer][NFC] Clang-format CheckerRegistry

2019-04-18 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Apr 18 10:32:51 2019 New Revision: 358694 URL: http://llvm.org/viewvc/llvm-project?rev=358694&view=rev Log: [analyzer][NFC] Clang-format CheckerRegistry Differential Revision: https://reviews.llvm.org/D59458 Modified: cfe/trunk/include/clang/StaticAnalyzer/Fronten

r358695 - [analyzer][NFC] Prefer binary searches in CheckerRegistry

2019-04-18 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Apr 18 10:34:45 2019 New Revision: 358695 URL: http://llvm.org/viewvc/llvm-project?rev=358695&view=rev Log: [analyzer][NFC] Prefer binary searches in CheckerRegistry Differential Revision: https://reviews.llvm.org/D59459 Modified: cfe/trunk/include/clang/StaticAna

r358676 - [analyzer][NFC] Use capital variable names, move methods out-of-line, rename some in CheckerRegistry

2019-04-18 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Apr 18 08:19:16 2019 New Revision: 358676 URL: http://llvm.org/viewvc/llvm-project?rev=358676&view=rev Log: [analyzer][NFC] Use capital variable names, move methods out-of-line, rename some in CheckerRegistry There are barely any lines I haven't changed in these files

r358609 - [analyzer] PR41185: Fix regression where __builtin_* functions weren't recognized

2019-04-17 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Apr 17 12:56:40 2019 New Revision: 358609 URL: http://llvm.org/viewvc/llvm-project?rev=358609&view=rev Log: [analyzer] PR41185: Fix regression where __builtin_* functions weren't recognized For the following code snippet: void builtin_function_call_crash_fixes(char *

r356161 - [analyzer] Fix an assertation failure for invalid sourcelocation, add a new debug checker

2019-03-14 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Mar 14 09:10:29 2019 New Revision: 356161 URL: http://llvm.org/viewvc/llvm-project?rev=356161&view=rev Log: [analyzer] Fix an assertation failure for invalid sourcelocation, add a new debug checker For a rather short code snippet, if debug.ReportStmts (added in this p

r356142 - [analyzer] Fix function macro crash

2019-03-14 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Mar 14 06:38:16 2019 New Revision: 356142 URL: http://llvm.org/viewvc/llvm-project?rev=356142&view=rev Log: [analyzer] Fix function macro crash Re-commit D57893. Differential Revision: https://reviews.llvm.org/D57893 Modified: cfe/trunk/lib/StaticAnalyzer/Core/Pl

r355911 - Revert "[analyzer] Fix function macro crash"

2019-03-12 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Mar 12 04:22:30 2019 New Revision: 355911 URL: http://llvm.org/viewvc/llvm-project?rev=355911&view=rev Log: Revert "[analyzer] Fix function macro crash" Buildbot breaks when LLVm is compiled with memory sanitizer. WARNING: MemorySanitizer: use-of-uninitialized-value

r355903 - [analyzer] Fix function macro crash

2019-03-12 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Mar 12 03:03:32 2019 New Revision: 355903 URL: http://llvm.org/viewvc/llvm-project?rev=355903&view=rev Log: [analyzer] Fix function macro crash When there is a functor-like macro which is passed as parameter to another "function" macro then its parameters are not liste

r355705 - [analyzer] Fix infinite recursion in printing macros

2019-03-08 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Mar 8 08:26:29 2019 New Revision: 355705 URL: http://llvm.org/viewvc/llvm-project?rev=355705&view=rev Log: [analyzer] Fix infinite recursion in printing macros In the commited testfile, macro expansion (the one implemented for the plist output) runs into an infinite r

r355704 - [analyzer] Emit an error rather than assert on invalid checker option input

2019-03-08 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Mar 8 08:00:42 2019 New Revision: 355704 URL: http://llvm.org/viewvc/llvm-project?rev=355704&view=rev Log: [analyzer] Emit an error rather than assert on invalid checker option input Asserting on invalid input isn't very nice, hence the patch to emit an error instead.

r355703 - [analyzer] Use the new infrastructure of expressing taint propagation, NFC

2019-03-08 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Mar 8 07:47:56 2019 New Revision: 355703 URL: http://llvm.org/viewvc/llvm-project?rev=355703&view=rev Log: [analyzer] Use the new infrastructure of expressing taint propagation, NFC In D55734, we implemented a far more general way of describing taint propagation rules

r355396 - [analyzer] Fix taint propagation in GenericTaintChecker

2019-03-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Mar 5 04:42:59 2019 New Revision: 355396 URL: http://llvm.org/viewvc/llvm-project?rev=355396&view=rev Log: [analyzer] Fix taint propagation in GenericTaintChecker The gets function has no SrcArgs. Because the default value for isTainted was false, it didn't mark its D

r355297 - [analyzer] Enable subcheckers to possess checker options

2019-03-03 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sun Mar 3 16:28:16 2019 New Revision: 355297 URL: http://llvm.org/viewvc/llvm-project?rev=355297&view=rev Log: [analyzer] Enable subcheckers to possess checker options Under the term "subchecker", I mean checkers that do not have a checker class on their own, like unix.Ma

r354806 - [analyzer] Fix infinite recursion in printing macros

2019-02-25 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Mon Feb 25 10:49:42 2019 New Revision: 354806 URL: http://llvm.org/viewvc/llvm-project?rev=354806&view=rev Log: [analyzer] Fix infinite recursion in printing macros #define f(y) x #define x f(x) int main() { x; } This example results a compilation error since "x" in the f

r354235 - [analyzer] Make valist.Uninitialized depend on ValistBase

2019-02-17 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sun Feb 17 11:51:42 2019 New Revision: 354235 URL: http://llvm.org/viewvc/llvm-project?rev=354235&view=rev Log: [analyzer] Make valist.Uninitialized depend on ValistBase Accidentally left this dependency out, resulting in an assert failure if only valist.Uninitialized is e

r353698 - [analyzer] New checker for detecting usages of unsafe I/O functions

2019-02-11 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Mon Feb 11 05:46:43 2019 New Revision: 353698 URL: http://llvm.org/viewvc/llvm-project?rev=353698&view=rev Log: [analyzer] New checker for detecting usages of unsafe I/O functions There are certain unsafe or deprecated (since C11) buffer handling functions which should be

r353150 - Fix the sphinx buildbot after D54429

2019-02-05 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Feb 5 02:19:39 2019 New Revision: 353150 URL: http://llvm.org/viewvc/llvm-project?rev=353150&view=rev Log: Fix the sphinx buildbot after D54429 Modified: cfe/trunk/docs/analyzer/checkers.rst Modified: cfe/trunk/docs/analyzer/checkers.rst URL: http://llvm.org/vie

r352959 - [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

2019-02-02 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Feb 2 06:50:04 2019 New Revision: 352959 URL: http://llvm.org/viewvc/llvm-project?rev=352959&view=rev Log: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields This patch is an implementation of the ideas discussed on the mailing lis

r352693 - [analyzer] Make NullReturnedFromNonnullChecker depend on NullabilityBase

2019-01-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Jan 30 15:48:37 2019 New Revision: 352693 URL: http://llvm.org/viewvc/llvm-project?rev=352693&view=rev Log: [analyzer] Make NullReturnedFromNonnullChecker depend on NullabilityBase Accidentally left this dependency out after D54438. Added: cfe/trunk/test/Analysis/

r352292 - [analyzer] Add CheckerManager::getChecker, make sure that a registry function registers no more than 1 checker

2019-01-26 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Jan 26 13:41:50 2019 New Revision: 352292 URL: http://llvm.org/viewvc/llvm-project?rev=352292&view=rev Log: [analyzer] Add CheckerManager::getChecker, make sure that a registry function registers no more than 1 checker This patch effectively fixes the almost decade ol

[clang-tools-extra] r352290 - Fix a lit test failure after D54438

2019-01-26 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Jan 26 13:22:58 2019 New Revision: 352290 URL: http://llvm.org/viewvc/llvm-project?rev=352290&view=rev Log: Fix a lit test failure after D54438 Modified: clang-tools-extra/trunk/test/clang-tidy/static-analyzer-config.cpp Modified: clang-tools-extra/trunk/test/clan

r352284 - [analyzer] Fix an bug where statically linked, but not registered checkers weren't recognized

2019-01-26 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Jan 26 09:27:40 2019 New Revision: 352284 URL: http://llvm.org/viewvc/llvm-project?rev=352284&view=rev Log: [analyzer] Fix an bug where statically linked, but not registered checkers weren't recognized My last patch, D56989, moved the validation of whether a checker e

r352282 - [analyzer][NFC] Keep track of whether enabling a checker was explictly specified in command line arguments

2019-01-26 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Sat Jan 26 08:35:33 2019 New Revision: 352282 URL: http://llvm.org/viewvc/llvm-project?rev=352282&view=rev Log: [analyzer][NFC] Keep track of whether enabling a checker was explictly specified in command line arguments I added a new enum to CheckerInfo, so we can easily t

  1   2   >