Skip to content
Commit a365f293 authored by Kazu Hirata's avatar Kazu Hirata
Browse files

[Support] Use a custom base class for FormatVariadicTest.cpp (NFC)

This patch replaces None with a custom base class in
FormatVariadicTest.cpp.

As part of the migration from llvm::Optional to std::optional, I'd
like to define None as std::nullopt, but FormatVariadicTest.cpp blocks
that.

When you specialize indexed_accessor_range with the base class being
None, the template instantiation eventually generates code to compare
two instances of None.  That's not guaranteed with std::nullopt.

Replacing None with a custom base class allows me to define None as
std::nullopt.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

Differential Revision: https://reviews.llvm.org/D138381
parent a59ed8fa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment