r339087 - [analyzer] NFC: Document that we support implicit argument constructors.

2018-08-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Aug 6 19:22:59 2018 New Revision: 339087 URL: http://llvm.org/viewvc/llvm-project?rev=339087&view=rev Log: [analyzer] NFC: Document that we support implicit argument constructors. The change in the AST in r338135 caused us to accidentally support inlining constructors

r339088 - [analyzer] pr37204: Take signedness into account in getTruthValue().

2018-08-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Aug 6 19:27:38 2018 New Revision: 339088 URL: http://llvm.org/viewvc/llvm-project?rev=339088&view=rev Log: [analyzer] pr37204: Take signedness into account in getTruthValue(). It now actually produces a signed APSInt when the QualType passed into it is signed, which i

r339726 - [analyzer] Add a test forgotten in r339088.

2018-08-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 14 14:06:30 2018 New Revision: 339726 URL: http://llvm.org/viewvc/llvm-project?rev=339726&view=rev Log: [analyzer] Add a test forgotten in r339088. Differential Revision: https://reviews.llvm.org/D50363 Added: cfe/trunk/test/Analysis/std-c-library-functions-in

r339727 - [CFG] [analyzer] Find argument constructors in CXXTemporaryObjectExprs.

2018-08-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 14 14:10:46 2018 New Revision: 339727 URL: http://llvm.org/viewvc/llvm-project?rev=339727&view=rev Log: [CFG] [analyzer] Find argument constructors in CXXTemporaryObjectExprs. CXXTemporaryObjectExpr is a sub-class of CXXConstructExpr. If it has arguments that are s

r339745 - [analyzer] Add support for constructors of arguments.

2018-08-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 14 17:33:55 2018 New Revision: 339745 URL: http://llvm.org/viewvc/llvm-project?rev=339745&view=rev Log: [analyzer] Add support for constructors of arguments. Once CFG-side support for argument construction contexts landed in r338436, the analyzer could make use of

r332303 - [analyzer] Re-apply r331096 "CStringChecker: Add support for BSD strlcpy()...".

2018-05-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 14 15:32:24 2018 New Revision: 332303 URL: http://llvm.org/viewvc/llvm-project?rev=332303&view=rev Log: [analyzer] Re-apply r331096 "CStringChecker: Add support for BSD strlcpy()...". Fixed after revert in r331401. Patch by David Carlier! Differential Revision: h

r332417 - [analyzer] Make plist-html diagnostic consumer produce multi-file reports.

2018-05-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue May 15 17:11:24 2018 New Revision: 332417 URL: http://llvm.org/viewvc/llvm-project?rev=332417&view=rev Log: [analyzer] Make plist-html diagnostic consumer produce multi-file reports. Previously plist-html output produced multi-file HTML reports but only single-file Pli

r333326 - [analyzer] Add security checks for bcmp(), bcopy(), bzero().

2018-05-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri May 25 17:04:26 2018 New Revision: 26 URL: http://llvm.org/viewvc/llvm-project?rev=26&view=rev Log: [analyzer] Add security checks for bcmp(), bcopy(), bzero(). These functions are obsolete. The analyzer would advice to replace them with memcmp(), memcpy() or m

r314218 - [analyzer] Keep track of design discusions as part of analyzer documentation.

2017-09-26 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Sep 26 08:49:53 2017 New Revision: 314218 URL: http://llvm.org/viewvc/llvm-project?rev=314218&view=rev Log: [analyzer] Keep track of design discusions as part of analyzer documentation. Create a directory to store discussions on potentially useful features that are not

r314287 - [analyzer] Fix and refactor bugreporter::getDerefExpr() API.

2017-09-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Sep 27 02:33:37 2017 New Revision: 314287 URL: http://llvm.org/viewvc/llvm-project?rev=314287&view=rev Log: [analyzer] Fix and refactor bugreporter::getDerefExpr() API. This API is used by checkers (and other entities) in order to track where does a value originate fro

r314290 - [analyzer] Match more patterns in bugreporter::getDerefExpr() API.

2017-09-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Sep 27 02:50:45 2017 New Revision: 314290 URL: http://llvm.org/viewvc/llvm-project?rev=314290&view=rev Log: [analyzer] Match more patterns in bugreporter::getDerefExpr() API. This function can now track null pointer through simple pointer arithmetic, such as '*&*(p + 2

r314298 - [analyzer] Fix an outdated comment in a test. NFC.

2017-09-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Sep 27 03:59:06 2017 New Revision: 314298 URL: http://llvm.org/viewvc/llvm-project?rev=314298&view=rev Log: [analyzer] Fix an outdated comment in a test. NFC. Modified: cfe/trunk/test/Analysis/null-deref-path-notes.c Modified: cfe/trunk/test/Analysis/null-deref-pa

