diff options
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Compiler.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index ae6574c..3cc55c7 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -2932,10 +2932,9 @@ bool Compiler<Emitter>::VisitLambdaExpr(const LambdaExpr *E) { // record with their initializers. for (const Record::Field &F : R->fields()) { const Expr *Init = *CaptureInitIt; - ++CaptureInitIt; - - if (!Init) + if (!Init || Init->containsErrors()) continue; + ++CaptureInitIt; if (std::optional<PrimType> T = classify(Init)) { if (!this->visit(Init)) |