r327348 - [analyzer] Support temporaries conjured by conservatively evaluated functions.

2018-03-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Mar 12 16:36:12 2018 New Revision: 327348 URL: http://llvm.org/viewvc/llvm-project?rev=327348&view=rev Log: [analyzer] Support temporaries conjured by conservatively evaluated functions. Properly perform destruction and lifetime extension of such temporaries. C++ obje

r327352 - [CFG] [analyzer] Don't add construction context to a return-by-reference call.

2018-03-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Mar 12 16:52:36 2018 New Revision: 327352 URL: http://llvm.org/viewvc/llvm-project?rev=327352&view=rev Log: [CFG] [analyzer] Don't add construction context to a return-by-reference call. Call expressions that return objects by an lvalue reference or an rvalue reference

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

2018-03-14 Thread Artem Dergachev via cfe-commits
variable 'RCC' [-Werror,-Wunused-variable]   if (const auto *RCC = dyn_cast(CC)) {   ^ 1 error generated. Regards, Mikael On 03/13/2018 12:22 AM, Artem Dergachev via cfe-commits wrote: Author: dergachev Date: Mon Mar 12 16:22:35 2018 New Revision: 327345

Re: r327593 - [CFG] Allow CallExpr's to be looked up in CFG's

2018-03-15 Thread Artem Dergachev via cfe-commits
Thank you for fixing this one! I must have missed it. On 14/03/2018 5:09 PM, Richard Trieu via cfe-commits wrote: Author: rtrieu Date: Wed Mar 14 17:09:26 2018 New Revision: 327593 URL: http://llvm.org/viewvc/llvm-project?rev=327593&view=rev Log: [CFG] Allow CallExpr's to be looked up in CFG's

r333670 - [analyzer] Improve performance of the SVal simplification mechanism.

2018-05-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu May 31 10:22:38 2018 New Revision: 333670 URL: http://llvm.org/viewvc/llvm-project?rev=333670&view=rev Log: [analyzer] Improve performance of the SVal simplification mechanism. When neither LHS nor RHS of a binary operator expression can be simplified, return the origi

r333671 - [analyzer] Improve performance of the SVal simplification mechanism further.

2018-05-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu May 31 10:27:28 2018 New Revision: 333671 URL: http://llvm.org/viewvc/llvm-project?rev=333671&view=rev Log: [analyzer] Improve performance of the SVal simplification mechanism further. Memoize simplification so that we didn't need to simplify the same symbolic expressi

r333679 - [analyzer] Annotate ProgramState update methods with LLVM_NODISCARD.

2018-05-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu May 31 11:30:41 2018 New Revision: 333679 URL: http://llvm.org/viewvc/llvm-project?rev=333679&view=rev Log: [analyzer] Annotate ProgramState update methods with LLVM_NODISCARD. Because our program states are immutable, methods like "add<>", "set<>", "bind" create a cop

r333719 - [analyzer] NFC: Track all constructed objects in a single state trait.

2018-05-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu May 31 18:59:48 2018 New Revision: 333719 URL: http://llvm.org/viewvc/llvm-project?rev=333719&view=rev Log: [analyzer] NFC: Track all constructed objects in a single state trait. ExprEngine already maintains three internal program state traits to track path-sensitive i

r333941 - [CFG] Fix automatic destructors when a member is bound to a reference.

2018-06-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 4 11:56:25 2018 New Revision: 333941 URL: http://llvm.org/viewvc/llvm-project?rev=333941&view=rev Log: [CFG] Fix automatic destructors when a member is bound to a reference. In code like const int &x = A().x; automatic destructor for the object A() lifetime-

r333946 - [analyzer] Re-enable constructors when lifetime extension through fields occurs.

2018-06-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 4 13:18:37 2018 New Revision: 333946 URL: http://llvm.org/viewvc/llvm-project?rev=333946&view=rev Log: [analyzer] Re-enable constructors when lifetime extension through fields occurs. Temporary object constructor inlining was disabled in r326240 for code like

r334678 - [analyzer] NFC: Merge code for finding and tracking construction target.

2018-06-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 13 18:20:12 2018 New Revision: 334678 URL: http://llvm.org/viewvc/llvm-project?rev=334678&view=rev Log: [analyzer] NFC: Merge code for finding and tracking construction target. When analyzing C++ code, a common operation in the analyzer is to discover target region

r334681 - [analyzer] pr37270: Track constructor target region, even if just a variable.

2018-06-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 13 18:32:46 2018 New Revision: 334681 URL: http://llvm.org/viewvc/llvm-project?rev=334681&view=rev Log: [analyzer] pr37270: Track constructor target region, even if just a variable. The very idea of construction context implies that first the object is constructed,

r334682 - [analyzer] Track class member initializer constructors path-sensitively.

2018-06-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 13 18:40:49 2018 New Revision: 334682 URL: http://llvm.org/viewvc/llvm-project?rev=334682&view=rev Log: [analyzer] Track class member initializer constructors path-sensitively. The reasoning behind this change is similar to the previous commit, r334681. Because mem

r334683 - [analyzer] Re-enable C++17-specific variable and member construction contexts.

2018-06-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 13 18:54:21 2018 New Revision: 334683 URL: http://llvm.org/viewvc/llvm-project?rev=334683&view=rev Log: [analyzer] Re-enable C++17-specific variable and member construction contexts. Not contexts themselves, but rather support for them in the analyzer. Such constr

r334684 - [analyzer] Re-enable C++17-specific RVO construction contexts.

2018-06-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 13 18:59:35 2018 New Revision: 334684 URL: http://llvm.org/viewvc/llvm-project?rev=334684&view=rev Log: [analyzer] Re-enable C++17-specific RVO construction contexts. Not contexts themselves, but rather support for them in the analyzer. Such construction contexts

r344537 - [python] [tests] Disable python binding tests under LLVM_USE_SANITIZER=Address

2018-10-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Oct 15 10:43:23 2018 New Revision: 344537 URL: http://llvm.org/viewvc/llvm-project?rev=344537&view=rev Log: [python] [tests] Disable python binding tests under LLVM_USE_SANITIZER=Address They don't work yet. Patch by Dan Liew! rdar://problem/45242886 Differential Re

r344538 - [analyzer] NFC: RetainCountChecker: Don't dump() symbols into program point tags.

2018-10-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Oct 15 10:47:56 2018 New Revision: 344538 URL: http://llvm.org/viewvc/llvm-project?rev=344538&view=rev Log: [analyzer] NFC: RetainCountChecker: Don't dump() symbols into program point tags. We don't need a separate node for every symbol, because whenever the first sym

r344539 - [analyzer] Teach CallEvent about C++17 aligned operator new().

2018-10-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Oct 15 10:53:18 2018 New Revision: 344539 URL: http://llvm.org/viewvc/llvm-project?rev=344539&view=rev Log: [analyzer] Teach CallEvent about C++17 aligned operator new(). In C++17, when class C has large alignment value, a special case of overload resolution rule kicks

r344540 - [analyzer] Add doxygen comments for the new CXXAllocatorCall APIs.

2018-10-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Oct 15 11:01:34 2018 New Revision: 344540 URL: http://llvm.org/viewvc/llvm-project?rev=344540&view=rev Log: [analyzer] Add doxygen comments for the new CXXAllocatorCall APIs. Forgot to squeeze this into r344539. Modified: cfe/trunk/include/clang/StaticAnalyzer/Cor

r344823 - [analyzer] Be more plugin-friendly by moving static locals into .cpp files.

2018-10-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 19 17:29:24 2018 New Revision: 344823 URL: http://llvm.org/viewvc/llvm-project?rev=344823&view=rev Log: [analyzer] Be more plugin-friendly by moving static locals into .cpp files. The GDMIndex functions return a pointer that's used as a key for looking up data, but

r344944 - [analyzer] Fix dumping for SymbolConjured conjured at no particular statement.

2018-10-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Oct 22 13:11:10 2018 New Revision: 344944 URL: http://llvm.org/viewvc/llvm-project?rev=344944&view=rev Log: [analyzer] Fix dumping for SymbolConjured conjured at no particular statement. Added: cfe/trunk/test/Analysis/dump_egraph.cpp Modified: cfe/trunk/lib/Sta

r351499 - [analyzer] Make sure base-region and its sub-regions are either all alive or all dead.

2019-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Jan 17 16:08:56 2019 New Revision: 351499 URL: http://llvm.org/viewvc/llvm-project?rev=351499&view=rev Log: [analyzer] Make sure base-region and its sub-regions are either all alive or all dead. SymbolReaper now realizes that our liveness analysis isn't sharp enough t

r351500 - [analyzer] MoveChecker: Add one more common resetting method, "append".

2019-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Jan 17 16:16:25 2019 New Revision: 351500 URL: http://llvm.org/viewvc/llvm-project?rev=351500&view=rev Log: [analyzer] MoveChecker: Add one more common resetting method, "append". This is especially crucial for reports related to use-after-move of standard library obje

r351505 - [analyzer] A speculative fix for buildbot failures in the new SymbolReaperTest.

2019-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Jan 17 17:37:14 2019 New Revision: 351505 URL: http://llvm.org/viewvc/llvm-project?rev=351505&view=rev Log: [analyzer] A speculative fix for buildbot failures in the new SymbolReaperTest. I expect an xvalue to be easier to convert. Modified: cfe/trunk/unittests/St

Re: r351540 - [analyzer] Unbreak building of SymbolReaperTest true BUILD_SHARED_LIBS=True

2019-01-18 Thread Artem Dergachev via cfe-commits
Thanks!!! On 1/18/19 2:13 AM, Alex Bradbury via cfe-commits wrote: Author: asb Date: Fri Jan 18 02:13:07 2019 New Revision: 351540 URL: http://llvm.org/viewvc/llvm-project?rev=351540&view=rev Log: [analyzer] Unbreak building of SymbolReaperTest true BUILD_SHARED_LIBS=True Extra dependencies ne

r351609 - [analyzer] Do not try to body-farm Objective-C properties with custom accessors.

2019-01-18 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Jan 18 14:52:13 2019 New Revision: 351609 URL: http://llvm.org/viewvc/llvm-project?rev=351609&view=rev Log: [analyzer] Do not try to body-farm Objective-C properties with custom accessors. If a property is defined with a custom getter, we should not behave as if the ge

r351610 - [analyzer] pr37688: Fix a crash upon evaluating a deleted destructor of a union.

2019-01-18 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Jan 18 15:05:07 2019 New Revision: 351610 URL: http://llvm.org/viewvc/llvm-project?rev=351610&view=rev Log: [analyzer] pr37688: Fix a crash upon evaluating a deleted destructor of a union. Add a defensive check against an invalid destructor in the CFG. Unions with fie

r352572 - [analyzer] NFC: GenericTaintChecker: Revise rule specification mechanisms.

2019-01-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jan 29 16:06:43 2019 New Revision: 352572 URL: http://llvm.org/viewvc/llvm-project?rev=352572&view=rev Log: [analyzer] NFC: GenericTaintChecker: Revise rule specification mechanisms. Provide a more powerful and at the same time more readable way of specifying taint pro

r345802 - [analyzer] pr39348: MallocChecker: Realize that sized delete isn't custom delete.

2018-10-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Oct 31 17:43:35 2018 New Revision: 345802 URL: http://llvm.org/viewvc/llvm-project?rev=345802&view=rev Log: [analyzer] pr39348: MallocChecker: Realize that sized delete isn't custom delete. MallocChecker no longer thinks that operator delete() that accepts the size of

r345807 - [analyzer] SARIF: Suppress version testing in a more downstream-friendly manner.

2018-10-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Oct 31 18:27:01 2018 New Revision: 345807 URL: http://llvm.org/viewvc/llvm-project?rev=345807&view=rev Log: [analyzer] SARIF: Suppress version testing in a more downstream-friendly manner. No functional change intended. Modified: cfe/trunk/test/Analysis/diagnosti

r347953 - [analyzer] Fix the "Zombie Symbols" bug.

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 19:27:50 2018 New Revision: 347953 URL: http://llvm.org/viewvc/llvm-project?rev=347953&view=rev Log: [analyzer] Fix the "Zombie Symbols" bug. It's an old bug that consists in stale references to symbols remaining in the GDM if they disappear from other program s

r347954 - [analyzer] Nullability: Don't detect post factum violation on concrete values.

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 19:39:58 2018 New Revision: 347954 URL: http://llvm.org/viewvc/llvm-project?rev=347954&view=rev Log: [analyzer] Nullability: Don't detect post factum violation on concrete values. The checker suppresses warnings on paths on which a nonnull value is assumed to be

r347955 - [analyzer] MallocChecker: Avoid redundant transitions.

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 19:52:42 2018 New Revision: 347955 URL: http://llvm.org/viewvc/llvm-project?rev=347955&view=rev Log: [analyzer] MallocChecker: Avoid redundant transitions. Don't generate a checker-tagged node unconditionally on the first checkDeadSymbols callback when no pointe

r347956 - Revert r344580 "[analyzer] Nullability: Don't detect post factum violation..."

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 20:26:17 2018 New Revision: 347956 URL: http://llvm.org/viewvc/llvm-project?rev=347956&view=rev Log: Revert r344580 "[analyzer] Nullability: Don't detect post factum violation..." Fails under ASan! Removed: cfe/trunk/test/Analysis/nullability-arc.mm Mod

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Artem Dergachev via cfe-commits
Hmm, they don't have git-svn-id lines in the monorepo, which are handy for exactly that. In the multirepos i usually just /search the git log for the svn commit (without "r") and it quickly matches the git-svn-id line, eg.: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347951 // <==

Re: [PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers

2018-11-30 Thread Artem Dergachev via cfe-commits
I suspect that the point is that previously we believed that decrementing below begin and than *incrementing* it back to begin() would yield begin(), but now we disallow this "incrementing back" behavior and warn immediately on decrement because in fact it's already UB. Though, yeah, the title

r348188 - Re-apply r347954 "[analyzer] Nullability: Don't detect post factum violation..."

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 13:04:30 2018 New Revision: 348188 URL: http://llvm.org/viewvc/llvm-project?rev=348188&view=rev Log: Re-apply r347954 "[analyzer] Nullability: Don't detect post factum violation..." Buildbot failures were caused by an unrelated UB that was introduced in r347943

r348198 - [AST] Generate unique identifiers for CXXCtorInitializer objects.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 14:15:34 2018 New Revision: 348198 URL: http://llvm.org/viewvc/llvm-project?rev=348198&view=rev Log: [AST] Generate unique identifiers for CXXCtorInitializer objects. This continues the work started in r342309 and r342315 to provide identifiers to AST objects th

r348199 - [AST] [analyzer] NFC: Reuse code in stable ID dumping methods.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 14:19:05 2018 New Revision: 348199 URL: http://llvm.org/viewvc/llvm-project?rev=348199&view=rev Log: [AST] [analyzer] NFC: Reuse code in stable ID dumping methods. Use the new fancy method introduced in r348197 to simplify some code. Differential Revision: http

r348200 - [analyzer] Dump stable identifiers for objects under construction.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 14:23:21 2018 New Revision: 348200 URL: http://llvm.org/viewvc/llvm-project?rev=348200&view=rev Log: [analyzer] Dump stable identifiers for objects under construction. This continues the work that was started in r342313, which now gets applied to object-under-co

r348201 - [analyzer] Rename MisusedMovedObjectChecker to MoveChecker

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 14:32:32 2018 New Revision: 348201 URL: http://llvm.org/viewvc/llvm-project?rev=348201&view=rev Log: [analyzer] Rename MisusedMovedObjectChecker to MoveChecker This follows the Static Analyzer's tradition to name checkers after things in which they find bugs, no

r348208 - [analyzer] MoveChecker: NFC: Remove the workaround for the "zombie symbols" bug.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 14:44:16 2018 New Revision: 348208 URL: http://llvm.org/viewvc/llvm-project?rev=348208&view=rev Log: [analyzer] MoveChecker: NFC: Remove the workaround for the "zombie symbols" bug. The checker had extra code to clean up memory regions that were sticking around

r348210 - [analyzer] MoveChecker: Restrict to locals and std:: objects.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 15:06:07 2018 New Revision: 348210 URL: http://llvm.org/viewvc/llvm-project?rev=348210&view=rev Log: [analyzer] MoveChecker: Restrict to locals and std:: objects. In general case there use-after-move is not a bug. It depends on how the move-constructor or move-a

r348229 - [analyzer] MoveChecker: Improve warning and note messages.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 18:00:29 2018 New Revision: 348229 URL: http://llvm.org/viewvc/llvm-project?rev=348229&view=rev Log: [analyzer] MoveChecker: Improve warning and note messages. The warning piece traditionally describes the bug itself, i.e. "The bug is a _", eg. "Attempt to d

r348235 - [analyzer] MoveChecker: Add more common state resetting methods.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 19:38:08 2018 New Revision: 348235 URL: http://llvm.org/viewvc/llvm-project?rev=348235&view=rev Log: [analyzer] MoveChecker: Add more common state resetting methods. Includes "resize" and "shrink" because they can reset the object to a known state in certain cir

Re: [cfe-dev] r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-04 Thread Artem Dergachev via cfe-commits
On 12/4/18 5:04 PM, George Karpenkov via cfe-dev wrote: On Dec 4, 2018, at 4:47 PM, Aaron Ballman wrote: On Tue, Dec 4, 2018 at 7:35 PM George Karpenkov wrote: Hi Roman, I’m against this new warning. A very common idiom is defining a “DEBUG” macro to be a no-op in release, and a loggin

r356222 - [analyzer] Support C++17 aggregates with bases without constructors.

2019-03-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 14 17:22:59 2019 New Revision: 356222 URL: http://llvm.org/viewvc/llvm-project?rev=356222&view=rev Log: [analyzer] Support C++17 aggregates with bases without constructors. RegionStore now knows how to bind a nonloc::CompoundVal that represents the value of an aggr

r356223 - [analyzer] RetainCount: A function isn't a CFRetain if it takes no arguments.

2019-03-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 14 17:26:17 2019 New Revision: 356223 URL: http://llvm.org/viewvc/llvm-project?rev=356223&view=rev Log: [analyzer] RetainCount: A function isn't a CFRetain if it takes no arguments. Don't crash when a function has a name that starts with "CF" and ends with "Retain"

Re: r356222 - [analyzer] Support C++17 aggregates with bases without constructors.

2019-03-19 Thread Artem Dergachev via cfe-commits
On Tue, Mar 19, 2019 at 1:14 AM Alexander Kornienko mailto:ale...@google.com>> wrote: On Fri, Mar 15, 2019 at 1:21 AM Artem Dergachev via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: Author: dergachev Date: Thu Mar 14 17:22:59 2019

Re: r356222 - [analyzer] Support C++17 aggregates with bases without constructors.

2019-03-19 Thread Artem Dergachev via cfe-commits
On 3/19/19 11:10 AM, Richard Smith wrote: It sounds like there might be a missing check for InitListExpr::isTransparent somewhere. (A transparent InitListExpr should be treated as equivalent to its one and only subexpression.) Either that, or the static analyzer isn't aware that an object of c

r356634 - [CFG] [analyzer] pr41142: C++17: Skip transparent InitListExprs in constructors.

2019-03-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Mar 20 17:15:07 2019 New Revision: 356634 URL: http://llvm.org/viewvc/llvm-project?rev=356634&view=rev Log: [CFG] [analyzer] pr41142: C++17: Skip transparent InitListExprs in constructors. When searching for construction contexts, i.e. figuring out which statements def

Re: r356222 - [analyzer] Support C++17 aggregates with bases without constructors.

2019-03-21 Thread Artem Dergachev via cfe-commits
This one seems to be fixed by the second patch and is looks similar to the testcase that's already there - https://reviews.llvm.org/D59622 Different backtraces are moderately expected :) On 3/21/19 6:58 AM, Alexander Kornienko wrote: Thanks for the fix! Meanwhile, I found a couple of code sampl

r356969 - [CFG] [analyzer] pr41142: C++17: Skip transparent InitListExprs in ExprEngine.

2019-03-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Mar 25 17:36:53 2019 New Revision: 356969 URL: http://llvm.org/viewvc/llvm-project?rev=356969&view=rev Log: [CFG] [analyzer] pr41142: C++17: Skip transparent InitListExprs in ExprEngine. r356634 didn't fix all the problems caused by r356222 - even though simple constru

r357323 - [analyzer] Introduce a simplified API for adding custom path notes.

2019-03-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 29 15:21:00 2019 New Revision: 357323 URL: http://llvm.org/viewvc/llvm-project?rev=357323&view=rev Log: [analyzer] Introduce a simplified API for adding custom path notes. Almost all path-sensitive checkers need to tell the user when something specific to that chec

r357325 - [analyzer] PR37501: Disable assertion for logical op short circuit evaluation.

2019-03-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 29 15:43:34 2019 New Revision: 357325 URL: http://llvm.org/viewvc/llvm-project?rev=357325&view=rev Log: [analyzer] PR37501: Disable assertion for logical op short circuit evaluation. The transfer function for the CFG element that represents a logical operation comp

r357326 - [analyzer] Move taint API from ProgramState to a separate header. NFC.

2019-03-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 29 15:49:30 2019 New Revision: 357326 URL: http://llvm.org/viewvc/llvm-project?rev=357326&view=rev Log: [analyzer] Move taint API from ProgramState to a separate header. NFC. It is now an inter-checker communication API, similar to the one that connects MallocCheck

r357329 - [analyzer] PR41239: Fix a crash on invalid source location in NoStoreFuncVisitor.

2019-03-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 29 15:57:49 2019 New Revision: 357329 URL: http://llvm.org/viewvc/llvm-project?rev=357329&view=rev Log: [analyzer] PR41239: Fix a crash on invalid source location in NoStoreFuncVisitor. It turns out that SourceManager::isInSystemHeader() crashes when an invalid so

r357332 - Revert "[analyzer] Introduce a simplified API for adding custom path notes."

2019-03-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 29 16:11:10 2019 New Revision: 357332 URL: http://llvm.org/viewvc/llvm-project?rev=357332&view=rev Log: Revert "[analyzer] Introduce a simplified API for adding custom path notes." This reverts commit r357323. ASan leaks found by a buildbot :) Differential Revisi

Re: r357323 - [analyzer] Introduce a simplified API for adding custom path notes.

2019-03-29 Thread Artem Dergachev via cfe-commits
t/build/llvm/tools/clang/tools/driver/driver.cpp:381 #34 0x7facad0612e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) SUMMARY: AddressSanitizer: 1088 byte(s) leaked in 17 allocation(s). On Fri, Mar 29, 2019 at 3:19 PM Artem Dergachev via cfe-commits mailto:cfe-commits@lists.llv

r357335 - [analyzer] MIGChecker: Add support for more deallocator APIs.

2019-03-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 29 16:56:53 2019 New Revision: 357335 URL: http://llvm.org/viewvc/llvm-project?rev=357335&view=rev Log: [analyzer] MIGChecker: Add support for more deallocator APIs. Differential Revision: https://reviews.llvm.org/D59914 Modified: cfe/trunk/lib/StaticAnalyzer/

r357557 - [analyzer] When failing to evaluate a __builtin_constant_p, presume it's false.

2019-04-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Apr 2 18:53:40 2019 New Revision: 357557 URL: http://llvm.org/viewvc/llvm-project?rev=357557&view=rev Log: [analyzer] When failing to evaluate a __builtin_constant_p, presume it's false. __builtin_constant_p(x) is a compiler builtin that evaluates to 1 when its argume

r357620 - Revert "[analyzer] Toning down invalidation a bit".

2019-04-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Apr 3 11:21:16 2019 New Revision: 357620 URL: http://llvm.org/viewvc/llvm-project?rev=357620&view=rev Log: Revert "[analyzer] Toning down invalidation a bit". This reverts commit r352473. The overall idea is great, but it seems to cause unintented consequences when n

r357810 - [analyzer] NoStoreFuncVisitor: Suppress reports with no-store in system headers.

2019-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 5 13:18:53 2019 New Revision: 357810 URL: http://llvm.org/viewvc/llvm-project?rev=357810&view=rev Log: [analyzer] NoStoreFuncVisitor: Suppress reports with no-store in system headers. The idea behind this heuristic is that normally the visitor is there to inform t

r357823 - [Lexer] NFC: Fix an off-by-one bug in getAsCharRange().

2019-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 5 14:48:52 2019 New Revision: 357823 URL: http://llvm.org/viewvc/llvm-project?rev=357823&view=rev Log: [Lexer] NFC: Fix an off-by-one bug in getAsCharRange(). As the unit test demonstrates, subtracting 1 from the offset was unnecessary. The only user of this func

r357827 - Revert "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()."

2019-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 5 15:11:28 2019 New Revision: 357827 URL: http://llvm.org/viewvc/llvm-project?rev=357827&view=rev Log: Revert "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()." This reverts commit r357823. Was breaking clang-tidy! Differential Revision: https://reviews.l

r358321 - [analyzer] Escape pointers stored into top-level parameters with destructors.

2019-04-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 12 19:01:45 2019 New Revision: 358321 URL: http://llvm.org/viewvc/llvm-project?rev=358321&view=rev Log: [analyzer] Escape pointers stored into top-level parameters with destructors. Writing stuff into an argument variable is usually equivalent to writing stuff to a

r358719 - [analyzer] NFC: MoveChecker: Refactor tests to use -verify=prefix.

2019-04-18 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 18 16:17:58 2019 New Revision: 358719 URL: http://llvm.org/viewvc/llvm-project?rev=358719&view=rev Log: [analyzer] NFC: MoveChecker: Refactor tests to use -verify=prefix. This -verify=prefix feature is quite underrated. Differential Revision: https://reviews.llvm.

r358720 - [analyzer] NFC: Make reusable unittest mocks reusable.

2019-04-18 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 18 16:24:50 2019 New Revision: 358720 URL: http://llvm.org/viewvc/llvm-project?rev=358720&view=rev Log: [analyzer] NFC: Make reusable unittest mocks reusable. Put them in a header for other Analyzer unittests to include. Differential Revision: https://reviews.llvm

r358722 - [analyzer] Make default bindings to variables actually work.

2019-04-18 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 18 16:35:56 2019 New Revision: 358722 URL: http://llvm.org/viewvc/llvm-project?rev=358722&view=rev Log: [analyzer] Make default bindings to variables actually work. Default RegionStore bindings represent values that can be obtained by loading from anywhere within t

r358781 - Reapply "[analyzer] Introduce a simplified API for adding custom path notes."

2019-04-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 19 13:23:29 2019 New Revision: 358781 URL: http://llvm.org/viewvc/llvm-project?rev=358781&view=rev Log: Reapply "[analyzer] Introduce a simplified API for adding custom path notes." This reapplies commit r357323, fixing memory leak found by LSan. Differential Revi

Re: r358724 - Add header guard to Reusables.h [NFC]

2019-04-19 Thread Artem Dergachev via cfe-commits
Whoops, thanks! On 4/18/19 5:42 PM, Ali Tamur via cfe-commits wrote: Author: tamur Date: Thu Apr 18 17:42:54 2019 New Revision: 358724 URL: http://llvm.org/viewvc/llvm-project?rev=358724&view=rev Log: Add header guard to Reusables.h [NFC] Modified: cfe/trunk/unittests/StaticAnalyzer/Reusa

r358944 - [analyzer] PR41269: Add a bit of C++ smart pointer modeling.

2019-04-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Apr 22 19:45:42 2019 New Revision: 358944 URL: http://llvm.org/viewvc/llvm-project?rev=358944&view=rev Log: [analyzer] PR41269: Add a bit of C++ smart pointer modeling. Implement cplusplus.SmartPtrModeling, a new checker that doesn't emit any warnings but models method

r358945 - [analyzer] PR41335: Fix crash when no-store event is in a body-farmed function.

2019-04-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Apr 22 19:50:38 2019 New Revision: 358945 URL: http://llvm.org/viewvc/llvm-project?rev=358945&view=rev Log: [analyzer] PR41335: Fix crash when no-store event is in a body-farmed function. Stuffing invalid source locations (such as those in functions produced by body fa

r358946 - [analyzer] Unbreak body farms in presence of multiple declarations.

2019-04-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Apr 22 19:56:00 2019 New Revision: 358946 URL: http://llvm.org/viewvc/llvm-project?rev=358946&view=rev Log: [analyzer] Unbreak body farms in presence of multiple declarations. When growing a body on a body farm, it's essential to use the same redeclaration of the funct

r359035 - Re-apply r357823 "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()."

2019-04-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Apr 23 14:15:26 2019 New Revision: 359035 URL: http://llvm.org/viewvc/llvm-project?rev=359035&view=rev Log: Re-apply r357823 "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()." It now comes with a follow-up fix for the clients of this API in clangd and clang-tidy

[clang-tools-extra] r359035 - Re-apply r357823 "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()."

2019-04-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Apr 23 14:15:26 2019 New Revision: 359035 URL: http://llvm.org/viewvc/llvm-project?rev=359035&view=rev Log: Re-apply r357823 "[Lexer] NFC: Fix an off-by-one bug in getAsCharRange()." It now comes with a follow-up fix for the clients of this API in clangd and clang-tidy

r359037 - [analyzer] Fix macro names in diagnostics within bigger macros.

2019-04-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Apr 23 14:30:30 2019 New Revision: 359037 URL: http://llvm.org/viewvc/llvm-project?rev=359037&view=rev Log: [analyzer] Fix macro names in diagnostics within bigger macros. If macro "CHECK_X(x)" expands to something like "if (x != NULL) ...", the "Assuming..." note no l

r359237 - [analyzer] Add FIXMEs for alpha.unix.cstring.OutOfBounds false positives.

2019-04-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 25 13:30:14 2019 New Revision: 359237 URL: http://llvm.org/viewvc/llvm-project?rev=359237&view=rev Log: [analyzer] Add FIXMEs for alpha.unix.cstring.OutOfBounds false positives. Caused by incorrect strlcat() modeling in r332303, cf. https://bugs.llvm.org/show_bug.c

r359262 - [analyzer] Fix crash when returning C++ objects from ObjC messages-to-nil.

2019-04-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 25 19:05:12 2019 New Revision: 359262 URL: http://llvm.org/viewvc/llvm-project?rev=359262&view=rev Log: [analyzer] Fix crash when returning C++ objects from ObjC messages-to-nil. the assertion is in fact incorrect: there is a cornercase in Objective-C++ in which a

r359263 - [analyzer] RetainCount: Allow offsets in return values.

2019-04-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 25 19:05:15 2019 New Revision: 359263 URL: http://llvm.org/viewvc/llvm-project?rev=359263&view=rev Log: [analyzer] RetainCount: Allow offsets in return values. Because RetainCountChecker has custom "local" reasoning about escapes, it has a separate facility to deal

r359264 - [analyzer] RetainCount: Add a suppression for "the Matching rule".

2019-04-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 25 19:05:18 2019 New Revision: 359264 URL: http://llvm.org/viewvc/llvm-project?rev=359264&view=rev Log: [analyzer] RetainCount: Add a suppression for "the Matching rule". In the OSObject universe there appears to be another slightly popular contract, apart from "cr

r359530 - [analyzer] SmartPtrModeling: Fix a null dereference.

2019-04-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Apr 29 20:00:57 2019 New Revision: 359530 URL: http://llvm.org/viewvc/llvm-project?rev=359530&view=rev Log: [analyzer] SmartPtrModeling: Fix a null dereference. Don't crash when trying to model a call in which the callee is unknown in compile time, eg. a pointer-to-mem

r359531 - [analyzer] Treat functions without run-time branches as "small".

2019-04-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Apr 29 20:01:02 2019 New Revision: 359531 URL: http://llvm.org/viewvc/llvm-project?rev=359531&view=rev Log: [analyzer] Treat functions without run-time branches as "small". Currently we always inline functions that have no branches, i.e. have exactly three CFG blocks:

r360202 - [analyzer] Fix a crash when doing RVO from within blocks.

2019-05-07 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue May 7 15:33:13 2019 New Revision: 360202 URL: http://llvm.org/viewvc/llvm-project?rev=360202&view=rev Log: [analyzer] Fix a crash when doing RVO from within blocks. When looking for the location context of the call site, unwrap block invocation contexts because they a

[clang-tools-extra] r360277 - [clang-tidy] Update documentation on ReSharper integration.

2019-05-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed May 8 11:12:12 2019 New Revision: 360277 URL: http://llvm.org/viewvc/llvm-project?rev=360277&view=rev Log: [clang-tidy] Update documentation on ReSharper integration. It's now possible to set custom clang-tidy binary. Patch by Alexander Zaitsev! Differential Revisio

r343035 - [analyzer] NFC: Legalize state manager factory injection.

2018-09-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Sep 25 15:10:12 2018 New Revision: 343035 URL: http://llvm.org/viewvc/llvm-project?rev=343035&view=rev Log: [analyzer] NFC: Legalize state manager factory injection. When a checker maintains a program state trait that isn't a simple list/set/map, but is a combination

r343037 - [analyzer] NFC: CallDescription: Improve array management.

2018-09-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Sep 25 15:13:31 2018 New Revision: 343037 URL: http://llvm.org/viewvc/llvm-project?rev=343037&view=rev Log: [analyzer] NFC: CallDescription: Improve array management. Combine the two constructor overrides into a single ArrayRef constructor to allow easier brace initial

r343048 - [analyzer] Add a testing facility for testing relationships between symbols.

2018-09-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Sep 25 16:50:53 2018 New Revision: 343048 URL: http://llvm.org/viewvc/llvm-project?rev=343048&view=rev Log: [analyzer] Add a testing facility for testing relationships between symbols. Tests introduced in r329780 was disabled in r342317 because these tests were acciden

r343051 - [analyzer] Fix a crash on casting symbolic pointers to derived classes.

2018-09-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Sep 25 17:17:14 2018 New Revision: 343051 URL: http://llvm.org/viewvc/llvm-project?rev=343051&view=rev Log: [analyzer] Fix a crash on casting symbolic pointers to derived classes. Commit r340984 causes a crash when a pointer to a completely unrelated type UnrelatedT (e

r343631 - [analyzer] Fix symbol discovery in nonloc::LocAsInteger values.

2018-10-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Oct 2 13:48:12 2018 New Revision: 343631 URL: http://llvm.org/viewvc/llvm-project?rev=343631&view=rev Log: [analyzer] Fix symbol discovery in nonloc::LocAsInteger values. Doesn't do much despite sounding quite bad, but fixes an exotic test case where liveness of a non

r343632 - [analyzer] Promote StdCLibraryFunctionsChecker to the apiModeling category.

2018-10-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Oct 2 13:50:40 2018 New Revision: 343632 URL: http://llvm.org/viewvc/llvm-project?rev=343632&view=rev Log: [analyzer] Promote StdCLibraryFunctionsChecker to the apiModeling category. Because all our languages are C-based, there's no reason to enable this checker only

r343736 - [analyzer] [tests] [quickfix] Make more test more resilient for non-defaut -std.

2018-10-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Oct 3 15:48:00 2018 New Revision: 343736 URL: http://llvm.org/viewvc/llvm-project?rev=343736&view=rev Log: [analyzer] [tests] [quickfix] Make more test more resilient for non-defaut -std. It is important to specify the version of the standard because tests should test

Re: [clang-tools-extra] r* - [clangd]*

2018-10-08 Thread Artem Dergachev via cfe-commits
Hi all, Just wanted to attract attention to the clangd test failure at http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/12782/ Buildbots were down recently, so I guess this one was very easy to miss. ___ cfe-commits mailing list cfe

r353350 - Revert "[analyzer] Remove the "postponed" hack, deal with derived symbols..."

2019-02-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 6 15:56:43 2019 New Revision: 353350 URL: http://llvm.org/viewvc/llvm-project?rev=353350&view=rev Log: Revert "[analyzer] Remove the "postponed" hack, deal with derived symbols..." This reverts commit r341722. The "postponed" mechanism turns out to be necessary i

r353353 - [analyzer] Canonicalize declarations within variable regions.

2019-02-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 6 16:30:20 2019 New Revision: 353353 URL: http://llvm.org/viewvc/llvm-project?rev=353353&view=rev Log: [analyzer] Canonicalize declarations within variable regions. Memory region that correspond to a variable is identified by the variable's declaration and, in cas

r353583 - [analyzer] CStringSyntaxChecks: Fix an off-by-one error in the strlcat() check.

2019-02-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 8 15:59:52 2019 New Revision: 353583 URL: http://llvm.org/viewvc/llvm-project?rev=353583&view=rev Log: [analyzer] CStringSyntaxChecks: Fix an off-by-one error in the strlcat() check. oth strlcat and strlcpy cut off their safe bound for the argument value at sizeof

r353592 - [analyzer] Add a comment that FunctionCodeRegions may also need canonicalization

2019-02-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Feb 8 17:00:32 2019 New Revision: 353592 URL: http://llvm.org/viewvc/llvm-project?rev=353592&view=rev Log: [analyzer] Add a comment that FunctionCodeRegions may also need canonicalization Modified: cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp Modified: cfe/tru

r354530 - [attributes] Add an attribute for server routines in Mach kernel and extensions.

2019-02-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 20 16:01:02 2019 New Revision: 354530 URL: http://llvm.org/viewvc/llvm-project?rev=354530&view=rev Log: [attributes] Add an attribute for server routines in Mach kernel and extensions. The new __attribute__ ((mig_server_routine)) is going to be used for annotating

r354531 - [attributes] Fix buildbot after r354530.

2019-02-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 20 16:19:24 2019 New Revision: 354531 URL: http://llvm.org/viewvc/llvm-project?rev=354531&view=rev Log: [attributes] Fix buildbot after r354530. Update the test after adding more attribute subjects. Differential Revision: https://reviews.llvm.org/D58365 Modified:

r354635 - [analyzer] MIGChecker: A checker for Mach Interface Generator conventions.

2019-02-21 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Feb 21 15:55:28 2019 New Revision: 354635 URL: http://llvm.org/viewvc/llvm-project?rev=354635&view=rev Log: [analyzer] MIGChecker: A checker for Mach Interface Generator conventions. This checker detects use-after-free bugs in (various forks of) the Mach kernel that ar

<    1   2   3   4   5   6   7   8   9   10   >