summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/openmp_check.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-12-13 16:05:30 -0500
committerAlexey Bataev <a.bataev@hotmail.com>2019-12-13 16:51:46 -0500
commit8035bb4a6573f7d20f17044a68a1405691000525 (patch)
treebadc81c2fe3d9cd01ee8b5ad8e50c623ee6f44fb /clang/test/OpenMP/openmp_check.cpp
parente8af4fd42da3580f9bda5202f381bf92d07f4b9c (diff)
downloadbcm5719-llvm-8035bb4a6573f7d20f17044a68a1405691000525.tar.gz
bcm5719-llvm-8035bb4a6573f7d20f17044a68a1405691000525.zip
[OPENMP]Fix skipping of functions body.
When parsing the code with OpenMP and the function's body must be skipped, need to skip also OpenMP annotation tokens. Otherwise the counters for braces/parens are unbalanced and parsing fails.
Diffstat (limited to 'clang/test/OpenMP/openmp_check.cpp')
-rw-r--r--clang/test/OpenMP/openmp_check.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/test/OpenMP/openmp_check.cpp b/clang/test/OpenMP/openmp_check.cpp
index cd4706b57e4..6a8dd17fc83 100644
--- a/clang/test/OpenMP/openmp_check.cpp
+++ b/clang/test/OpenMP/openmp_check.cpp
@@ -19,7 +19,6 @@ int nested(int a) {
#if __cplusplus <= 199711L
// expected-warning@-2 {{'auto' type specifier is a C++11 extension}}
// expected-error@-3 {{expected expression}}
- // expected-error@-4 {{expected ';' at end of declaration}}
#endif
#pragma omp parallel
@@ -29,14 +28,5 @@ int nested(int a) {
}
};
F();
-#if __cplusplus <= 199711L
- // expected-error@-2 {{C++ requires a type specifier for all declarations}}
-#endif
return a;
-#if __cplusplus <= 199711L
- // expected-error@-2 {{expected unqualified-id}}
-#endif
}
-#if __cplusplus <= 199711L
-// expected-error@-2 {{extraneous closing brace ('}')}}
-#endif
OpenPOWER on IntegriCloud