[clang] [clang] Fixed a crash when declaring a member template within a local class inside an OpenMP region (PR #216692)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 17 04:53:49 PDT 2026
================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fopenmp -fsyntax-only -verify %s
+
+void foo() {
----------------
alexey-bataev wrote:
Add something like this too:
```
void nested() {
#pragma omp parallel
class O {
class P {
// expected-error at +1 {{templates cannot be declared inside of a local class}}
template <class T> class I {
void bar(bool b = true);
};
I<int> bar; // expected-error {{no template named 'I'}}
};
};
}
```
https://github.com/llvm/llvm-project/pull/216692
More information about the cfe-commits
mailing list