[cxx-interop] Do not emit IR for C++20 requires expr

This fixes a compiler crash when emitting IR for a for-in loop over a C++ `std::vector` in C++20 mode.

rdar://108810356
This commit is contained in:
Egor Zhdan
2023-05-04 15:06:12 +01:00
parent 9a57840c2e
commit 21745e52c4
4 changed files with 27 additions and 0 deletions

View File

@@ -119,6 +119,8 @@ public:
return true;
}
bool TraverseRequiresExpr(clang::RequiresExpr *RE) { return true; }
// Do not traverse type locs, as they might contain expressions that reference
// code that should not be instantiated and/or emitted.
bool TraverseTypeLoc(clang::TypeLoc TL) { return true; }