Skip to content

Commit 5209229

Browse files
author
Mandeep Singh Grang
committed
Set the correct offset for ASTStmtReader::NumExprFields
For creating an empty DeclRefExpr, we need to pass NumTemplateArgs. This depends on the NumExprFields. In Checked C, we changed the NumExprFields from 5 to 7. But upstream has this field as 6. So we adjust this and change it to 8. (cherry picked from commit 9902f10)
1 parent 7a4a124 commit 5209229

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Serialization/ASTReaderStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3033,7 +3033,7 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) {
30333033
/*HasFoundDecl=*/Record[ASTStmtReader::NumExprFields + 1],
30343034
/*HasTemplateKWAndArgsInfo=*/Record[ASTStmtReader::NumExprFields + 2],
30353035
/*NumTemplateArgs=*/Record[ASTStmtReader::NumExprFields + 2] ?
3036-
Record[ASTStmtReader::NumExprFields + 6] : 0);
3036+
Record[ASTStmtReader::NumExprFields + 8] : 0);
30373037
break;
30383038

30393039
case EXPR_INTEGER_LITERAL:

0 commit comments

Comments
 (0)