[ADT][NFC] Use declval to suppress warning for nullptr use.
authorYeting Kuo <yeting.kuo@sifive.com>
Mon, 6 Mar 2023 15:52:09 +0000 (23:52 +0800)
committerYeting Kuo <yeting.kuo@sifive.com>
Tue, 7 Mar 2023 00:12:40 +0000 (08:12 +0800)
commit260bae5ba27cde110590c28941966a6e02df5325
treed798ca419db13436a7277233f56285266f59cc34
parentd8e077e2caebc1415fb7af1714dd436adf99b6bf
[ADT][NFC] Use declval to suppress warning for nullptr use.

The patch uses declval instead of nullptr to suppress warning for calling member
function by nullptr. Also the patch replace is_same<*>::value with is_same_v<*>.

Reviewed By: dexonsmith, kuhar

Differential Revision: https://reviews.llvm.org/D145388
llvm/unittests/ADT/RangeAdapterTest.cpp