[clang-tools-extra] [clang-tidy][mlir] Expand to cover pointer of builder (PR #159423)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 1 15:46:47 PDT 2025
================
@@ -40,22 +48,34 @@ void g(mlir::OpBuilder &b) {
b.create<T>(b.getUnknownLoc(), "gaz");
}
+class CustomBuilder : public mlir::ImplicitLocOpBuilder {
+public:
+ mlir::NamedOp f(const char *name) {
+ // CHECK-MESSAGES: :[[@LINE+2]]:12: warning: use 'OpType::create(builder, ...)'
+ // CHECK-FIXES: return mlir::NamedOp::create(*this, name);
+ return create<mlir::NamedOp>(name);
----------------
vbvictor wrote:
Can we add test with
```cpp
using mlir;
create<NamedOp>(name);
```
https://github.com/llvm/llvm-project/pull/159423
More information about the cfe-commits
mailing list