================
@@ -74,29 +93,63 @@ struct IntraSuppressedObj {
};
IntraSuppressedObj &intra_suppressed(IntraSuppressedObj &obj); //
expected-warning {{'lifetimebound' attribute on this definition is not visible
to callers before the definition; add it to the declaration instead}}
+// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:{{[0-9]+}}-[[@LINE-1]]:{{[0-9]+}}}:"
{{\[\[clang::lifetimebound\]\]}}"
+
IntraSuppressedObj &intra_suppressed(
IntraSuppressedObj &obj [[clang::lifetimebound]]) { // expected-note
{{'lifetimebound' attribute appears here on the definition}}
return obj;
}
struct View {
friend View friend_redecl(MyObj &obj); // expected-warning {{'lifetimebound'
attribute on this definition is not visible to callers before the definition;
add it to the declaration instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:{{[0-9]+}}-[[@LINE-1]]:{{[0-9]+}}}:"
{{\[\[clang::lifetimebound\]\]}}"
};
// FIXME: This diagnoses an attribute inherited from another redeclaration,
not one written on the definition. Once we enforce that redeclarations agree on
lifetimebound, handle this with a dedicated warning and note.
View friend_redecl(MyObj &obj [[clang::lifetimebound]]); // expected-note
{{'lifetimebound' attribute appears here on the definition}}
-
----------------
usx95 wrote:
nit: unintentional line delete ?
https://github.com/llvm/llvm-project/pull/199149
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits