Issue |
154755
|
Summary |
Clang-tidy invalid suggestion: performance-unnecessary-value-param
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
joker-eph
|
With clang-tidy built at current head and applying it on MLIR:
```
$ bin/clang-tidy -p build mlir/lib/Bindings/Python/IRCore.cpp --checks=-*,performance-unnecessary-value-param -fix -fix-errors
```
One of the hunk is:
```
@@ -196,7 +197,7 @@ operations.
/// Helper for creating an @classmethod.
template <class Func, typename... Args>
-static nb::object classmethod(Func f, Args... args) {
+static nb::object classmethod(Func f, const Args... &args) {
nb::object cf = nb::cpp_function(f, args...);
return nb::borrow<nb::object>((PyClassMethod_New(cf.ptr())));
}
```
But clang does not agree:
```
mlir/lib/Bindings/Python/IRCore.cpp:200:49: error: '...' must immediately precede declared identifier
200 | static nb::object classmethod(Func f, const Args... &args) {
| ^~~
| ...
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs