[clang] 3c50f25 - [analyzer] Fix more ObjC accessor body farms after 2073dd2d.

2019-12-04 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-04T16:29:08-08:00 New Revision: 3c50f2544f7a8f0c41f4fc286064abce2d3629b5 URL: https://github.com/llvm/llvm-project/commit/3c50f2544f7a8f0c41f4fc286064abce2d3629b5 DIFF: https://github.com/llvm/llvm-project/commit/3c50f2544f7a8f0c41f4fc286064abce2d3629b5.dif

[clang] 040c39d - [analyzer] Fix false positive on introspection of a block's internal layout.

2019-12-06 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-06T13:24:20-08:00 New Revision: 040c39d50fb9c60de9020caf86e1a1fccfd6f861 URL: https://github.com/llvm/llvm-project/commit/040c39d50fb9c60de9020caf86e1a1fccfd6f861 DIFF: https://github.com/llvm/llvm-project/commit/040c39d50fb9c60de9020caf86e1a1fccfd6f861.dif

[clang] 134faae - [analyzer] CStringChecker: Improve warning messages.

2019-12-11 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-11T11:22:36-08:00 New Revision: 134faae04259b0412a067c73069f61905fc451d7 URL: https://github.com/llvm/llvm-project/commit/134faae04259b0412a067c73069f61905fc451d7 DIFF: https://github.com/llvm/llvm-project/commit/134faae04259b0412a067c73069f61905fc451d7.dif

[clang] 2b3f207 - [analyzer] CStringChecker: Fix overly eager assumption that memcmp args overlap.

2019-12-11 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-11T11:22:36-08:00 New Revision: 2b3f2071ec6561c3f10e5291289c47bb3629e354 URL: https://github.com/llvm/llvm-project/commit/2b3f2071ec6561c3f10e5291289c47bb3629e354 DIFF: https://github.com/llvm/llvm-project/commit/2b3f2071ec6561c3f10e5291289c47bb3629e354.dif

[clang] f450dd6 - [analyzer] CStringChecker: Fix a crash on unknown value passed to strlcat.

2019-12-13 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-13T18:00:24-08:00 New Revision: f450dd63a14d6cb16418f6a6f4de26916502c13f URL: https://github.com/llvm/llvm-project/commit/f450dd63a14d6cb16418f6a6f4de26916502c13f DIFF: https://github.com/llvm/llvm-project/commit/f450dd63a14d6cb16418f6a6f4de26916502c13f.dif

[clang] 6d3f43e - [analysis] Discard type qualifiers when casting values retrieved from the Store.

2019-12-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-17T15:00:41-08:00 New Revision: 6d3f43ec61a60c37963ee5f54289cf0759fb5d61 URL: https://github.com/llvm/llvm-project/commit/6d3f43ec61a60c37963ee5f54289cf0759fb5d61 DIFF: https://github.com/llvm/llvm-project/commit/6d3f43ec61a60c37963ee5f54289cf0759fb5d61.dif

[clang] badba51 - [analyzer] NonnullGlobalConstants: Add support for kCFNull.

2019-12-18 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-18T12:08:15-08:00 New Revision: badba5118ff5cc6d61aeca6ee2dc2ead5bb5286f URL: https://github.com/llvm/llvm-project/commit/badba5118ff5cc6d61aeca6ee2dc2ead5bb5286f DIFF: https://github.com/llvm/llvm-project/commit/badba5118ff5cc6d61aeca6ee2dc2ead5bb5286f.dif

[clang] bce1cce - [analyzer] Teach MismatchedDealloc about initWithBytesNoCopy with deallocator.

2019-12-18 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-18T14:19:17-08:00 New Revision: bce1cce6bf1286541c57690ab1129fbc02c60f93 URL: https://github.com/llvm/llvm-project/commit/bce1cce6bf1286541c57690ab1129fbc02c60f93 DIFF: https://github.com/llvm/llvm-project/commit/bce1cce6bf1286541c57690ab1129fbc02c60f93.dif

[clang] f0ced2d - [analysis] Re-discard type sugar when casting values retrieved from the Store.

2019-12-18 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-18T18:00:57-08:00 New Revision: f0ced2ddb44e4bd970fec310591891a0cdb4462c URL: https://github.com/llvm/llvm-project/commit/f0ced2ddb44e4bd970fec310591891a0cdb4462c DIFF: https://github.com/llvm/llvm-project/commit/f0ced2ddb44e4bd970fec310591891a0cdb4462c.dif

[clang] b284005 - [analyzer] Add a syntactic security check for ObjC NSCoder API.

2019-12-19 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-19T14:54:29-08:00 New Revision: b284005072122fe4af879725e3c8090009f89ca0 URL: https://github.com/llvm/llvm-project/commit/b284005072122fe4af879725e3c8090009f89ca0 DIFF: https://github.com/llvm/llvm-project/commit/b284005072122fe4af879725e3c8090009f89ca0.dif

[clang] 2203089 - [analyzer] exploded-graph-rewriter: Fix string encodings in python3.

