[llvm] [Remarks] Remove an upcast footgun. NFC (PR #142191)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri May 30 12:48:58 PDT 2025


================
@@ -712,16 +711,16 @@ class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
     *this << Msg.str();
   }
 
-  const Value *getCodeRegion() const { return CodeRegion; }
+  const BasicBlock *getCodeRegion() const { return CodeRegion; }
 
   static bool classof(const DiagnosticInfo *DI) {
     return DI->getKind() >= DK_FirstRemark && DI->getKind() <= DK_LastRemark;
   }
 
 private:
-  /// The IR value (currently basic block) that the optimization operates on.
+  /// The IR value that the optimization operates on.
----------------
fhahn wrote:

```suggestion
  /// The IR region (currently basic block) that the optimization operates on.
```

Should not refer to IR value now that it is BasicBlock *

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


More information about the llvm-commits mailing list