r314910 - [analyzer] Fix autodetection of binding types.

2017-10-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Oct 4 08:59:40 2017 New Revision: 314910 URL: http://llvm.org/viewvc/llvm-project?rev=314910&view=rev Log: [analyzer] Fix autodetection of binding types. In ProgramState::getSVal(Location, Type) API which dereferences a pointer value, when the optional Type parameter

r314975 - [analyzer] Fix leak false positives on stuff put in C++/ObjC initializer lists.

2017-10-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Oct 5 01:43:32 2017 New Revision: 314975 URL: http://llvm.org/viewvc/llvm-project?rev=314975&view=rev Log: [analyzer] Fix leak false positives on stuff put in C++/ObjC initializer lists. The analyzer now realizes that C++ std::initializer_list objects and Objective-C

r315298 - [analyzer] PthreadLockChecker: Add printState() method for self-debugging.

2017-10-10 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Oct 10 04:49:09 2017 New Revision: 315298 URL: http://llvm.org/viewvc/llvm-project?rev=315298&view=rev Log: [analyzer] PthreadLockChecker: Add printState() method for self-debugging. This method injects additional information into program state dumps, describing states

r315300 - [analyzer] MisusedMovedObject: Add printState() method for self-debugging.

2017-10-10 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Oct 10 04:50:45 2017 New Revision: 315300 URL: http://llvm.org/viewvc/llvm-project?rev=315300&view=rev Log: [analyzer] MisusedMovedObject: Add printState() method for self-debugging. This method injects additional information into program state dumps, describing which

r315301 - [analyzer] MisusedMovedObject: Fix state-resetting a base-class sub-object.

2017-10-10 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Oct 10 04:55:56 2017 New Revision: 315301 URL: http://llvm.org/viewvc/llvm-project?rev=315301&view=rev Log: [analyzer] MisusedMovedObject: Fix state-resetting a base-class sub-object. If a method is resetting the state of an object that was moved from, it should be saf

