r347408 - [OPENMP] remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp (NFC)
Kelvin Li via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 21 11:38:53 PST 2018
Author: kli
Date: Wed Nov 21 11:38:53 2018
New Revision: 347408
URL: http://llvm.org/viewvc/llvm-project?rev=347408&view=rev
Log:
[OPENMP] remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp (NFC)
Whether the map type modifier is specified or not, the flag
MapTypeModifierSpecified is always set to true.
Patch by Ahsan Saghir
Differential Revision: https://reviews.llvm.org/D54638
Modified:
cfe/trunk/lib/Parse/ParseOpenMP.cpp
Modified: cfe/trunk/lib/Parse/ParseOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseOpenMP.cpp?rev=347408&r1=347407&r2=347408&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseOpenMP.cpp (original)
+++ cfe/trunk/lib/Parse/ParseOpenMP.cpp Wed Nov 21 11:38:53 2018
@@ -1775,7 +1775,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDi
OpenMPVarListDataTy &Data) {
UnqualifiedId UnqualifiedReductionId;
bool InvalidReductionId = false;
- bool MapTypeModifierSpecified = false;
// Parse '('.
BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
@@ -1878,8 +1877,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDi
if (Data.MapTypeModifier != OMPC_MAP_always) {
Diag(Tok, diag::err_omp_unknown_map_type_modifier);
Data.MapTypeModifier = OMPC_MAP_unknown;
- } else {
- MapTypeModifierSpecified = true;
}
ConsumeToken();
@@ -1904,8 +1901,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDi
if (Data.MapTypeModifier != OMPC_MAP_always) {
Diag(Tok, diag::err_omp_unknown_map_type_modifier);
Data.MapTypeModifier = OMPC_MAP_unknown;
- } else {
- MapTypeModifierSpecified = true;
}
ConsumeToken();
@@ -1942,9 +1937,7 @@ bool Parser::ParseOpenMPVarList(OpenMPDi
(Kind != OMPC_reduction && Kind != OMPC_task_reduction &&
Kind != OMPC_in_reduction && Kind != OMPC_depend && Kind != OMPC_map) ||
(Kind == OMPC_reduction && !InvalidReductionId) ||
- (Kind == OMPC_map && Data.MapType != OMPC_MAP_unknown &&
- (!MapTypeModifierSpecified ||
- Data.MapTypeModifier == OMPC_MAP_always)) ||
+ (Kind == OMPC_map && Data.MapType != OMPC_MAP_unknown) ||
(Kind == OMPC_depend && Data.DepKind != OMPC_DEPEND_unknown);
const bool MayHaveTail = (Kind == OMPC_linear || Kind == OMPC_aligned);
while (IsComma || (Tok.isNot(tok::r_paren) && Tok.isNot(tok::colon) &&
More information about the cfe-commits
mailing list