]> granicus.if.org Git - clang/commitdiff
[OPENMP] remove redundant ColonExpected flag in ParseOpenMP.cpp (NFC)
authorKelvin Li <kkwli0@gmail.com>
Wed, 28 Nov 2018 00:51:08 +0000 (00:51 +0000)
committerKelvin Li <kkwli0@gmail.com>
Wed, 28 Nov 2018 00:51:08 +0000 (00:51 +0000)
The flag ColonExpected is not changed after being initialized to
false at declaration.

Patch by Ahsan Saghir

Differential Revision: https://reviews.llvm.org/D54958

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347723 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseOpenMP.cpp

index f43f9952c7beb62621f0232fe571d85ba182c7e5..475b20c1c37810b5343607dc47ddfafac01638ee 100644 (file)
@@ -1867,7 +1867,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
                   getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok)))
             : OMPC_MAP_unknown;
     Data.DepLinMapLoc = Tok.getLocation();
-    bool ColonExpected = false;
 
     if (IsMapClauseModifierToken(Tok)) {
       if (PP.LookAhead(0).is(tok::colon)) {
@@ -1935,8 +1934,6 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
 
     if (Tok.is(tok::colon))
       Data.ColonLoc = ConsumeToken();
-    else if (ColonExpected)
-      Diag(Tok, diag::warn_pragma_expected_colon) << "map type";
   }
 
   bool IsComma =