2019-12-21 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2019-12-21T10:59:38-08:00 New Revision: 2203089a60d826e882e2ccfc5cc5d361b4f91078 URL: https://github.com/llvm/llvm-project/commit/2203089a60d826e882e2ccfc5cc5d361b4f91078 DIFF: https://github.com/llvm/llvm-project/commit/2203089a60d826e882e2ccfc5cc5d361b4f91078.dif

[clang] edbf2fd - [analyzer] Fix a strange compile error on a certain Clang-7.0.0

2020-03-11 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-03-11T16:54:34+03:00 New Revision: edbf2fde14a2b50e64ea20a011b2a3242c75b4d9 URL: https://github.com/llvm/llvm-project/commit/edbf2fde14a2b50e64ea20a011b2a3242c75b4d9 DIFF: https://github.com/llvm/llvm-project/commit/edbf2fde14a2b50e64ea20a011b2a3242c75b4d9.dif

[clang] 0eba5dc - [analyzer] Fix modeling some library functions when UCHAR_MAX > INT_MAX.

2020-03-15 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-03-16T07:16:44+03:00 New Revision: 0eba5dc80fb0a65b8bad00998c390ce3ec0c430f URL: https://github.com/llvm/llvm-project/commit/0eba5dc80fb0a65b8bad00998c390ce3ec0c430f DIFF: https://github.com/llvm/llvm-project/commit/0eba5dc80fb0a65b8bad00998c390ce3ec0c430f.dif

[clang] 5521236 - [analyzer] Re-land 0aba69e "Add test directory for scan-build."

2020-02-03 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-02-03T23:59:57+03:00 New Revision: 5521236a18074584542b81fd680158d89a845fca URL: https://github.com/llvm/llvm-project/commit/5521236a18074584542b81fd680158d89a845fca DIFF: https://github.com/llvm/llvm-project/commit/5521236a18074584542b81fd680158d89a845fca.dif

[clang] 4b05fc2 - [analyzer] Suppress linker invocation in scan-build tests.

2020-02-03 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-02-04T00:12:24+03:00 New Revision: 4b05fc248b0068e203f27bea034020f137a6de2c URL: https://github.com/llvm/llvm-project/commit/4b05fc248b0068e203f27bea034020f137a6de2c DIFF: https://github.com/llvm/llvm-project/commit/4b05fc248b0068e203f27bea034020f137a6de2c.dif

[clang] 482e236 - [analyzer] Fix a couple of bugs in HTML report generation.

2020-02-05 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-02-05T17:16:38+03:00 New Revision: 482e236e569e8324f70778af1eb756923cd490dc URL: https://github.com/llvm/llvm-project/commit/482e236e569e8324f70778af1eb756923cd490dc DIFF: https://github.com/llvm/llvm-project/commit/482e236e569e8324f70778af1eb756923cd490dc.dif

[clang] 5a11233 - [analyzer] VforkChecker: allow execve after vfork.

2020-02-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-02-18T09:19:29+03:00 New Revision: 5a11233a2fa58a734dbed23e2232f55cdf4b3321 URL: https://github.com/llvm/llvm-project/commit/5a11233a2fa58a734dbed23e2232f55cdf4b3321 DIFF: https://github.com/llvm/llvm-project/commit/5a11233a2fa58a734dbed23e2232f55cdf4b3321.dif

[clang] a807a06 - [analyzer] Teach scan-build how to rebuild index.html without analyzing.

2020-02-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-02-18T09:19:29+03:00 New Revision: a807a068e6ae58c6b53ad9b0b2004ea0ed0a939f URL: https://github.com/llvm/llvm-project/commit/a807a068e6ae58c6b53ad9b0b2004ea0ed0a939f DIFF: https://github.com/llvm/llvm-project/commit/a807a068e6ae58c6b53ad9b0b2004ea0ed0a939f.dif

[clang] 21efb06 - Revert "[analyzer] Teach scan-build how to rebuild index.html without analyzing."

2020-02-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-02-18T09:48:29+03:00 New Revision: 21efb06f0ae2eb999f566d989997256d6cb12206 URL: https://github.com/llvm/llvm-project/commit/21efb06f0ae2eb999f566d989997256d6cb12206 DIFF: https://github.com/llvm/llvm-project/commit/21efb06f0ae2eb999f566d989997256d6cb12206.dif

[clang] 80fd37f - [analyzer] PthreadLock: Fix return value modeling for XNU lock functions.

2020-01-24 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-01-24T18:43:23+03:00 New Revision: 80fd37f9d66e49994eb06e2613a29a6d7016df6d URL: https://github.com/llvm/llvm-project/commit/80fd37f9d66e49994eb06e2613a29a6d7016df6d DIFF: https://github.com/llvm/llvm-project/commit/80fd37f9d66e49994eb06e2613a29a6d7016df6d.dif

r328066 - [analyzer] Suppress more MallocChecker positives in smart pointer destructors.

2018-03-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Mar 20 17:49:47 2018 New Revision: 328066 URL: http://llvm.org/viewvc/llvm-project?rev=328066&view=rev Log: [analyzer] Suppress more MallocChecker positives in smart pointer destructors. r326249 wasn't quite enough because we often run out of inlining stack depth limit