r315736 - [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 12:10:42 2017 New Revision: 315736 URL: http://llvm.org/viewvc/llvm-project?rev=315736&view=rev Log: [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers. It is not uncommon for the users to make their own wrappers around CoreFoundation's CF

r315742 - [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 13:11:00 2017 New Revision: 315742 URL: http://llvm.org/viewvc/llvm-project?rev=315742&view=rev Log: [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled. The checker used to crash when a mempcpy's length argument is symbolic. In this cas

r315750 - [analyzer] pr28449: Fix support for various array initializers.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 13:54:56 2017 New Revision: 315750 URL: http://llvm.org/viewvc/llvm-project?rev=315750&view=rev Log: [analyzer] pr28449: Fix support for various array initializers. In some cases the analyzer didn't expect an array-type variable to be initialized with anything o

r340975 - [CFG] [analyzer] Disable argument construction contexts for variadic functions.

2018-08-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 29 14:50:52 2018 New Revision: 340975 URL: http://llvm.org/viewvc/llvm-project?rev=340975&view=rev Log: [CFG] [analyzer] Disable argument construction contexts for variadic functions. The analyzer doesn't make use of them anyway and they seem to have pretty weird A

r340977 - [CFG] [analyzer] Disable argument construction contexts for variadic functions.

2018-08-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 29 15:05:35 2018 New Revision: 340977 URL: http://llvm.org/viewvc/llvm-project?rev=340977&view=rev Log: [CFG] [analyzer] Disable argument construction contexts for variadic functions. The analyzer doesn't make use of them anyway and they seem to have pretty weird A

r340982 - [analyzer] CFRetainReleaseChecker: Don't check C++ methods with the same name.

2018-08-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 29 15:39:20 2018 New Revision: 340982 URL: http://llvm.org/viewvc/llvm-project?rev=340982&view=rev Log: [analyzer] CFRetainReleaseChecker: Don't check C++ methods with the same name. Don't try to understand what's going on when there's a C++ method called eg. CFRet

r340984 - [analyzer] Support modeling no-op BaseToDerived casts in ExprEngine.

2018-08-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 29 15:43:31 2018 New Revision: 340984 URL: http://llvm.org/viewvc/llvm-project?rev=340984&view=rev Log: [analyzer] Support modeling no-op BaseToDerived casts in ExprEngine. Introduce a new MemRegion sub-class, CXXDerivedObjectRegion, which is the opposite of CXXBas

r340990 - [analyzer] Document that pointer arithmetic is not represented by SymExprs.

2018-08-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 29 15:57:52 2018 New Revision: 340990 URL: http://llvm.org/viewvc/llvm-project?rev=340990&view=rev Log: [analyzer] Document that pointer arithmetic is not represented by SymExprs. Add assertions to verify that. Modified: cfe/trunk/include/clang/StaticAnalyzer/

r341092 - [analyzer] InnerPointerChecker: Fix a segfault when checking symbolic strings.

2018-08-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Aug 30 11:45:05 2018 New Revision: 341092 URL: http://llvm.org/viewvc/llvm-project?rev=341092&view=rev Log: [analyzer] InnerPointerChecker: Fix a segfault when checking symbolic strings. Return value of dyn_cast_or_null should be checked before use. Otherwise we may pu

r337769 - [analyzer] pr38273: Legalize Loc<>NonLoc comparison symbols.

2018-07-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jul 23 16:09:44 2018 New Revision: 337769 URL: http://llvm.org/viewvc/llvm-project?rev=337769&view=rev Log: [analyzer] pr38273: Legalize Loc<>NonLoc comparison symbols. Remove an assertion in RangeConstraintManager that expects such symbols to never appear, while admit

r337776 - [analyzer] Add a no-crash to a recently added test.

2018-07-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jul 23 16:48:13 2018 New Revision: 337776 URL: http://llvm.org/viewvc/llvm-project?rev=337776&view=rev Log: [analyzer] Add a no-crash to a recently added test. No functional change intended. Modified: cfe/trunk/test/Analysis/casts.c Modified: cfe/trunk/test/Analy

r338333 - [analyzer] CStringChecker: Remember to highlight the argument expression range.

2018-07-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jul 30 16:44:37 2018 New Revision: 338333 URL: http://llvm.org/viewvc/llvm-project?rev=338333&view=rev Log: [analyzer] CStringChecker: Remember to highlight the argument expression range. When emitting a bug report, it is important to highlight which argument of the ca

r338339 - [analyzer] Rename test: cxx17-mandatory-elision.cpp -> copy-elision.cpp

2018-07-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jul 30 17:18:35 2018 New Revision: 338339 URL: http://llvm.org/viewvc/llvm-project?rev=338339&view=rev Log: [analyzer] Rename test: cxx17-mandatory-elision.cpp -> copy-elision.cpp It reflects its contents more accurately. No functional change intended. Added: cfe/

r338420 - [analyzer] Don't try to simplify mixed Loc/NonLoc expressions.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:26:34 2018 New Revision: 338420 URL: http://llvm.org/viewvc/llvm-project?rev=338420&view=rev Log: [analyzer] Don't try to simplify mixed Loc/NonLoc expressions. This fix is similar to r337769 and addresses a regression caused by r337167. When an operation be

r338422 - [analyzer] Reuse some code in simplifySVal().

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:29:25 2018 New Revision: 338422 URL: http://llvm.org/viewvc/llvm-project?rev=338422&view=rev Log: [analyzer] Reuse some code in simplifySVal(). No functional change intended. Differential Revision: https://reviews.llvm.org/D49826 Modified: cfe/trunk/lib

r338425 - [CFG] [analyzer] Add stubs for constructor and message argument constructors.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:39:37 2018 New Revision: 338425 URL: http://llvm.org/viewvc/llvm-project?rev=338425&view=rev Log: [CFG] [analyzer] Add stubs for constructor and message argument constructors. CFG now correctly identifies construction context for temporaries constructed for t

r338426 - [CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:46:14 2018 New Revision: 338426 URL: http://llvm.org/viewvc/llvm-project?rev=338426&view=rev Log: [CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++. Like any normal funciton, Objective-C message can return a C++ object in Objectiv

r338436 - [CFG] [analyzer] Implement function argument construction contexts.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 13:45:53 2018 New Revision: 338436 URL: http://llvm.org/viewvc/llvm-project?rev=338436&view=rev Log: [CFG] [analyzer] Implement function argument construction contexts. In r330377 and r338425 we have already identified what constitutes function argument construc

r338439 - [CFG] [analyzer] NFC: Enumerate construction context layer kinds.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 14:12:42 2018 New Revision: 338439 URL: http://llvm.org/viewvc/llvm-project?rev=338439&view=rev Log: [CFG] [analyzer] NFC: Enumerate construction context layer kinds. This is a refactoring patch; no functional change intended. The common part of ConstructionCon

r338441 - [analyzer] Fix eliding the same destructor twice due to buggy default arguments.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 14:17:40 2018 New Revision: 338441 URL: http://llvm.org/viewvc/llvm-project?rev=338441&view=rev Log: [analyzer] Fix eliding the same destructor twice due to buggy default arguments. Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to ass

r338474 - [analyzer] CallEvent: Add helper methods for obtaining the callee stack frame.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 18:58:15 2018 New Revision: 338474 URL: http://llvm.org/viewvc/llvm-project?rev=338474&view=rev Log: [analyzer] CallEvent: Add helper methods for obtaining the callee stack frame. Newly added methods allow reasoning about the stack frame of the call (as opposed

r324660 - [analyzer] Self-debug: Dump environment frame-by-frame.

2018-02-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 8 14:24:38 2018 New Revision: 324660 URL: http://llvm.org/viewvc/llvm-project?rev=324660&view=rev Log: [analyzer] Self-debug: Dump environment frame-by-frame. It makes it easier to discriminate between values of similar expressions in different stack frames. It a

r324663 - [analyzer] Self-debug: Dump the core's internal state traits to the egraph.

2018-02-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 8 14:32:38 2018 New Revision: 324663 URL: http://llvm.org/viewvc/llvm-project?rev=324663&view=rev Log: [analyzer] Self-debug: Dump the core's internal state traits to the egraph. It is useful for debugging problems with C++ operator new() or temporaries. Differen

r324668 - [CFG] Add extra context to C++ constructor statement elements.

2018-02-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 8 14:58:15 2018 New Revision: 324668 URL: http://llvm.org/viewvc/llvm-project?rev=324668&view=rev Log: [CFG] Add extra context to C++ constructor statement elements. This patch adds a new CFGStmt sub-class, CFGConstructor, which replaces the regular CFGStmt with C

r324680 - [analyzer] MallocChecker: Fix one more bug category.

2018-02-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 8 15:28:29 2018 New Revision: 324680 URL: http://llvm.org/viewvc/llvm-project?rev=324680&view=rev Log: [analyzer] MallocChecker: Fix one more bug category. Even though most of the inconsistencies in MallocChecker's bug categories were fixed in r302016, one more wa

r324697 - [CFG] Squash an unused variable introduced in r324668.

2018-02-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 8 17:43:26 2018 New Revision: 324697 URL: http://llvm.org/viewvc/llvm-project?rev=324697&view=rev Log: [CFG] Squash an unused variable introduced in r324668. Found by -Werror buildbot. Modified: cfe/trunk/lib/Analysis/CFG.cpp Modified: cfe/trunk/lib/Analysis

r324789 - [analyzer] Add support for __builtin_constant_p.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 16:51:47 2018 New Revision: 324789 URL: http://llvm.org/viewvc/llvm-project?rev=324789&view=rev Log: [analyzer] Add support for __builtin_constant_p. This builtin is evaluated in compile time. But in the analyzer we don't yet automagically evaluate all calls tha

r324790 - [analyzer] Add missing pre-post-statement callbacks for OffsetOfExpr.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 16:55:49 2018 New Revision: 324790 URL: http://llvm.org/viewvc/llvm-project?rev=324790&view=rev Log: [analyzer] Add missing pre-post-statement callbacks for OffsetOfExpr. This expression may or may not be evaluated in compile time, so tracking the result symbol

r324794 - [CFG] Add construction context for simple variable declarations.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 17:55:23 2018 New Revision: 324794 URL: http://llvm.org/viewvc/llvm-project?rev=324794&view=rev Log: [CFG] Add construction context for simple variable declarations. Constructors of simple variables now can be queried to discover that they're constructing into s

r324796 - [CFG] Add construction context for constructor initializers.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 18:18:04 2018 New Revision: 324796 URL: http://llvm.org/viewvc/llvm-project?rev=324796&view=rev Log: [CFG] Add construction context for constructor initializers. CFG elements for constructors of fields and base classes that are being initialized before the body

r324798 - [CFG] Provide construction contexts when constructors have cleanups.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 18:46:14 2018 New Revision: 324798 URL: http://llvm.org/viewvc/llvm-project?rev=324798&view=rev Log: [CFG] Provide construction contexts when constructors have cleanups. Now that we make it possible to query the CFG constructor element to find information about

r324800 - [analyzer] NFC: Use CFG construction contexts instead of homemade lookahead.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 18:55:08 2018 New Revision: 324800 URL: http://llvm.org/viewvc/llvm-project?rev=324800&view=rev Log: [analyzer] NFC: Use CFG construction contexts instead of homemade lookahead. The analyzer was relying on peeking the next CFG element during analysis whenever it

r324801 - [analyzer] Fix a merge error in -analyzer-config tests.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 19:04:59 2018 New Revision: 324801 URL: http://llvm.org/viewvc/llvm-project?rev=324801&view=rev Log: [analyzer] Fix a merge error in -analyzer-config tests. It was introduced when two -analyzer-config options were added almost simultaneously in r324793 and r3246

r324802 - [analyzer] NFC: Assert that our fix for noreturn destructors keeps working.

2018-02-09 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 9 19:14:22 2018 New Revision: 324802 URL: http://llvm.org/viewvc/llvm-project?rev=324802&view=rev Log: [analyzer] NFC: Assert that our fix for noreturn destructors keeps working. Massive false positives were known to be caused by continuing the analysis after a de

r324952 - [CFG] Provide construction contexts for return value constructors.

2018-02-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Feb 12 14:36:36 2018 New Revision: 324952 URL: http://llvm.org/viewvc/llvm-project?rev=324952&view=rev Log: [CFG] Provide construction contexts for return value constructors. When the current function returns a C++ object by value, CFG elements for constructors that co

r325201 - [analyzer] NFC: Remove dead checks when computing DeclStmt construction region.

2018-02-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 14 18:30:20 2018 New Revision: 325201 URL: http://llvm.org/viewvc/llvm-project?rev=325201&view=rev Log: [analyzer] NFC: Remove dead checks when computing DeclStmt construction region. In CFG, every DeclStmt has exactly one decl, which is always a variable. It is a

r325202 - [analyzer] Allow inlining constructors into return values.

2018-02-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 14 18:32:32 2018 New Revision: 325202 URL: http://llvm.org/viewvc/llvm-project?rev=325202&view=rev Log: [analyzer] Allow inlining constructors into return values. This only affects the cfg-temporary-dtors mode - in this mode we begin inlining constructors that are

r325209 - [analyzer] Decide on inlining destructors via EvalCallOptions.

2018-02-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 14 18:51:58 2018 New Revision: 325209 URL: http://llvm.org/viewvc/llvm-project?rev=325209&view=rev Log: [analyzer] Decide on inlining destructors via EvalCallOptions. EvalCallOptions were introduced in r324018 for allowing various parts of ExprEngine to notify the

r325210 - [CFG] Provide construction contexts for temproary objects.

2018-02-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 14 19:13:36 2018 New Revision: 325210 URL: http://llvm.org/viewvc/llvm-project?rev=325210&view=rev Log: [CFG] Provide construction contexts for temproary objects. Constructors of C++ temporary objects that have destructors now can be queried to discover that they'r

r325211 - [analyzer] Inline constructors for destroyable temporaries.

2018-02-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 14 19:26:43 2018 New Revision: 325211 URL: http://llvm.org/viewvc/llvm-project?rev=325211&view=rev Log: [analyzer] Inline constructors for destroyable temporaries. Since r325210, in cfg-temporary-dtors mode, we can rely on the CFG to tell us that we're indeed const

r325278 - [analyzer] NFC: Eliminate ParentMap lookup in mayInlineCallKind().

2018-02-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 15 11:01:55 2018 New Revision: 325278 URL: http://llvm.org/viewvc/llvm-project?rev=325278&view=rev Log: [analyzer] NFC: Eliminate ParentMap lookup in mayInlineCallKind(). Don't look at the parent statement to figure out if the cxx-allocator-inlining flag should kic

r325282 - [analyzer] Compute the correct this-region for temporary destructors.

2018-02-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 15 11:17:44 2018 New Revision: 325282 URL: http://llvm.org/viewvc/llvm-project?rev=325282&view=rev Log: [analyzer] Compute the correct this-region for temporary destructors. Inline them if possible - a separate flag is added to control this. The whole thing is unde

r325284 - [analyzer] Implement path notes for temporary destructors.

2018-02-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 15 11:28:21 2018 New Revision: 325284 URL: http://llvm.org/viewvc/llvm-project?rev=325284&view=rev Log: [analyzer] Implement path notes for temporary destructors. Temporary destructors fire at the end of the full-expression. It is reasonable to attach the path note

r325286 - [analyzer] Suppress temporary destructors for temporary arrays.

2018-02-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 15 11:34:19 2018 New Revision: 325286 URL: http://llvm.org/viewvc/llvm-project?rev=325286&view=rev Log: [analyzer] Suppress temporary destructors for temporary arrays. Array destructors, like constructors, need to be called for each element of the array separately.

r325966 - [CFG] [analyzer] NFC: Allow more complicated construction contexts.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 14:20:39 2018 New Revision: 325966 URL: http://llvm.org/viewvc/llvm-project?rev=325966&view=rev Log: [CFG] [analyzer] NFC: Allow more complicated construction contexts. ConstructionContexts introduced in D42672 are an additional piece of information included wit

r325969 - [CFG] NFC: Speculative attempt to fix MSVC internal compiler error on buildbot.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 14:49:25 2018 New Revision: 325969 URL: http://llvm.org/viewvc/llvm-project?rev=325969&view=rev Log: [CFG] NFC: Speculative attempt to fix MSVC internal compiler error on buildbot. Don't use fancy initialization and member access in a DenseMap. Modified: cf

r325978 - [CFG] Try to narrow down MSVC compiler crash via binary search.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 15:38:41 2018 New Revision: 325978 URL: http://llvm.org/viewvc/llvm-project?rev=325978&view=rev Log: [CFG] Try to narrow down MSVC compiler crash via binary search. Split the presumably offending function in two to see which part of it causes the crash to occur.

r326014 - [CFG] Provide construction contexts for lifetime-extended temporaries.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 18:00:30 2018 New Revision: 326014 URL: http://llvm.org/viewvc/llvm-project?rev=326014&view=rev Log: [CFG] Provide construction contexts for lifetime-extended temporaries. When constructing a temporary that is going to be lifetime-extended through a MaterializeT

r326015 - [CFG] Provide construction contexts for functional cast-like constructors.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 18:05:11 2018 New Revision: 326015 URL: http://llvm.org/viewvc/llvm-project?rev=326015&view=rev Log: [CFG] Provide construction contexts for functional cast-like constructors. When a constructor of a temporary with a single argument is treated as a functional ca

r326016 - [CFG] Provide construction contexts for temporaries bound to const references.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 18:07:50 2018 New Revision: 326016 URL: http://llvm.org/viewvc/llvm-project?rev=326016&view=rev Log: [CFG] Provide construction contexts for temporaries bound to const references. In order to bind a temporary to a const lvalue reference, a no-op cast is added to

r326019 - [CFG] Provide construction contexts for temporaries in conditional operators.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 19:10:15 2018 New Revision: 326019 URL: http://llvm.org/viewvc/llvm-project?rev=326019&view=rev Log: [CFG] Provide construction contexts for temporaries in conditional operators. When a lifetime-extended temporary is on a branch of a conditional operator, materi

r326021 - [CFG] Keep speculatively working around an MSVC compiler crash.

2018-02-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 23 19:54:22 2018 New Revision: 326021 URL: http://llvm.org/viewvc/llvm-project?rev=326021&view=rev Log: [CFG] Keep speculatively working around an MSVC compiler crash. Replace if() with a switch(). Because random changes in the code seem to suppress the crash. Sto

r326165 - [analyzer] Fix an uninitialized field.

2018-02-26 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Feb 26 18:53:30 2018 New Revision: 326165 URL: http://llvm.org/viewvc/llvm-project?rev=326165&view=rev Log: [analyzer] Fix an uninitialized field. Found by the analyzer! Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h Modifie

r304159 - [analyzer] PthreadLockChecker: model failed pthread_mutex_destroy() calls.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 09:51:39 2017 New Revision: 304159 URL: http://llvm.org/viewvc/llvm-project?rev=304159&view=rev Log: [analyzer] PthreadLockChecker: model failed pthread_mutex_destroy() calls. pthread_mutex_destroy() may fail, returning a non-zero error number, and keeping the m

r304160 - [analyzer] Initial commit for the upcoming refactoring of the IteratorChecker.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 10:03:20 2017 New Revision: 304160 URL: http://llvm.org/viewvc/llvm-project?rev=304160&view=rev Log: [analyzer] Initial commit for the upcoming refactoring of the IteratorChecker. The new checker currently contains the very core infrastructure for tracking the s

r304162 - [analyzer] Support partially tainted records.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 10:42:56 2017 New Revision: 304162 URL: http://llvm.org/viewvc/llvm-project?rev=304162&view=rev Log: [analyzer] Support partially tainted records. The analyzer's taint analysis can now reason about structures or arrays originating from taint sources in which onl

r304170 - [analyzer] Fix immutable map factory lifetime for partial taint.

2017-05-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 29 13:54:02 2017 New Revision: 304170 URL: http://llvm.org/viewvc/llvm-project?rev=304170&view=rev Log: [analyzer] Fix immutable map factory lifetime for partial taint. This should fix the leaks found by asan buildbot in r304162. Also don't store a reference to th

r304710 - [analyzer] Nullability: fix notes around synthesized ObjC property accessors.

2017-06-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 5 07:40:03 2017 New Revision: 304710 URL: http://llvm.org/viewvc/llvm-project?rev=304710&view=rev Log: [analyzer] Nullability: fix notes around synthesized ObjC property accessors. Nullable-to-nonnull checks used to crash when the custom bug visitor was trying to

r304713 - [analyzer] Don't add arrow to the inlined function's decl when it has no body.

2017-06-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 5 08:36:28 2017 New Revision: 304713 URL: http://llvm.org/viewvc/llvm-project?rev=304713&view=rev Log: [analyzer] Don't add arrow to the inlined function's decl when it has no body. In plist output mode with alternate path diagnostics, when entering a function, we

r305211 - [analyzer] Fix a crash when an ObjC object is constructed in AllocaRegion.

2017-06-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 12 12:59:50 2017 New Revision: 305211 URL: http://llvm.org/viewvc/llvm-project?rev=305211&view=rev Log: [analyzer] Fix a crash when an ObjC object is constructed in AllocaRegion. Memory region allocated by alloca() carries no implicit type information. Don't crash

r305896 - [analyzer] LocalizationChecker: Support new localizable APIs.

2017-06-21 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 21 06:12:07 2017 New Revision: 305896 URL: http://llvm.org/viewvc/llvm-project?rev=305896&view=rev Log: [analyzer] LocalizationChecker: Support new localizable APIs. Add support for new methods that were added in macOS High Sierra & iOS 11 and require a localized s

r305900 - [analyzer] Bump a few default performance thresholds.

2017-06-21 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 21 06:29:35 2017 New Revision: 305900 URL: http://llvm.org/viewvc/llvm-project?rev=305900&view=rev Log: [analyzer] Bump a few default performance thresholds. This makes the analyzer around 10% slower by default, allowing it to find deeper bugs. Default values for

r321128 - [analyzer] Fix a crash during C++17 aggregate construction of base objects.

2017-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 19 16:40:38 2017 New Revision: 321128 URL: http://llvm.org/viewvc/llvm-project?rev=321128&view=rev Log: [analyzer] Fix a crash during C++17 aggregate construction of base objects. Since C++17, classes that have base classes can potentially be initialized as aggrega

r321130 - [analyzer] trackNullOrUndefValue: track last store to non-variables.

2017-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 19 16:47:17 2017 New Revision: 321130 URL: http://llvm.org/viewvc/llvm-project?rev=321130&view=rev Log: [analyzer] trackNullOrUndefValue: track last store to non-variables. When reporting certain kinds of analyzer warnings, we use the bugreporter::trackNullOrUndefV

r321135 - [analyzer] De-duplicate path diagnostics for each exploded graph node.

2017-12-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 19 17:17:53 2017 New Revision: 321135 URL: http://llvm.org/viewvc/llvm-project?rev=321135&view=rev Log: [analyzer] De-duplicate path diagnostics for each exploded graph node. The bugreporter::trackNullOrUndefValue() mechanism contains a system of bug reporter visit

r321290 - [analyzer] Fix zero-initialization of stack VLAs under ObjC ARC.

2017-12-21 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Dec 21 10:43:02 2017 New Revision: 321290 URL: http://llvm.org/viewvc/llvm-project?rev=321290&view=rev Log: [analyzer] Fix zero-initialization of stack VLAs under ObjC ARC. Using ARC, strong, weak, and autoreleasing stack variables are implicitly initialized with nil.

r326236 - [analyzer] Introduce correct lifetime extension behavior in simple cases.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 11:47:49 2018 New Revision: 326236 URL: http://llvm.org/viewvc/llvm-project?rev=326236&view=rev Log: [analyzer] Introduce correct lifetime extension behavior in simple cases. This patch uses the reference to MaterializeTemporaryExpr stored in the construction co

r326238 - [CFG] NFC: Refactor ConstructionContext into a finite set of cases.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 12:03:35 2018 New Revision: 326238 URL: http://llvm.org/viewvc/llvm-project?rev=326238&view=rev Log: [CFG] NFC: Refactor ConstructionContext into a finite set of cases. ConstructionContext is moved into a separate translation unit and is separated into multiple

r326239 - [analyzer] Self-debug: Dump dynamic type info and taint with the program state.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 12:06:20 2018 New Revision: 326239 URL: http://llvm.org/viewvc/llvm-project?rev=326239&view=rev Log: [analyzer] Self-debug: Dump dynamic type info and taint with the program state. Useful for debugging problems with dynamic type info and taint. Differential Rev

r326240 - [analyzer] Disable constructor inlining when lifetime extending through a field.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 12:14:06 2018 New Revision: 326240 URL: http://llvm.org/viewvc/llvm-project?rev=326240&view=rev Log: [analyzer] Disable constructor inlining when lifetime extending through a field. Automatic destructors are missing in the CFG in situations like const int &x

r326245 - [analyzer] Don't crash when dynamic type of a variable is set via placement new.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 12:54:40 2018 New Revision: 326245 URL: http://llvm.org/viewvc/llvm-project?rev=326245&view=rev Log: [analyzer] Don't crash when dynamic type of a variable is set via placement new. If a variable or an otherwise a concrete typed-value region is being placement-n

r326246 - [analyzer] Track temporaries without construction contexts for destruction.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 13:02:58 2018 New Revision: 326246 URL: http://llvm.org/viewvc/llvm-project?rev=326246&view=rev Log: [analyzer] Track temporaries without construction contexts for destruction. Sometimes it is not known at compile time which temporary objects will be constructed

r326247 - [analyzer] Fix trivial copy for empty objects.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 13:10:08 2018 New Revision: 326247 URL: http://llvm.org/viewvc/llvm-project?rev=326247&view=rev Log: [analyzer] Fix trivial copy for empty objects. The SVal for any empty C++ object is an UnknownVal. Because RegionStore does not have binding extents, binding an

r326249 - [analyzer] MallocChecker: Suppress false positives in shared pointers.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 13:19:33 2018 New Revision: 326249 URL: http://llvm.org/viewvc/llvm-project?rev=326249&view=rev Log: [analyzer] MallocChecker: Suppress false positives in shared pointers. Throw away MallocChecker warnings that occur after releasing a pointer within a destructor

r326258 - [analyzer] UndefinedAssignmentChecker: Better warning message in implicit ctors.

2018-02-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Feb 27 14:05:55 2018 New Revision: 326258 URL: http://llvm.org/viewvc/llvm-project?rev=326258&view=rev Log: [analyzer] UndefinedAssignmentChecker: Better warning message in implicit ctors. When a class forgets to initialize a field in the constructor, and then gets cop

r326402 - [CFG] [analyzer] Recall that we only skip NoOp casts in construction contexts.

2018-02-28 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 28 17:09:24 2018 New Revision: 326402 URL: http://llvm.org/viewvc/llvm-project?rev=326402&view=rev Log: [CFG] [analyzer] Recall that we only skip NoOp casts in construction contexts. For now. We should also add support for ConstructorConversion casts as presented i

r326405 - [analyzer] Add a checker for mmap()s which are both writable and executable.

2018-02-28 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 28 17:27:46 2018 New Revision: 326405 URL: http://llvm.org/viewvc/llvm-project?rev=326405&view=rev Log: [analyzer] Add a checker for mmap()s which are both writable and executable. This is a security check that warns when both PROT_WRITE and PROT_EXEC are set durin

r326461 - [analyzer] Enable cfg-temporary-dtors by default.

2018-03-01 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 1 10:53:13 2018 New Revision: 326461 URL: http://llvm.org/viewvc/llvm-project?rev=326461&view=rev Log: [analyzer] Enable cfg-temporary-dtors by default. Don't enable c++-temp-dtor-inlining by default yet, due to this reference counting pointe problem. Otherwise t

r327096 - [CFG] [analyzer] Add construction context for implicit constructor conversions.

2018-03-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 8 17:39:59 2018 New Revision: 327096 URL: http://llvm.org/viewvc/llvm-project?rev=327096&view=rev Log: [CFG] [analyzer] Add construction context for implicit constructor conversions. Implicit constructor conversions such as A a = B() are represented by surrounding

r327098 - [analyzer] MmapWriteExecChecker: Add support for mprotect().

2018-03-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 8 17:47:24 2018 New Revision: 327098 URL: http://llvm.org/viewvc/llvm-project?rev=327098&view=rev Log: [analyzer] MmapWriteExecChecker: Add support for mprotect(). mprotect() allows setting memory access flags similarly to mmap(), causing similar security issues i

r327343 - [CFG] [analyzer] Add construction context to C++ return-by-value call elements.

2018-03-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Mar 12 16:12:40 2018 New Revision: 327343 URL: http://llvm.org/viewvc/llvm-project?rev=327343&view=rev Log: [CFG] [analyzer] Add construction context to C++ return-by-value call elements. This patch adds a new CFGStmt sub-class, CFGCXXRecordTypedCall, which replaces th

r327345 - [analyzer] Destroy and lifetime-extend inlined function return values properly.

2018-03-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Mar 12 16:22:35 2018 New Revision: 327345 URL: http://llvm.org/viewvc/llvm-project?rev=327345&view=rev Log: [analyzer] Destroy and lifetime-extend inlined function return values properly. This patch uses the newly added CFGCXXRecordTypedCall element at the call site of

r327347 - [analyzer] NFC: Move the code for setting temp object lifetime into method.

2018-03-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Mar 12 16:27:52 2018 New Revision: 327347 URL: http://llvm.org/viewvc/llvm-project?rev=327347&view=rev Log: [analyzer] NFC: Move the code for setting temp object lifetime into method. Differential Revision: https://reviews.llvm.org/D44129 Modified: cfe/trunk/inclu

  1   2   3   4   5   6   7   8   9   10   >