@@ -3952,12 +3952,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
39523952 Tok.getIdentifierInfo ()->revertTokenIDToIdentifier ();
39533953 Tok.setKind (tok::identifier);
39543954 goto DoneWithDeclSpec;
3955- } else if (!getLangOpts ().OpenCLPipes ) {
3956- DiagID = diag::err_opencl_unknown_type_specifier;
3957- PrevSpec = Tok.getIdentifierInfo ()->getNameStart ();
3958- isInvalid = true ;
3959- } else
3960- isInvalid = DS.SetTypePipe (true , Loc, PrevSpec, DiagID, Policy);
3955+ }
3956+ isInvalid = DS.SetTypePipe (true , Loc, PrevSpec, DiagID, Policy);
39613957 break ;
39623958// We only need to enumerate each image type once.
39633959#define IMAGE_READ_WRITE_TYPE (Type, Id, Ext )
@@ -5130,10 +5126,8 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) {
51305126 switch (Tok.getKind ()) {
51315127 default : return false ;
51325128
5133- // OpenCL 2.0 and later define this keyword.
51345129 case tok::kw_pipe:
5135- return (getLangOpts ().OpenCL && getLangOpts ().OpenCLVersion >= 200 ) ||
5136- getLangOpts ().OpenCLCPlusPlus ;
5130+ return getLangOpts ().OpenCLPipe ;
51375131
51385132 case tok::identifier: // foo::bar
51395133 // Unfortunate hack to support "Class.factoryMethod" notation.
@@ -5662,9 +5656,7 @@ static bool isPtrOperatorToken(tok::TokenKind Kind, const LangOptions &Lang,
56625656 if (Kind == tok::star || Kind == tok::caret)
56635657 return true ;
56645658
5665- // OpenCL 2.0 and later define this keyword.
5666- if (Kind == tok::kw_pipe &&
5667- ((Lang.OpenCL && Lang.OpenCLVersion >= 200 ) || Lang.OpenCLCPlusPlus ))
5659+ if (Kind == tok::kw_pipe && Lang.OpenCLPipe )
56685660 return true ;
56695661
56705662 if (!Lang.CPlusPlus )
0 commit comments