r328067 - Revert r326782 "[analyzer] CStringChecker.cpp: Remove the duplicated check...".

2018-03-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Mar 20 17:57:37 2018 New Revision: 328067 URL: http://llvm.org/viewvc/llvm-project?rev=328067&view=rev Log: Revert r326782 "[analyzer] CStringChecker.cpp: Remove the duplicated check...". It seems that the refactoring was causing a functional change and some warnings h

r328247 - [analyzer] Make symbol_iterator iterate over SVal's symbolic base.

2018-03-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 22 14:30:58 2018 New Revision: 328247 URL: http://llvm.org/viewvc/llvm-project?rev=328247&view=rev Log: [analyzer] Make symbol_iterator iterate over SVal's symbolic base. If a memory region (or an SVal that represents a pointer to that memory region) is a (direct o

r328248 - [CFG] [analyzer] Add C++17-specific variable and return construction contexts.

2018-03-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 22 14:37:39 2018 New Revision: 328248 URL: http://llvm.org/viewvc/llvm-project?rev=328248&view=rev Log: [CFG] [analyzer] Add C++17-specific variable and return construction contexts. In C++17 copy elision is mandatory for variable and return value constructors (as

r328249 - [CFG] [analyzer] NFC: Move construction context allocation into a helper method.

2018-03-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 22 14:40:24 2018 New Revision: 328249 URL: http://llvm.org/viewvc/llvm-project?rev=328249&view=rev Log: [CFG] [analyzer] NFC: Move construction context allocation into a helper method. Improve readability of ConstructionContext::createFromLayers(). Differential Re

r328253 - [analyzer] Remove an assertion that doesn't hold in C++17.

2018-03-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 22 14:54:48 2018 New Revision: 328253 URL: http://llvm.org/viewvc/llvm-project?rev=328253&view=rev Log: [analyzer] Remove an assertion that doesn't hold in C++17. Function return values can be constructed directly in variables or passed directly into return stateme

r328255 - [CFG] [analyzer] Add C++17-specific ctor-initializer construction contexts.

2018-03-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 22 15:02:38 2018 New Revision: 328255 URL: http://llvm.org/viewvc/llvm-project?rev=328255&view=rev Log: [CFG] [analyzer] Add C++17-specific ctor-initializer construction contexts. CXXCtorInitializer-based constructors are also affected by the C++17 mandatory copy e

r328258 - [analyzer] Enable temporary object destructor inlining by default.

2018-03-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 22 15:05:53 2018 New Revision: 328258 URL: http://llvm.org/viewvc/llvm-project?rev=328258&view=rev Log: [analyzer] Enable temporary object destructor inlining by default. When a temporary is constructed with a proper construction context, it should be safe to inlin

r328893 - [CFG] [analyzer] Avoid modeling C++17 constructors that aren't fully supported.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 12:21:18 2018 New Revision: 328893 URL: http://llvm.org/viewvc/llvm-project?rev=328893&view=rev Log: [CFG] [analyzer] Avoid modeling C++17 constructors that aren't fully supported. Not enough work has been done so far to ensure correctness of construction contex

