Mercurial > hg > CbC > CbC_llvm
comparison clang/lib/Parse/Parser.cpp @ 224:292f64a68d8a
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 19 Jul 2021 03:29:25 +0900 |
parents | dd44ba33042e 5f17cb93ff66 |
children | cf4f212398d7 |
comparison
equal
deleted
inserted
replaced
219:9b1a90cb0f3c | 224:292f64a68d8a |
---|---|
310 case tok::eof: | 310 case tok::eof: |
311 // Ran out of tokens. | 311 // Ran out of tokens. |
312 return false; | 312 return false; |
313 | 313 |
314 case tok::annot_pragma_openmp: | 314 case tok::annot_pragma_openmp: |
315 case tok::annot_attr_openmp: | |
315 case tok::annot_pragma_openmp_end: | 316 case tok::annot_pragma_openmp_end: |
316 // Stop before an OpenMP pragma boundary. | 317 // Stop before an OpenMP pragma boundary. |
317 if (OpenMPDirectiveParsing) | 318 if (OpenMPDirectiveParsing) |
318 return false; | 319 return false; |
319 ConsumeAnnotationToken(); | 320 ConsumeAnnotationToken(); |
803 HandlePragmaFP(); | 804 HandlePragmaFP(); |
804 break; | 805 break; |
805 case tok::annot_pragma_opencl_extension: | 806 case tok::annot_pragma_opencl_extension: |
806 HandlePragmaOpenCLExtension(); | 807 HandlePragmaOpenCLExtension(); |
807 return nullptr; | 808 return nullptr; |
809 case tok::annot_attr_openmp: | |
808 case tok::annot_pragma_openmp: { | 810 case tok::annot_pragma_openmp: { |
809 AccessSpecifier AS = AS_none; | 811 AccessSpecifier AS = AS_none; |
810 return ParseOpenMPDeclarativeDirectiveWithExtDecl(AS, attrs); | 812 return ParseOpenMPDeclarativeDirectiveWithExtDecl(AS, attrs); |
811 } | 813 } |
812 case tok::annot_pragma_ms_pointers_to_members: | 814 case tok::annot_pragma_ms_pointers_to_members: |
1219 | 1221 |
1220 // Check to make sure that any normal attributes are allowed to be on | 1222 // Check to make sure that any normal attributes are allowed to be on |
1221 // a definition. Late parsed attributes are checked at the end. | 1223 // a definition. Late parsed attributes are checked at the end. |
1222 if (Tok.isNot(tok::equal)) { | 1224 if (Tok.isNot(tok::equal)) { |
1223 for (const ParsedAttr &AL : D.getAttributes()) | 1225 for (const ParsedAttr &AL : D.getAttributes()) |
1224 if (AL.isKnownToGCC() && !AL.isCXX11Attribute()) | 1226 if (AL.isKnownToGCC() && !AL.isStandardAttributeSyntax()) |
1225 Diag(AL.getLoc(), diag::warn_attribute_on_function_definition) << AL; | 1227 Diag(AL.getLoc(), diag::warn_attribute_on_function_definition) << AL; |
1226 } | 1228 } |
1227 | 1229 |
1228 // In delayed template parsing mode, for function template we consume the | 1230 // In delayed template parsing mode, for function template we consume the |
1229 // tokens and store them for late parsing at the end of the translation unit. | 1231 // tokens and store them for late parsing at the end of the translation unit. |