[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

Morris Hafner via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 26 11:05:12 PDT 2025


================
@@ -170,7 +170,7 @@ mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) {
   SourceLocation loc = e->getExprLoc();
 
   assert(!cir::MissingFeatures::pgoUse());
-  if (const MemberPointerType *MPT = e->getType()->getAs<MemberPointerType>()) {
+  if (e->getType()->getAs<MemberPointerType>()) {
----------------
mmha wrote:

I wonder why `getAs` is not `[[nodiscard]]` but hey it's not so no new warning here.

(Maybe `isa` is still better?)

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


More information about the cfe-commits mailing list