r328895 - [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 12:25:39 2018 New Revision: 328895 URL: http://llvm.org/viewvc/llvm-project?rev=328895&view=rev Log: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr. Sometimes template instantiation causes CXXBindTemporaryExpr to be missing in its usual spot. I

r328896 - [analyzer] Track null or undef values through pointer arithmetic.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 12:27:42 2018 New Revision: 328896 URL: http://llvm.org/viewvc/llvm-project?rev=328896&view=rev Log: [analyzer] Track null or undef values through pointer arithmetic. Pointer arithmetic on null or undefined pointers results in null or undefined pointers. This is

r328903 - [analyzer] Fix test triple in missing-bind-temporary.cpp.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 14:22:35 2018 New Revision: 328903 URL: http://llvm.org/viewvc/llvm-project?rev=328903&view=rev Log: [analyzer] Fix test triple in missing-bind-temporary.cpp. Otherwise the default triple for x86-windows-msvc2015 auto-inserts __attribute__((thiscall)) to some ca

r329102 - [analyzer] Fix diagnostics in callees of interesting callees.

2018-04-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Apr 3 11:52:30 2018 New Revision: 329102 URL: http://llvm.org/viewvc/llvm-project?rev=329102&view=rev Log: [analyzer] Fix diagnostics in callees of interesting callees. removeUnneededCalls() is responsible for removing path diagnostic pieces within functions that don'

r317565 - [analyzer] pr34779: CStringChecker: Accept non-standard headers.

2017-11-07 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Nov 7 02:51:15 2017 New Revision: 317565 URL: http://llvm.org/viewvc/llvm-project?rev=317565&view=rev Log: [analyzer] pr34779: CStringChecker: Accept non-standard headers. Do not crash when trying to define and call a non-standard strcpy(unsigned char *, unsigned char

r317700 - [analyzer] Fix a crash on logical operators with vectors.

2017-11-08 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Nov 8 09:27:58 2017 New Revision: 317700 URL: http://llvm.org/viewvc/llvm-project?rev=317700&view=rev Log: [analyzer] Fix a crash on logical operators with vectors. Do not crash when trying to compute x && y or x || y where x and y are of a vector type. For now we do

[clang] 9f15f1f - [analyzer] Teach scan-build how to pass -analyzer-config to xcodebuild.

2023-03-28 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2023-03-28T14:34:28-07:00 New Revision: 9f15f1f0f3f58da8600c78c60032299f5ee4d6c5 URL: https://github.com/llvm/llvm-project/commit/9f15f1f0f3f58da8600c78c60032299f5ee4d6c5 DIFF: https://github.com/llvm/llvm-project/commit/9f15f1f0f3f58da8600c78c60032299f5ee4d6c5.dif

[clang] b7bdf19 - [-Wunsafe-buffer-usage] Hide fixits/suggestions behind an extra flag.

2023-05-18 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2023-05-18T17:20:27-07:00 New Revision: b7bdf1996fd195b20b9a2916c9183167650806f1 URL: https://github.com/llvm/llvm-project/commit/b7bdf1996fd195b20b9a2916c9183167650806f1 DIFF: https://github.com/llvm/llvm-project/commit/b7bdf1996fd195b20b9a2916c9183167650806f1.dif

[clang] bb209ce - [-Wtcb-enforcement] Disable on unevaluated code.

2023-06-13 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2023-06-13T14:36:51-07:00 New Revision: bb209ce138e71f2fd646b7f0f865f957336c67e9 URL: https://github.com/llvm/llvm-project/commit/bb209ce138e71f2fd646b7f0f865f957336c67e9 DIFF: https://github.com/llvm/llvm-project/commit/bb209ce138e71f2fd646b7f0f865f957336c67e9.dif

[clang] 200007e - [-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffers.

2022-12-05 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2022-12-05T15:13:42-08:00 New Revision: 27ec85f81122fd260a4e68308e54607ca37a URL: https://github.com/llvm/llvm-project/commit/27ec85f81122fd260a4e68308e54607ca37a DIFF: https://github.com/llvm/llvm-project/commit/27ec85f81122fd260a4e68308e54607ca37a.dif

[clang] bc06177 - Revert "[-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffers."

2022-12-05 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2022-12-05T15:38:52-08:00 New Revision: bc0617795f8bdcd5deab3e48b120107cc2833cdc URL: https://github.com/llvm/llvm-project/commit/bc0617795f8bdcd5deab3e48b120107cc2833cdc DIFF: https://github.com/llvm/llvm-project/commit/bc0617795f8bdcd5deab3e48b120107cc2833cdc.dif

[clang] 3b7af27 - Revert "Revert "[-Wunsafe-buffer-usage] Initial commit - Transition away from raw buffers.""

2022-12-08 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2022-12-08T16:57:59-08:00 New Revision: 3b7af2796b3d1a578b7e256f5e5b60e61108ec8d URL: https://github.com/llvm/llvm-project/commit/3b7af2796b3d1a578b7e256f5e5b60e61108ec8d DIFF: https://github.com/llvm/llvm-project/commit/3b7af2796b3d1a578b7e256f5e5b60e61108ec8d.dif

[clang] 6ab01d4 - [analyzer] Nullability: Enable analysis of non-inlined nullable objc properties.

2022-12-12 Thread Artem Dergachev via cfe-commits
Author: Paul Pelzl Date: 2022-12-12T14:19:26-08:00 New Revision: 6ab01d4a5cbd46f521de89b167571c0754e6c557 URL: https://github.com/llvm/llvm-project/commit/6ab01d4a5cbd46f521de89b167571c0754e6c557 DIFF: https://github.com/llvm/llvm-project/commit/6ab01d4a5cbd46f521de89b167571c0754e6c557.diff LO

[clang] 0d00a97 - [-Wunsafe-buffer-usage] NFC: Introduce an abstraction for fixable code patterns.

2022-12-16 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2022-12-16T15:02:22-08:00 New Revision: 0d00a9722f3ce9d314ddd26a33e22921956b7519 URL: https://github.com/llvm/llvm-project/commit/0d00a9722f3ce9d314ddd26a33e22921956b7519 DIFF: https://github.com/llvm/llvm-project/commit/0d00a9722f3ce9d314ddd26a33e22921956b7519.dif

[clang] 8086323 - [-Wunsafe-buffer-usage] NFC: Implement fix-strategies and variable-use-claiming.

2022-12-16 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2022-12-16T18:48:29-08:00 New Revision: 8086323a91b597e9510d15f14d56d358221ff539 URL: https://github.com/llvm/llvm-project/commit/8086323a91b597e9510d15f14d56d358221ff539 DIFF: https://github.com/llvm/llvm-project/commit/8086323a91b597e9510d15f14d56d358221ff539.dif

r289939 - [analyzer] Add another exception for Qt in MallocChecker

2016-12-16 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 16 06:21:55 2016 New Revision: 289939 URL: http://llvm.org/viewvc/llvm-project?rev=289939&view=rev Log: [analyzer] Add another exception for Qt in MallocChecker Treat pointers passed to QObject::connectImpl() as escaping. rdar://problem/29550440 Differential Revi

r290341 - [analyzer] Improve suppress-on-sink behavior in incomplete analyses.

2016-12-22 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Dec 22 08:48:52 2016 New Revision: 290341 URL: http://llvm.org/viewvc/llvm-project?rev=290341&view=rev Log: [analyzer] Improve suppress-on-sink behavior in incomplete analyses. Warnings with suppress-on-sink are discarded during FlushReports when BugReporter notices th

Re: [PATCH] D23555: [analyzer] CloneDetector now checks template arguments of function calls.

2016-08-16 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: lib/Analysis/CloneDetection.cpp:154 @@ -153,2 +153,3 @@ // Function pointers don't have a callee and we just skip hashing it. -if (S->getDirectCallee()) +if (S->getDirectCallee()) { + // If the function is a template instant

Re: [PATCH] D23550: [analyzer] Small cleanups when checkers retrieving statements from exploded nodes.

2016-08-17 Thread Artem Dergachev via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks for cleaning this up! Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2628 @@ -2647,3 +2627,3 @@ // FIXME: We will eventually need to handle non-statement-base

Re: [PATCH] D16317: [Analyzer] Fix for PR23790: bind real value returned from strcmp when modelling strcmp.

2016-08-17 Thread Artem Dergachev via cfe-commits
NoQ closed this revision. NoQ added a comment. Committed in r270154 (long time ago). https://reviews.llvm.org/D16317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-08-17 Thread Artem Dergachev via cfe-commits
NoQ accepted this revision. NoQ added a reviewer: NoQ. NoQ added a comment. This revision is now accepted and ready to land. Looks good! Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:67 @@ +66,3 @@ + const Stmt *Parent = PM.getParent(Cast); + if (!Parent) +

r278937 - [analyzer] Add LocationContext information to SymbolMetadata.

2016-08-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 17 10:37:52 2016 New Revision: 278937 URL: http://llvm.org/viewvc/llvm-project?rev=278937&view=rev Log: [analyzer] Add LocationContext information to SymbolMetadata. Like SymbolConjured, SymbolMetadata also needs to be uniquely identified by the moment of its birth

r278941 - [analyzer] Add a checker for loss of sign or precision in integral casts.

2016-08-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 17 11:02:45 2016 New Revision: 278941 URL: http://llvm.org/viewvc/llvm-project?rev=278941&view=rev Log: [analyzer] Add a checker for loss of sign or precision in integral casts. This new checker tries to find execution paths on which implicit integral casts cause d

Re: [PATCH] D23112: [analyzer] Correctly add assumptions based on array bounds.

2016-08-18 Thread Artem Dergachev via cfe-commits
NoQ added a comment. On second thought, in `RangeConstraintManager` we need a different functionality. In particular, from `4 * x < 1000` it does not follow that `x < 250` in the general case (due to possible overflows). But in the case of this checker, it doesn't matter - we are always sure th

r279056 - [analyzer] Teach CloneDetector to find clones that look like copy-paste errors.

2016-08-18 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Aug 18 07:29:41 2016 New Revision: 279056 URL: http://llvm.org/viewvc/llvm-project?rev=279056&view=rev Log: [analyzer] Teach CloneDetector to find clones that look like copy-paste errors. The original clone checker tries to find copy-pasted code that is exactly identic

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-20 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: lib/Analysis/CloneDetection.cpp:550 @@ -548,2 +549,3 @@ CloneDetector::CloneSignature SubSignature; +llvm::hash_stream SubHash; Hmm, this still uses `hash_stream`. https://reviews.llvm.org/D22515 _

r279366 - [analyzer] Make CloneDetector consider template arguments.

2016-08-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Sat Aug 20 04:57:21 2016 New Revision: 279366 URL: http://llvm.org/viewvc/llvm-project?rev=279366&view=rev Log: [analyzer] Make CloneDetector consider template arguments. For example, code samples `isa(S)' and `isa(S)' are no longer considered to be clones. Patch by Rapha

r279367 - [analyzer] Make CloneDetector consider macro expansions.

2016-08-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Sat Aug 20 05:06:59 2016 New Revision: 279367 URL: http://llvm.org/viewvc/llvm-project?rev=279367&view=rev Log: [analyzer] Make CloneDetector consider macro expansions. So far macro-generated code was treated by the CloneDetector as normal code. This caused that some macro

r279378 - [analyzer] Use faster hashing (MD5) in CloneDetector.

2016-08-20 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Sat Aug 20 12:35:53 2016 New Revision: 279378 URL: http://llvm.org/viewvc/llvm-project?rev=279378&view=rev Log: [analyzer] Use faster hashing (MD5) in CloneDetector. This replaces the old approach of fingerprinting every AST node into a string, which avoided collisions and

Re: [PATCH] D15227: [analyzer] Valist checkers.

2016-08-21 Thread Artem Dergachev via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D15227#519239, @xazax.hun wrote: > I suspect that slightly different AST is generated for those architectures > that cause the different behavior. I will further investigate those problems. Seems so, because on my machine when i append `-triple

Re: [PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2016-08-22 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: include/clang/Analysis/CloneDetection.h:243 @@ +242,3 @@ +/// clone groups from the given hash group. +virtual bool acceptsHashGroup(const CloneGroup &HashGroup); + I might be wishing a lot, but i've a feeling

Re: [PATCH] D23780: [analyzer] Fixed crash in StmtDataCollector when analyzing methods of template classes.

2016-08-23 Thread Artem Dergachev via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yeah, it seems that these need to be checked. https://reviews.llvm.org/D23780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

r279529 - [analyzer] Fix CloneDetector crash on calling methods of class templates.

2016-08-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Aug 23 11:42:00 2016 New Revision: 279529 URL: http://llvm.org/viewvc/llvm-project?rev=279529&view=rev Log: [analyzer] Fix CloneDetector crash on calling methods of class templates. If a call expression represents a method call of a class template, and the method itsel

Re: [PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2016-08-26 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Here's some pseudo-code of the way i see it. // This interface mimics CloneDetector's interface, hence omnipotent but useless. class BasicConstraint { public: virtual void add(const StmtSequence &S) = 0; virtual vector findClones() = 0; }; // This const

[PATCH] D23963: [analyzer] pr28449 - Move literal rvalue construction away from RegionStore.

2016-08-27 Thread Artem Dergachev via cfe-commits
NoQ created this revision. NoQ added reviewers: zaks.anna, dcoughlin, xazax.hun, a.sidorin. NoQ added a subscriber: cfe-commits. When binding string literal regions to `char` arrays, `RegionStore`'s `bindArray()` method converts the string literals to their lazy compound values before binding. B

Re: [PATCH] D23963: [analyzer] pr28449 - Move literal rvalue construction away from RegionStore.

2016-08-27 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:669 @@ +668,3 @@ + // For structures, check if the respective field is a reference. + // FIXME: What if fields mismatch? + const RecordDecl *RD = RT->getDecl(); Whoops, w

[PATCH] D24278: [analyzer] Extend bug reports with extra notes.

2016-09-06 Thread Artem Dergachev via cfe-commits
NoQ created this revision. NoQ added reviewers: zaks.anna, dcoughlin, xazax.hun, a.sidorin, teemperor, v.g.vassilev. NoQ added a subscriber: cfe-commits. This patch allows injecting extra note-like diagnostics into bug reports, which are separate from path diagnostics. Previously, we could only

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-08 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Thanks for the patch! Not sure why, but i always have warm feelings for the `MallocChecker` and wish it to improve. Added minor style comments, joined the "where to put the code" debate. Comment at: lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:69 @@

Re: [PATCH] D24278: [analyzer] Extend bug reports with extra notes.

2016-09-09 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Thanks! I could have split this up into three patches (one for the core and two patches for the checkers), however that'd mean that the first patch comes without tests; so i thought that the patch should be self-contained. Was it a bad idea after all? Co

Re: [PATCH] D24238: StaticAnalyzer CastToStruct : No memory corruption when casting array to struct

2016-09-09 Thread Artem Dergachev via cfe-commits
NoQ added a subscriber: cfe-commits. NoQ added a comment. Adding cfe-commits as per developer policy. Yeah, it doesn't probably cause the same kind of memory corruption, however i wouldn't call this code safe: it still violates the //strict aliasing rule//, unless the array is of `char`s. I thi

Re: [PATCH] D24238: StaticAnalyzer CastToStruct : No memory corruption when casting array to struct

2016-09-12 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Random thoughts: - This checker doesn't alter the exploded graph, so it cannot be causing or suppressing positives in other checkers. - We should not be adding platform-specific behavior (eg. working as if `sizeof(int) == 1`) without actually ensuring that it is so on that

Re: [PATCH] D21506: [analyzer] Block in critical section

2016-09-12 Thread Artem Dergachev via cfe-commits
NoQ added a comment. I think there's still this problem i've outlined in the comment above: you can step into an integer-underflow if your analysis begins with unlock(). You could just ignore all unlocks that move you below 0, which would be ok. Could you add this test? std::mutex m; void

Re: [PATCH] D20811: [analyzer] Model some library functions

2016-09-15 Thread Artem Dergachev via cfe-commits
NoQ updated this revision to Diff 71510. NoQ marked an inline comment as done. NoQ added a comment. Herald added subscribers: mgorny, beanz. Added a huge amount of macros in order to improve readability of function specs. Other inline comments should have been addressed before. https://reviews.l

r281625 - [analyzer] Fix HTMLRewriter style sheets to support non-webkit browsers.

2016-09-15 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Sep 15 11:25:42 2016 New Revision: 281625 URL: http://llvm.org/viewvc/llvm-project?rev=281625&view=rev Log: [analyzer] Fix HTMLRewriter style sheets to support non-webkit browsers. This fixes rounded corners and shadows of analyzer diagnostic pieces in browsers such as

Re: [PATCH] D20811: [analyzer] Model some library functions

2016-09-16 Thread Artem Dergachev via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D20811#544250, @dcoughlin wrote: > I think a good rule of thumb for readability is: suppose you are a maintainer > and need to add a summary for a new function. Can you copy the the summary > for an existing function and figure out what each comp

Re: [PATCH] D20811: [analyzer] Model some library functions

2016-09-16 Thread Artem Dergachev via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D20811#544927, @dcoughlin wrote: > That said, now that I look at it with 'POSTCONDITION' alone I don't think it > is clear that the provided value describes the return value. What do you > think about renaming it 'RETURN_VALUE'? Or adding back th

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-17 Thread Artem Dergachev via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks good! Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:291 @@ +290,3 @@ + static ProgramStateRef addExtentSize(CheckerContext &C, +

r298698 - [analyzer] Add MisusedMovedObjectChecker for detecting use-after-move errors.

2017-03-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 24 04:52:30 2017 New Revision: 298698 URL: http://llvm.org/viewvc/llvm-project?rev=298698&view=rev Log: [analyzer] Add MisusedMovedObjectChecker for detecting use-after-move errors. The checker currently warns on copying, moving, or calling methods on an object tha

r298699 - [analyzer] MisusedMovedObject: Remove deprecated callback. NFC

2017-03-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 24 05:16:08 2017 New Revision: 298699 URL: http://llvm.org/viewvc/llvm-project?rev=298699&view=rev Log: [analyzer] MisusedMovedObject: Remove deprecated callback. NFC wantsRegionChangeUpdate() checker callback is no longer used since recently. Fixes a buildbot war

r298924 - [analyzer] When creating a temporary object, properly copy the value into it.

2017-03-28 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Mar 28 10:43:26 2017 New Revision: 298924 URL: http://llvm.org/viewvc/llvm-project?rev=298924&view=rev Log: [analyzer] When creating a temporary object, properly copy the value into it. Adjustments should be considered properly; we should copy the unadjusted object ove

r298927 - [analyzer] Fix symbolication for unknown unary increment/decrement results.

2017-03-28 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Mar 28 10:57:12 2017 New Revision: 298927 URL: http://llvm.org/viewvc/llvm-project?rev=298927&view=rev Log: [analyzer] Fix symbolication for unknown unary increment/decrement results. If the value is known, but we cannot increment it, conjure a symbol to represent the

r299544 - [analyzer] Add a modular constraint system to the CloneDetector

2017-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Apr 5 09:17:36 2017 New Revision: 299544 URL: http://llvm.org/viewvc/llvm-project?rev=299544&view=rev Log: [analyzer] Add a modular constraint system to the CloneDetector A big part of the clone detection code is functionality for filtering clones and clone groups bas

r299550 - Revert "[analyzer] Add a modular constraint system to the CloneDetector"

2017-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Apr 5 10:06:17 2017 New Revision: 299550 URL: http://llvm.org/viewvc/llvm-project?rev=299550&view=rev Log: Revert "[analyzer] Add a modular constraint system to the CloneDetector" This reverts commit r299544. Crashes on tests on some buildbots. Removed: cfe/trun

r299653 - [analyzer] Reland r299544 "Add a modular constraint system to the CloneDetector"

2017-04-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 6 09:34:07 2017 New Revision: 299653 URL: http://llvm.org/viewvc/llvm-project?rev=299653&view=rev Log: [analyzer] Reland r299544 "Add a modular constraint system to the CloneDetector" Hopefully fix crashes by unshadowing the variable. Original commit message: A

r300178 - [analyzer] Simplify values in binary operations a bit more aggressively.

2017-04-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 13 02:20:04 2017 New Revision: 300178 URL: http://llvm.org/viewvc/llvm-project?rev=300178&view=rev Log: [analyzer] Simplify values in binary operations a bit more aggressively. SValBuilder tries to constant-fold symbols in the left-hand side of the symbolic express

r300187 - [analyzer] Add numerous assertions to SVal, SymExpr, and MemRegion classes.

2017-04-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 13 04:48:05 2017 New Revision: 300187 URL: http://llvm.org/viewvc/llvm-project?rev=300187&view=rev Log: [analyzer] Add numerous assertions to SVal, SymExpr, and MemRegion classes. Clean up vtable anchors (remove anchors for regions that have regular out-of-line vir

r300189 - [analyzer] Enforce super-region classes for various memory regions.

2017-04-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 13 04:56:07 2017 New Revision: 300189 URL: http://llvm.org/viewvc/llvm-project?rev=300189&view=rev Log: [analyzer] Enforce super-region classes for various memory regions. We now check the type of the super-region pointer for most SubRegion classes in compile time;

r291754 - [analyzer] Avoid a crash in DereferenceChecker on string literal initializers.

2017-01-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Jan 12 03:46:16 2017 New Revision: 291754 URL: http://llvm.org/viewvc/llvm-project?rev=291754&view=rev Log: [analyzer] Avoid a crash in DereferenceChecker on string literal initializers. A hotfix for pr31592 that fixes the crash but not the root cause of the problem. W

r291781 - [analyzer] Don't dereference the array value when binding it to a reference.

2017-01-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Jan 12 12:00:03 2017 New Revision: 291781 URL: http://llvm.org/viewvc/llvm-project?rev=291781&view=rev Log: [analyzer] Don't dereference the array value when binding it to a reference. This replaces the hack in r291754, which was fixing pr31592, which was caused by r29

r292800 - [analyzer] Fix memory space of static locals seen from nested blocks.

2017-01-23 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jan 23 10:57:11 2017 New Revision: 292800 URL: http://llvm.org/viewvc/llvm-project?rev=292800&view=rev Log: [analyzer] Fix memory space of static locals seen from nested blocks. When a block within a function accesses a function's static local variable, this local is c

Re: r292800 - [analyzer] Fix memory space of static locals seen from nested blocks.

2017-01-23 Thread Artem Dergachev via cfe-commits
Hans, Could we merge this one into the 4.0.0 release branch? It's a recent bugfix for the analyzer. Thanks, Artem. On 1/23/17 7:57 PM, Artem Dergachev via cfe-commits wrote: Author: dergachev Date: Mon Jan 23 10:57:11 2017 New Revision: 292800 URL: http://llvm.org/viewvc/llvm-projec

r293043 - [analyzer] Fix MacOSXAPIChecker fp with static locals seen from nested blocks.

2017-01-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 25 04:21:45 2017 New Revision: 293043 URL: http://llvm.org/viewvc/llvm-project?rev=293043&view=rev Log: [analyzer] Fix MacOSXAPIChecker fp with static locals seen from nested blocks. This is an attempt to avoid new false positives caused by the reverted r292800, ho

r293280 - [analyzer] Consider function call arguments while building CallGraph.

2017-01-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Jan 27 06:14:56 2017 New Revision: 293280 URL: http://llvm.org/viewvc/llvm-project?rev=293280&view=rev Log: [analyzer] Consider function call arguments while building CallGraph. Function call can appear in the arguments of another function call, eg.: foo(bar()); Th

Re: r293043 - [analyzer] Fix MacOSXAPIChecker fp with static locals seen from nested blocks.

2017-02-01 Thread Artem Dergachev via cfe-commits
Hans, This is a fixed and tested version of the previously-merged-and-reverted r292800, do we still have time to land this into 4.0? Thanks, Artem. On 1/25/17 1:21 PM, Artem Dergachev via cfe-commits wrote: Author: dergachev Date: Wed Jan 25 04:21:45 2017 New Revision: 293043 URL: http

r306396 - [analyzer] Move zero-size allocation checks to optin.portability.

2017-06-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jun 27 04:14:39 2017 New Revision: 306396 URL: http://llvm.org/viewvc/llvm-project?rev=306396&view=rev Log: [analyzer] Move zero-size allocation checks to optin.portability. This is a new checker package. It contains checkers that highlight well-documented implementati

r308957 - [analyzer] Further improve suppress-on-sink behavior in incomplete analyses.

2017-07-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 25 02:25:10 2017 New Revision: 308957 URL: http://llvm.org/viewvc/llvm-project?rev=308957&view=rev Log: [analyzer] Further improve suppress-on-sink behavior in incomplete analyses. If a certain memory leak (or other similar bug) found by the analyzer is known to be

r308961 - [analyzer] Treat throws as sinks for suppress-on-sink purposes.

2017-07-25 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 25 02:44:02 2017 New Revision: 308961 URL: http://llvm.org/viewvc/llvm-project?rev=308961&view=rev Log: [analyzer] Treat throws as sinks for suppress-on-sink purposes. Because since r308957 the suppress-on-sink feature contains its own mini-analysis, it also needs

r322410 - [analyzer] Don't flag strcpy of string literals into sufficiently large buffers.

2018-01-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Jan 12 14:12:11 2018 New Revision: 322410 URL: http://llvm.org/viewvc/llvm-project?rev=322410&view=rev Log: [analyzer] Don't flag strcpy of string literals into sufficiently large buffers. In the security package, we have a simple syntactic check that warns about strcp

r322774 - [analyzer] operator new: Use the correct region for the constructor.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 14:34:23 2018 New Revision: 322774 URL: http://llvm.org/viewvc/llvm-project?rev=322774&view=rev Log: [analyzer] operator new: Use the correct region for the constructor. The -analyzer-config c++-allocator-inlining experimental option allows the analyzer to reaso

r322775 - [analyzer] NFC: Forbid array elements of void type.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 14:40:36 2018 New Revision: 322775 URL: http://llvm.org/viewvc/llvm-project?rev=322775&view=rev Log: [analyzer] NFC: Forbid array elements of void type. Represent the symbolic value for results of pointer arithmetic on void pointers in a different way: instead o

r322777 - [analyzer] operator new: Model the cast of returned pointer into object type.

2018-01-17 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jan 17 14:51:19 2018 New Revision: 322777 URL: http://llvm.org/viewvc/llvm-project?rev=322777&view=rev Log: [analyzer] operator new: Model the cast of returned pointer into object type. According to [basic.stc.dynamic.allocation], the return type of any C++ overloaded

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