[clang] [clang] The ms-extension __noop should return zero in a constexpr context. (PR #106849)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 1 00:52:35 PDT 2024


================
@@ -12720,8 +12720,8 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
   }
 
   case Builtin::BI__noop:
-  // __noop always evaluates successfully
-    return true;
+    // __noop always evaluates successfully
+    return ZeroInitialization(E);
----------------
tbaederr wrote:

```suggestion
    // __noop always evaluates successfully and returns 0.
    return Success(0, E);
```

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


More information about the cfe-commits mailing list