steakhal wrote: > > @Xazax-hun Could you please check out this branch and build it on linux to > > see if you could reproduce the CI failure? No matter what I do, I can't > > reproduce the failure. > > You should build the `ClangScalableAnalysisTests` target and run the > > `build/tools/clang/unittests/Analysis/Scalable/ClangScalableAnalysisTests` > > executable. > > Managed to reproduce the issue.
Okay, it turns out that `std::vector` elements might not be destructed in reverse order. In the GNU std lib, and in the mcvc stn they happen to be destructed in the order of creation, while in libcxx (clang stdlib) they are destroyed in reverse order (as I thought they should be). https://godbolt.org/z/EWf9cojaG ```c++ #include <iostream> #include <vector> struct Chatty { Chatty(int n) : n(n) { std::cerr << "created " << n << "\n"; } ~Chatty() { std::cerr << "destroyed " << n << "\n"; } int n; }; int main() { std::vector<Chatty> objs; objs.reserve(3); objs.emplace_back(10); objs.emplace_back(20); objs.emplace_back(30); } ``` On my Darwin, we are using libcxx, so the reverse destruction was in effect, while on linux, by default clang uses the GNU stdlib, where the opposite was true, hence the broken test. I'll adjust the test to side-step this. https://github.com/llvm/llvm-project/pull/173290 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
