-
Notifications
You must be signed in to change notification settings - Fork 15k
Closed
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 analyzerrelease:backportrelease:cherry-pick-failed
Milestone
Description
Hi!
Would be amazing if the following is caught to:
https://godbolt.org/z/5ze9s5roj
#include <utility>
struct Struct {
std::pair<int, int> member;
const auto* foo() const [[clang::lifetimebound]] { return &member; }
};
int main() {
// auto& caught = *Struct().foo();
auto& not_caught = Struct().foo()->second; // this is a bug
(void)not_caught;
}
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 analyzerrelease:backportrelease:cherry-pick-failed
Type
Projects
Status
Done