Skip to content

Commit 326ceb6

Browse files
committed
Fix some test failures
1 parent ef42900 commit 326ceb6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

clang-tools-extra/clangd/unittests/ASTTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ TEST(GetDeducedType, KwAutoKwDecltypeExpansion) {
8080
namespace std
8181
{
8282
template<class _E>
83-
class [[initializer_list]] {};
83+
class [[initializer_list]] { const _E *a, *b; };
8484
}
8585
8686
^auto i = {1,2};

clang-tools-extra/clangd/unittests/XRefsTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ TEST(LocateSymbol, All) {
771771
namespace std
772772
{
773773
template<class _E>
774-
class [[initializer_list]] {};
774+
class [[initializer_list]] { const _E *a, *b; };
775775
}
776776
777777
^auto i = {1,2};

clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ TEST(WalkAST, Enums) {
534534
TEST(WalkAST, InitializerList) {
535535
testWalk(R"cpp(
536536
namespace std {
537-
template <typename T> struct $implicit^initializer_list {};
537+
template <typename T> struct $implicit^initializer_list { const T *a, *b; };
538538
})cpp",
539539
R"cpp(
540540
const char* s = "";

clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
namespace std {
77

8-
typedef decltype(sizeof 0) size_t;
8+
// FIXME: This doesn't work if size_t is not a signed type
9+
typedef int size_t;
910

1011
template<class E> class initializer_list {
1112
public:
@@ -15,8 +16,7 @@ template<class E> class initializer_list {
1516
using size_type = size_t;
1617
using iterator = const E*;
1718
using const_iterator = const E*;
18-
iterator ptr;
19-
size_type sz;
19+
iterator first, last;
2020
initializer_list();
2121
size_t size() const; // number of elements
2222
const E* begin() const; // first element

0 commit comments

Comments
 (0)