You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Blocking methods of a local CXXRecordDecl do not generate diagnostics
110
110
// for the outer function.
111
-
structFunctor1 {
111
+
structF1 {
112
112
voidmethod() { void* ptr = newint; }
113
113
};
114
+
115
+
// Skipping the CXXRecordDecl does not skip a following VarDecl.
116
+
structF2 {
117
+
F2() { void* ptr = newint; } // expected-note {{constructor cannot be inferred 'nonblocking' because it allocates or deallocates memory}}
118
+
} f2; // expected-warning {{function with 'nonblocking' attribute must not call non-'nonblocking' constructor 'nb8d()::F2::F2'}}
119
+
120
+
// Nonblocking methods of a local CXXRecordDecl are verified independently.
121
+
structF3 {
122
+
voidmethod() [[clang::nonblocking]] { void* ptr = newint; }// expected-warning {{function with 'nonblocking' attribute must not allocate or deallocate memory}}
123
+
};
114
124
}
115
125
116
126
// Make sure template expansions are found and verified.
0 commit comments