[all-commits] [llvm/llvm-project] ff4faa: [mlir][examples] Fix deprecation warnings for `Arr...

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Mon Jun 30 15:14:54 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ff4faaa660e1e9e844f8d6d15f55d810411d9642
      https://github.com/llvm/llvm-project/commit/ff4faaa660e1e9e844f8d6d15f55d810411d9642
  Author: Jakub Kuderski <jakub at nod-labs.com>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M mlir/examples/toy/Ch2/include/toy/Ops.td
    M mlir/examples/toy/Ch3/include/toy/Ops.td
    M mlir/examples/toy/Ch4/include/toy/Ops.td
    M mlir/examples/toy/Ch5/include/toy/Ops.td
    M mlir/examples/toy/Ch6/include/toy/Ops.td
    M mlir/examples/toy/Ch7/include/toy/Ops.td

  Log Message:
  -----------
  [mlir][examples] Fix deprecation warnings for `ArrayRef(std::nullopt)` (#146420)

This used to print:
```
llvm-project/mlir/include/mlir/IR/ValueRange.h:401:20: warning: 'ArrayRef' is deprecated: Use {} or ArrayRef<T>() instead [-Wdeprecated-declarations]
  401 |       : ValueRange(ArrayRef<Value>(std::forward<Arg>(arg))) {}
      |                    ^~~~~~~~
      |                    {}
build/tools/mlir/examples/toy/Ch7/include/toy/Ops.cpp.inc:2221:30: note: in instantiation of function template specialization 'mlir::ValueRange::ValueRange<const std::nullopt_t &, void>' requested here
 2221 |  build(odsBuilder, odsState, std::nullopt); 
      |                              ^
llvm-project/llvm/include/llvm/ADT/ArrayRef.h:70:18: note: 'ArrayRef' has been explicitly marked deprecated here
   70 |     /*implicit*/ LLVM_DEPRECATED("Use {} or ArrayRef<T>() instead", "{}")
      |                  ^
llvm-project/llvm/include/llvm/Support/Compiler.h:249:50: note: expanded from macro 'LLVM_DEPRECATED'
  249 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list