Fix clang-cl build

Fixes "error : use of identifier 'Node' found via unqualified lookup
into dependent bases of class templates is a Microsoft extension
[-Werror,-Wmicrosoft-template]"

Change-Id: Id54cdff24189b73c625f951ae369ec292be4c81b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48340
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Antonio Maiorano 2021-04-19 19:41:02 +00:00 committed by Commit Bot service account
parent 6fcefe4c25
commit ff7c293141
1 changed files with 14 additions and 12 deletions

View File

@ -478,11 +478,11 @@ TYPED_TEST(CloneContextTest, CloneWithInsertAfter) {
} }
TYPED_TEST(CloneContextTest, CloneWithReplaceAll_SameTypeTwice) { TYPED_TEST(CloneContextTest, CloneWithReplaceAll_SameTypeTwice) {
using Node = typename TestFixture::Node; std::string node_name = TypeInfo::Of<typename TestFixture::Node>().name;
std::string node_name = TypeInfo::Of<Node>().name;
EXPECT_FATAL_FAILURE( EXPECT_FATAL_FAILURE(
{ {
using Node = typename TestFixture::Node;
ProgramBuilder cloned; ProgramBuilder cloned;
Program original; Program original;
CloneContext ctx(&cloned, &original); CloneContext ctx(&cloned, &original);
@ -495,13 +495,15 @@ TYPED_TEST(CloneContextTest, CloneWithReplaceAll_SameTypeTwice) {
} }
TYPED_TEST(CloneContextTest, CloneWithReplaceAll_BaseThenDerived) { TYPED_TEST(CloneContextTest, CloneWithReplaceAll_BaseThenDerived) {
using Node = typename TestFixture::Node; std::string node_name = TypeInfo::Of<typename TestFixture::Node>().name;
using Replaceable = typename TestFixture::Replaceable; std::string replaceable_name =
std::string node_name = TypeInfo::Of<Node>().name; TypeInfo::Of<typename TestFixture::Replaceable>().name;
std::string replaceable_name = TypeInfo::Of<Replaceable>().name;
EXPECT_FATAL_FAILURE( EXPECT_FATAL_FAILURE(
{ {
using Node = typename TestFixture::Node;
using Replaceable = typename TestFixture::Replaceable;
ProgramBuilder cloned; ProgramBuilder cloned;
Program original; Program original;
CloneContext ctx(&cloned, &original); CloneContext ctx(&cloned, &original);
@ -514,13 +516,14 @@ TYPED_TEST(CloneContextTest, CloneWithReplaceAll_BaseThenDerived) {
} }
TYPED_TEST(CloneContextTest, CloneWithReplaceAll_DerivedThenBase) { TYPED_TEST(CloneContextTest, CloneWithReplaceAll_DerivedThenBase) {
using Node = typename TestFixture::Node; std::string node_name = TypeInfo::Of<typename TestFixture::Node>().name;
using Replaceable = typename TestFixture::Replaceable; std::string replaceable_name =
std::string node_name = TypeInfo::Of<Node>().name; TypeInfo::Of<typename TestFixture::Replaceable>().name;
std::string replaceable_name = TypeInfo::Of<Replaceable>().name;
EXPECT_FATAL_FAILURE( EXPECT_FATAL_FAILURE(
{ {
using Node = typename TestFixture::Node;
using Replaceable = typename TestFixture::Replaceable;
ProgramBuilder cloned; ProgramBuilder cloned;
Program original; Program original;
CloneContext ctx(&cloned, &original); CloneContext ctx(&cloned, &original);
@ -546,10 +549,9 @@ TYPED_TEST(CloneContextTest, CloneWithReplaceAll_SymbolsTwice) {
} }
TYPED_TEST(CloneContextTest, CloneWithReplace_WithNotANode) { TYPED_TEST(CloneContextTest, CloneWithReplace_WithNotANode) {
using Node = typename TestFixture::Node;
EXPECT_FATAL_FAILURE( EXPECT_FATAL_FAILURE(
{ {
using Node = typename TestFixture::Node;
Allocator allocator; Allocator allocator;
ProgramBuilder builder; ProgramBuilder builder;
auto* original_root = auto* original_root =