From: Francis Ricci Date: Mon, 12 Jun 2017 14:19:25 +0000 (+0000) Subject: [ADT] Don't use __used__ attribute on struct members in unit test X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23427ae6728770cbd8019d08d7c8e88bc1be2af3;p=llvm [ADT] Don't use __used__ attribute on struct members in unit test On some compilers, __used__ can only be applied to variables or functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305188 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/ADT/SmallVectorTest.cpp b/unittests/ADT/SmallVectorTest.cpp index bf81e6a1c8b..9c501bbdf1a 100644 --- a/unittests/ADT/SmallVectorTest.cpp +++ b/unittests/ADT/SmallVectorTest.cpp @@ -440,19 +440,19 @@ TYPED_TEST(SmallVectorTest, AppendNonIterTest) { this->assertValuesInOrder(this->theVector, 3u, 1, 7, 7); } +struct output_iterator { + typedef std::output_iterator_tag iterator_category; + typedef int value_type; + typedef int difference_type; + typedef value_type *pointer; + typedef value_type &reference; + operator int() { return 2; } + operator Constructable() { return 7; } +}; + TYPED_TEST(SmallVectorTest, AppendRepeatedNonForwardIterator) { SCOPED_TRACE("AppendRepeatedTest"); - struct output_iterator { - typedef LLVM_ATTRIBUTE_USED std::output_iterator_tag iterator_category; - typedef LLVM_ATTRIBUTE_USED int value_type; - typedef LLVM_ATTRIBUTE_USED int difference_type; - typedef LLVM_ATTRIBUTE_USED value_type *pointer; - typedef LLVM_ATTRIBUTE_USED value_type &reference; - operator int() { return 2; } - operator Constructable() { return 7; } - }; - this->theVector.push_back(Constructable(1)); this->theVector.append(output_iterator(), output_iterator()); this->assertValuesInOrder(this->theVector, 3u, 1, 7, 7);