return StmtEmpty();
case tok::annot_pragma_captured:
+ ProhibitAttributes(Attrs);
return HandlePragmaCaptured();
case tok::annot_pragma_openmp:
+ ProhibitAttributes(Attrs);
return ParseOpenMPDeclarativeOrExecutableDirective();
}
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
void foo() {
}
return 1; // expected-error {{cannot return from OpenMP region}}
}
+ [[]] // expected-error {{an attribute list cannot appear here}}
+ #pragma omp parallel
+ for (int n = 0; n < 100; ++n) {}
+
return 0;
}
(void)captured_sum(1, 2, 3); // OK
(void)captured_sum(1, 2, 3, 4, 5); // OK
}
+
+void test_capture_with_attributes() {
+ [[]] // expected-error {{an attribute list cannot appear here}}
+ #pragma clang __debug captured
+ {
+ }
+}