-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Labels
clang:temporal-safetyIssue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)Issue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)false-positiveWarning fires when it should notWarning fires when it should not
Description
https://gcc.godbolt.org/z/aMzvxerna
struct [[gsl::Pointer]] view {};
struct S {
view s;
};
struct [[gsl::Owner]] Q {
const S* get() const [[clang::lifetimebound]];
};
view g(view b, int c) {
return c > 1 ? Q().get()->s : b;
}
Metadata
Metadata
Assignees
Labels
clang:temporal-safetyIssue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)Issue/FR relating to the lifetime analysis in Clang (-Wdangling, -Wreturn-local-addr)false-positiveWarning fires when it should notWarning fires when it should not
Type
Projects
Status
No status