diff options
author | Nathan James <n.james93@hotmail.co.uk> | 2022-11-08 12:22:50 +0000 |
---|---|---|
committer | Nathan James <n.james93@hotmail.co.uk> | 2022-11-08 12:22:52 +0000 |
commit | 1834a310d060d55748ca38d4ae0482864c2047d8 (patch) | |
tree | 79ab63f0548b07d61a75dd909731ca7a6ecc17b1 /llvm/unittests/Analysis/CallGraphTest.cpp | |
parent | 94738a5ac34283bb034b022602b9f9e93d67081f (diff) | |
download | llvm-1834a310d060d55748ca38d4ae0482864c2047d8.zip llvm-1834a310d060d55748ca38d4ae0482864c2047d8.tar.gz llvm-1834a310d060d55748ca38d4ae0482864c2047d8.tar.bz2 |
[llvm][NFC] Use c++17 style variable type traits
This was done as a test for D137302 and it makes sense to push these changes
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D137493
Diffstat (limited to 'llvm/unittests/Analysis/CallGraphTest.cpp')
-rw-r--r-- | llvm/unittests/Analysis/CallGraphTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/unittests/Analysis/CallGraphTest.cpp b/llvm/unittests/Analysis/CallGraphTest.cpp index 0060d2c..566733f 100644 --- a/llvm/unittests/Analysis/CallGraphTest.cpp +++ b/llvm/unittests/Analysis/CallGraphTest.cpp @@ -23,11 +23,11 @@ template <typename Ty> void canSpecializeGraphTraitsIterators(Ty *G) { auto X = ++I; // Should be able to iterate over all nodes of the graph. - static_assert(std::is_same<decltype(*I), NodeRef>::value, + static_assert(std::is_same_v<decltype(*I), NodeRef>, "Node type does not match"); - static_assert(std::is_same<decltype(*X), NodeRef>::value, + static_assert(std::is_same_v<decltype(*X), NodeRef>, "Node type does not match"); - static_assert(std::is_same<decltype(*E), NodeRef>::value, + static_assert(std::is_same_v<decltype(*E), NodeRef>, "Node type does not match"); NodeRef N = GraphTraits<Ty *>::getEntryNode(G); @@ -36,9 +36,9 @@ template <typename Ty> void canSpecializeGraphTraitsIterators(Ty *G) { auto F = GraphTraits<NodeRef>::child_end(N); // Should be able to iterate over immediate successors of a node. - static_assert(std::is_same<decltype(*S), NodeRef>::value, + static_assert(std::is_same_v<decltype(*S), NodeRef>, "Node type does not match"); - static_assert(std::is_same<decltype(*F), NodeRef>::value, + static_assert(std::is_same_v<decltype(*F), NodeRef>, "Node type does not match"); } |