mgehre / llvm-project

The home of the clang-based implementation of lifetime safety warnings.
39 stars 4 forks source link

Recognize `std::vector<bool>` as Owner with libc++ #77

Open mgehre opened 5 years ago

mgehre commented 5 years ago

See

auto f() {
#ifndef _LIBCPP_VERSION
    auto i = std::vector<bool>{}.begin();
    // expected-warning@-1 {{object backing the pointer will be destroyed}}
#endif

in lifetime-integration-tests/lifetime-attr-test.cpp. We correctly annotate the specialization with libstdc++.