[clang] [OpenACC/OpenMP/Parser] Teach ParseCXXInlineMethods about pragmas (PR #214259)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 5 08:54:20 PDT 2026
================
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -verify -fopenmp
+
+struct Type {
+ void foo() {
+#pragma omp parallel private(bar })
+ // expected-error at -1{{use of undeclared identifier 'bar'}}
+ // expected-error at +1{{expected statement}}
+ }
----------------
erichkeane wrote:
Both languages are treating "parse-assignment-expr" as a "just give up". Recovery from a parse assignment expression failure is really tough, so both languages 'punt' (the Expected-statement is because omp parallel has an associated statement, so after the pragma it tries to parse a statement).
https://github.com/llvm/llvm-project/pull/214259
More information about the cfe-commits
mailing list