=?utf-8?q?Björn?= Svensson <[email protected]>,
=?utf-8?q?Björn?= Svensson <[email protected]>,
=?utf-8?q?Björn?= Svensson <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -162,7 +162,8 @@ static std::string replacementExpression(const ASTContext
&Context,
if (const auto *EC = dyn_cast<ExprWithCleanups>(E))
E = EC->getSubExpr();
- const bool NeedsStaticCast = needsStaticCast(E);
+ const bool NeedsStaticCast =
+ Context.getLangOpts().CPlusPlus && needsStaticCast(E);
----------------
vbvictor wrote:
So casting is never needed for `C` code?
Maybe we should introduce `(bool)(...)` cast instead of `static_cast<>(...)`
for C code?
https://github.com/llvm/llvm-project/pull/178392
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits