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

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

2019-03-21 Thread Alexander Kornienko via cfe-commits
Thanks for the fix! Meanwhile, I found a couple of code samples that trigger this assertion with a slightly different stack trace. Not sure if they are substantially different though. #1: $ cat t.cc inline namespace a { class b typedef c; } class A {}; namespace a { class b : A {}; } // namespace

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

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

2019-03-19 Thread Richard Smith via cfe-commits
On Tue, 19 Mar 2019 at 10:24, Artem Dergachev via cfe-commits wrote: > > Hi, > > I'll try to fix this ASAP! 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.) Eith

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

2019-03-19 Thread Alexander Kornienko via cfe-commits
On Tue, Mar 19, 2019 at 6:24 PM Artem Dergachev wrote: > Hi, > > I'll try to fix this ASAP! > Thanks! > It sounds as if i don't have nearly enough C++17 codebases for testing, > are there any obvious open-source projects that you could recommend? No, but this particular example comes from C++

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

2019-03-19 Thread Artem Dergachev via cfe-commits
Hi, I'll try to fix this ASAP! It sounds as if i don't have nearly enough C++17 codebases for testing, are there any obvious open-source projects that you could recommend? I'd love to try to reincarnate http://green.lab.llvm.org/green/view/Experimental/job/StaticAnalyzerBenchmarks/ with thos

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

2019-03-19 Thread Alexander Kornienko via cfe-commits
Filed this as https://bugs.llvm.org/show_bug.cgi?id=41142. Any hope for a prompt fix here? On Tue, Mar 19, 2019 at 5:34 PM Alexander Kornienko wrote: > A reduced test case: > $ cat test-RegionStoreManager__bindStruct.cc > struct a {}; > class b : a {}; > b c() { b d{c()}; } > $ ./clang-tidy -che

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

2019-03-19 Thread Alexander Kornienko via cfe-commits
A reduced test case: $ cat test-RegionStoreManager__bindStruct.cc struct a {}; class b : a {}; b c() { b d{c()}; } $ ./clang-tidy -checks="-*,clang-analyzer*" test-RegionStoreManager__bindStruct.cc -- -std=c++17 assert.h assertion failed at tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2362 i

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

2019-03-18 Thread Alexander Kornienko via cfe-commits
On Fri, Mar 15, 2019 at 1:21 AM Artem Dergachev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > 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

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