In the below statement in ParseOpenMP.cpp:
bool IsComma =
1942 (Kind != OMPC_reduction && Kind != OMPC_task_reduction &&
1943 Kind != OMPC_in_reduction && Kind != OMPC_depend && Kind != OMPC_map) ||
1944 (Kind == OMPC_reduction && !InvalidReductionId) ||
1945 (Kind == OMPC_map && Data.MapType != OMPC_MAP_unknown &&
1946 (!MapTypeModifierSpecified ||
1947 Data.MapTypeModifier == OMPC_MAP_always)) ||
1948 (Kind == OMPC_depend && Data.DepKind != OMPC_DEPEND_unknown);
Whenever a map type modifier is specified, the flag MapTypeModifierSpecified is set to true.
In the above statement,
- when there is no map type modifier specified, !MapTypeModifierSpecified portion evaluates to true.
- when the map type modifier is specified, Data.MapTypeModifier == OMPC_MAP_always is set to true.
So whether a modifier is specified or not, the condition (highlighted in bold) always evaluates to true.
Check for this condition is redundant. Consequently, declaration and all uses of MapTypeModifierSpecified should be removed.