llvm.org GIT mirror llvm / 23427ae
[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 Francis Ricci 2 years ago
1 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
439439 this->assertValuesInOrder(this->theVector, 3u, 1, 7, 7);
440440 }
441441
442 struct output_iterator {
443 typedef std::output_iterator_tag iterator_category;
444 typedef int value_type;
445 typedef int difference_type;
446 typedef value_type *pointer;
447 typedef value_type &reference;
448 operator int() { return 2; }
449 operator Constructable() { return 7; }
450 };
451
442452 TYPED_TEST(SmallVectorTest, AppendRepeatedNonForwardIterator) {
443453 SCOPED_TRACE("AppendRepeatedTest");
444
445 struct output_iterator {
446 typedef LLVM_ATTRIBUTE_USED std::output_iterator_tag iterator_category;
447 typedef LLVM_ATTRIBUTE_USED int value_type;
448 typedef LLVM_ATTRIBUTE_USED int difference_type;
449 typedef LLVM_ATTRIBUTE_USED value_type *pointer;
450 typedef LLVM_ATTRIBUTE_USED value_type &reference;
451 operator int() { return 2; }
452 operator Constructable() { return 7; }
453 };
454454
455455 this->theVector.push_back(Constructable(1));
456456 this->theVector.append(output_iterator(), output_iterator());