[clang] Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are (PR #111224)
Doug Wyatt via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 4 18:36:12 PDT 2024
================
@@ -156,6 +156,16 @@ void nb10(
static_cast<void (*)()>(fp1)(); // expected-warning {{function with 'nonblocking' attribute must not call non-'nonblocking' expression}}
}
+// Expression involving indirection
+int nb10a() [[clang::nonblocking]];
+int nb10b() [[clang::nonblocking]];
+
+int nb10c(bool x) [[clang::nonblocking]]
+{
+ // Warns that the expression is not nonblocking.
----------------
dougsonos wrote:
Oops that comment is left over from when the test was failing on main :)
https://github.com/llvm/llvm-project/pull/111224
More information about the cfe-commits
mailing list