r348150 - [Serialization][NFC] Remove pointless "+ 0" in ASTReader
Bruno Ricci via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 3 08:17:45 PST 2018
Author: brunoricci
Date: Mon Dec 3 08:17:45 2018
New Revision: 348150
URL: http://llvm.org/viewvc/llvm-project?rev=348150&view=rev
Log:
[Serialization][NFC] Remove pointless "+ 0" in ASTReader
Remove the pointless "+ 0" which I added for some reason when
modifying these statement/expression classes since it looks
like this is a typo. Following the suggestion of aaron.ballman
in D54902. NFC.
Modified:
cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderStmt.cpp?rev=348150&r1=348149&r2=348150&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Mon Dec 3 08:17:45 2018
@@ -2347,14 +2347,14 @@ Stmt *ASTReader::ReadStmtFromStream(Modu
case STMT_SWITCH:
S = SwitchStmt::CreateEmpty(
Context,
- /* HasInit=*/Record[ASTStmtReader::NumStmtFields + 0],
+ /* HasInit=*/Record[ASTStmtReader::NumStmtFields],
/* HasVar=*/Record[ASTStmtReader::NumStmtFields + 1]);
break;
case STMT_WHILE:
S = WhileStmt::CreateEmpty(
Context,
- /* HasVar=*/Record[ASTStmtReader::NumStmtFields + 0]);
+ /* HasVar=*/Record[ASTStmtReader::NumStmtFields]);
break;
case STMT_DO:
@@ -2438,7 +2438,7 @@ Stmt *ASTReader::ReadStmtFromStream(Modu
case EXPR_STRING_LITERAL:
S = StringLiteral::CreateEmpty(
Context,
- /* NumConcatenated=*/Record[ASTStmtReader::NumExprFields + 0],
+ /* NumConcatenated=*/Record[ASTStmtReader::NumExprFields],
/* Length=*/Record[ASTStmtReader::NumExprFields + 1],
/* CharByteWidth=*/Record[ASTStmtReader::NumExprFields + 2]);
break;
@@ -2454,7 +2454,7 @@ Stmt *ASTReader::ReadStmtFromStream(Modu
case EXPR_PAREN_LIST:
S = ParenListExpr::CreateEmpty(
Context,
- /* NumExprs=*/Record[ASTStmtReader::NumExprFields + 0]);
+ /* NumExprs=*/Record[ASTStmtReader::NumExprFields]);
break;
case EXPR_UNARY_OPERATOR:
@@ -2481,7 +2481,7 @@ Stmt *ASTReader::ReadStmtFromStream(Modu
case EXPR_CALL:
S = new (Context) CallExpr(
- Context, /* NumArgs=*/Record[ASTStmtReader::NumExprFields + 0],
+ Context, /* NumArgs=*/Record[ASTStmtReader::NumExprFields],
Empty);
break;
@@ -3073,13 +3073,13 @@ Stmt *ASTReader::ReadStmtFromStream(Modu
case EXPR_CXX_OPERATOR_CALL:
S = new (Context) CXXOperatorCallExpr(
- Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields + 0],
+ Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields],
Empty);
break;
case EXPR_CXX_MEMBER_CALL:
S = new (Context) CXXMemberCallExpr(
- Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields + 0],
+ Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields],
Empty);
break;
@@ -3121,7 +3121,7 @@ Stmt *ASTReader::ReadStmtFromStream(Modu
case EXPR_USER_DEFINED_LITERAL:
S = new (Context) UserDefinedLiteral(
- Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields + 0], Empty);
+ Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields], Empty);
break;
case EXPR_CXX_STD_INITIALIZER_LIST:
@@ -3292,7 +3292,7 @@ Stmt *ASTReader::ReadStmtFromStream(Modu
case EXPR_CUDA_KERNEL_CALL:
S = new (Context) CUDAKernelCallExpr(
- Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields + 0], Empty);
+ Context, /*NumArgs=*/Record[ASTStmtReader::NumExprFields], Empty);
break;
case EXPR_ASTYPE:
More information about the cfe-commits
mailing list