@@ -3331,58 +3331,6 @@ TEST(TransferTest, ResultObjectLocationDontVisitNestedRecordDecl) {
3331
3331
ASTContext &ASTCtx) {});
3332
3332
}
3333
3333
3334
- TEST (TransferTest, ResultObjectLocationDontVisitUnevaluatedContexts) {
3335
- // This is a crash repro.
3336
- // We used to crash because when propagating result objects, we would visit
3337
- // unevaluated contexts, but we don't model fields used only in these.
3338
-
3339
- auto testFunction = [](llvm::StringRef Code, llvm::StringRef TargetFun) {
3340
- runDataflow (
3341
- Code,
3342
- [](const llvm::StringMap<DataflowAnalysisState<NoopLattice>> &Results,
3343
- ASTContext &ASTCtx) {},
3344
- LangStandard::lang_gnucxx17,
3345
- /* ApplyBuiltinTransfer= */ true , TargetFun);
3346
- };
3347
-
3348
- std::string Code = R"cc(
3349
- // Definitions needed for `typeid`.
3350
- namespace std {
3351
- class type_info {};
3352
- class bad_typeid {};
3353
- } // namespace std
3354
-
3355
- struct S1 {};
3356
- struct S2 { S1 s1; };
3357
-
3358
- // We test each type of unevaluated context from a different target
3359
- // function. Some types of unevaluated contexts may actually cause the
3360
- // field `s1` to be modeled, and we don't want this to "pollute" the tests
3361
- // for the other unevaluated contexts.
3362
- void decltypeTarget() {
3363
- decltype(S2{}) Dummy;
3364
- }
3365
- void typeofTarget() {
3366
- typeof(S2{}) Dummy;
3367
- }
3368
- void typeidTarget() {
3369
- typeid(S2{});
3370
- }
3371
- void sizeofTarget() {
3372
- sizeof(S2{});
3373
- }
3374
- void noexceptTarget() {
3375
- noexcept(S2{});
3376
- }
3377
- )cc" ;
3378
-
3379
- testFunction (Code, " decltypeTarget" );
3380
- testFunction (Code, " typeofTarget" );
3381
- testFunction (Code, " typeidTarget" );
3382
- testFunction (Code, " sizeofTarget" );
3383
- testFunction (Code, " noexceptTarget" );
3384
- }
3385
-
3386
3334
TEST (TransferTest, StaticCast) {
3387
3335
std::string Code = R"(
3388
3336
void target(int Foo) {
0 commit comments