[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 05:52:27 PDT 2024


================
@@ -908,9 +936,9 @@ class Analyzer {
     static bool isSafeBuiltinFunction(const FunctionDecl *FD) {
       unsigned BuiltinID = FD->getBuiltinID();
       switch (BuiltinID) {
-      case 0: // not builtin
+      case 0: // Not builtin.
         return false;
-      default: // not disallowed via cases below
+      default: // Not disallowed via cases below.
         return true;
 
       // Disallow list
----------------
Sirraide wrote:

Not sure if I already pointed that out somewhere, but you might want to go through `Builtins.td` and see if you can find anything else that would be problematic if you haven’t already done that (I’m not really familiar w/ realtime systems, but I’d imagine that you probably don’t want to call e.g. `__builtin_longjmp` either).

Also, I looked into TableGen’ing some of this, and I’m not sure it’s really worth it just now (if/when we add more effects in the future, it probably will be, but I think it’s easier to cross that bridge when we get to it because doing that now would be adding a lot of code for what would currently amount to a fairly minor usability improvement). Feel free to add a FIXME for that though. ;Þ

https://github.com/llvm/llvm-project/pull/99656


More information about the cfe-commits mailing list