From ff7c293141a9c60b31fd7ffe907af136661c54e1 Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Mon, 19 Apr 2021 19:41:02 +0000 Subject: [PATCH] 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 Commit-Queue: Antonio Maiorano Reviewed-by: Ben Clayton --- src/clone_context_test.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/clone_context_test.cc b/src/clone_context_test.cc index a038f6b056..de8c9e4a1e 100644 --- a/src/clone_context_test.cc +++ b/src/clone_context_test.cc @@ -478,11 +478,11 @@ TYPED_TEST(CloneContextTest, CloneWithInsertAfter) { } TYPED_TEST(CloneContextTest, CloneWithReplaceAll_SameTypeTwice) { - using Node = typename TestFixture::Node; - std::string node_name = TypeInfo::Of().name; + std::string node_name = TypeInfo::Of().name; EXPECT_FATAL_FAILURE( { + using Node = typename TestFixture::Node; ProgramBuilder cloned; Program original; CloneContext ctx(&cloned, &original); @@ -495,13 +495,15 @@ TYPED_TEST(CloneContextTest, CloneWithReplaceAll_SameTypeTwice) { } TYPED_TEST(CloneContextTest, CloneWithReplaceAll_BaseThenDerived) { - using Node = typename TestFixture::Node; - using Replaceable = typename TestFixture::Replaceable; - std::string node_name = TypeInfo::Of().name; - std::string replaceable_name = TypeInfo::Of().name; + std::string node_name = TypeInfo::Of().name; + std::string replaceable_name = + TypeInfo::Of().name; EXPECT_FATAL_FAILURE( { + using Node = typename TestFixture::Node; + using Replaceable = typename TestFixture::Replaceable; + ProgramBuilder cloned; Program original; CloneContext ctx(&cloned, &original); @@ -514,13 +516,14 @@ TYPED_TEST(CloneContextTest, CloneWithReplaceAll_BaseThenDerived) { } TYPED_TEST(CloneContextTest, CloneWithReplaceAll_DerivedThenBase) { - using Node = typename TestFixture::Node; - using Replaceable = typename TestFixture::Replaceable; - std::string node_name = TypeInfo::Of().name; - std::string replaceable_name = TypeInfo::Of().name; + std::string node_name = TypeInfo::Of().name; + std::string replaceable_name = + TypeInfo::Of().name; EXPECT_FATAL_FAILURE( { + using Node = typename TestFixture::Node; + using Replaceable = typename TestFixture::Replaceable; ProgramBuilder cloned; Program original; CloneContext ctx(&cloned, &original); @@ -546,10 +549,9 @@ TYPED_TEST(CloneContextTest, CloneWithReplaceAll_SymbolsTwice) { } TYPED_TEST(CloneContextTest, CloneWithReplace_WithNotANode) { - using Node = typename TestFixture::Node; - EXPECT_FATAL_FAILURE( { + using Node = typename TestFixture::Node; Allocator allocator; ProgramBuilder builder; auto* original_root =