Files
Anthony Latsis 9ac54dd6d9 Adjust to "[ADT] Remove ArrayRef(std::nullopt_t) (#165831)"
```
unittests/AST/DiagnosticConsumerTests.cpp:70:12: note: in instantiation of function template specialization 'std::make_unique<(anonymous namespace)::ExpectationDiagnosticConsumer, std::nullptr_t, const std::nullopt_t &, 0>' requested here
   70 |       std::make_unique<ExpectationDiagnosticConsumer>(nullptr, std::nullopt);
      |            ^
unittests/AST/DiagnosticConsumerTests.cpp:29:5: note: candidate constructor not viable: no known conversion from 'const std::nullopt_t' to 'ArrayRef<ExpectedDiagnostic>' (aka 'ArrayRef<Located<StringRef>>') for 2nd argument
   29 |     ExpectationDiagnosticConsumer(ExpectationDiagnosticConsumer *previous,
      |     ^
```

The offending commit removed the deprecated ArrayRef(std::nullopt_t)
constructor, so passing std::nullopt where an empty ArrayRef is expected
no longer compiles. Replace the std::nullopt arguments with an
explicitly-typed empty ArrayRef<ExpectedDiagnostic>(); a braced {} cannot
be used here because the arguments are forwarded through std::make_unique
and would not be deducible.

See https://github.com/llvm/llvm-project/commit/cfbb4cc31215d615f605466aef0bcfb42aa9faa5 (https://github.com/llvm/llvm-project/pull/165831)

Assisted-by: Claude Code
2026-07-10 20:09:40 +01:00
..
2024-10-31 11:32:40 +00:00