-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed as not planned
Closed as not planned
Copy link
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerworksformeResolved as "works for me"Resolved as "works for me"
Description
https://godbolt.org/z/zes3e9jfr
This is a new false negative
#include<string>
#include <vector>
template <typename T>
struct [[gsl::Owner]] StatusOr {
const T &value() [[clang::lifetimebound]];
};
template<typename T>
struct [[gsl::Pointer]] Span {
Span(const std::vector<T> &V): V(V){}
const std::vector<T> &V;
};
// Pointer<Owner<Pointer>>> from Owner<Pointer>
Span<int*> test9(std::vector<int*> V) {
return V; // No diagnsotic
}
cc @hokein
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerworksformeResolved as "works for me"Resolved as "works for me"