Skip to content

Commit d2cabb8

Browse files
committed
leftover
Created using spr 1.3.7
1 parent 699d992 commit d2cabb8

File tree

1 file changed

+0
-121
lines changed

1 file changed

+0
-121
lines changed

clang/unittests/Analysis/FlowSensitive/UncheckedStatusOrAccessModelTestFixture.cpp

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -3174,127 +3174,6 @@ TEST_P(UncheckedStatusOrAccessModelTest, ConstructStatusFromReference) {
31743174
)cc");
31753175
}
31763176

3177-
/*
3178-
3179-
TEST_P(UncheckedStatusOrAccessModelTest, OperatorIndex) {
3180-
ExpectDiagnosticsFor(R"cc(
3181-
#include "unchecked_statusor_access_test_defs.h"
3182-
3183-
class Foo {
3184-
public:
3185-
const STATUSOR_INT& operator[](size_t n) const;
3186-
STATUSOR_INT& operator[](size_t n);
3187-
};
3188-
3189-
void target() {
3190-
Foo foo;
3191-
const auto sor1 = foo[0];
3192-
const auto sor2 = foo[1];
3193-
if (!sor1.ok() && !sor2.ok()) return;
3194-
if (sor1.ok() && !sor2.ok()) {
3195-
} else if (!sor1.ok() && sor2.ok()) {
3196-
} else {
3197-
sor1.value();
3198-
sor2.value();
3199-
}
3200-
}
3201-
)cc");
3202-
}
3203-
3204-
TEST_P(UncheckedStatusOrAccessModelTest, OperatorAt) {
3205-
ExpectDiagnosticsFor(R"cc(
3206-
#include "unchecked_statusor_access_test_defs.h"
3207-
3208-
class Foo {
3209-
public:
3210-
const STATUSOR_INT& at(size_t n) const;
3211-
STATUSOR_INT& at(size_t n);
3212-
};
3213-
3214-
void target() {
3215-
Foo foo;
3216-
const auto sor1 = foo.at(0);
3217-
const auto sor2 = foo.at(1);
3218-
if (!sor1.ok() && !sor2.ok()) return;
3219-
if (sor1.ok() && !sor2.ok()) {
3220-
} else if (!sor1.ok() && sor2.ok()) {
3221-
} else {
3222-
sor1.value();
3223-
sor2.value();
3224-
}
3225-
}
3226-
)cc");
3227-
}
3228-
3229-
TEST_P(UncheckedStatusOrAccessModelTest, OperatorIndexWithStatus) {
3230-
ExpectDiagnosticsFor(R"cc(
3231-
#include "unchecked_statusor_access_test_defs.h"
3232-
3233-
class Foo {
3234-
public:
3235-
const STATUSOR_INT& operator[](size_t n) const;
3236-
STATUSOR_INT& operator[](size_t n);
3237-
};
3238-
class Bar {
3239-
public:
3240-
const STATUS& operator[](size_t n) const;
3241-
STATUS& operator[](size_t n);
3242-
};
3243-
3244-
void target() {
3245-
Foo foo;
3246-
const auto sor1 = foo[0];
3247-
const auto sor2 = foo[1];
3248-
Bar bar;
3249-
const auto s1 = bar[0];
3250-
const auto s2 = bar[1];
3251-
if (!s1.ok() && !s2.ok()) return;
3252-
if (s1.ok() && !s2.ok()) {
3253-
} else if (!s1.ok() && s2.ok()) {
3254-
} else {
3255-
if (s1 != sor1.status() || s2 != sor2.status()) return;
3256-
sor1.value();
3257-
sor2.value();
3258-
}
3259-
}
3260-
)cc");
3261-
}
3262-
TEST_P(UncheckedStatusOrAccessModelTest, OperatorAtWithStatus) {
3263-
ExpectDiagnosticsFor(R"cc(
3264-
#include "unchecked_statusor_access_test_defs.h"
3265-
3266-
class Foo {
3267-
public:
3268-
const STATUSOR_INT& at(size_t n) const;
3269-
STATUSOR_INT& at(size_t n);
3270-
};
3271-
3272-
class Bar {
3273-
public:
3274-
const STATUS& at(size_t n) const;
3275-
STATUS& at(size_t n);
3276-
};
3277-
3278-
void target() {
3279-
Foo foo;
3280-
const auto sor1 = foo.at(0);
3281-
const auto sor2 = foo.at(1);
3282-
Bar bar;
3283-
const auto s1 = bar.at(0);
3284-
const auto s2 = bar.at(1);
3285-
if (!s1.ok() && !s2.ok()) return;
3286-
if (s1.ok() && !s2.ok()) {
3287-
} else if (!s1.ok() && s2.ok()) {
3288-
} else {
3289-
if (s1 != sor1.status() || s2 != sor2.status()) return;
3290-
sor1.value();
3291-
sor2.value();
3292-
}
3293-
}
3294-
)cc");
3295-
}
3296-
*/
3297-
32983177
} // namespace
32993178

33003179
std::string

0 commit comments

Comments
 (0)