[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu May 16 06:16:44 PDT 2024


================
@@ -4669,6 +4679,13 @@ class BlockDecl : public Decl, public DeclContext {
 
   SourceRange getSourceRange() const override LLVM_READONLY;
 
+  FunctionEffectsRef getFunctionEffects() const {
+    if (TypeSourceInfo *TSI = getSignatureAsWritten())
+      if (auto *FPT = TSI->getType()->getAs<FunctionProtoType>())
----------------
AaronBallman wrote:

```suggestion
    if (const TypeSourceInfo *TSI = getSignatureAsWritten())
      if (const auto *FPT = TSI->getType()->getAs<FunctionProtoType>())
```

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


More information about the cfe-commits mailing list