[clang] [Clang][OpenMP] Fix crash on a function name used as an integer clause argument (PR #228864)
Akash Manna via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 4 02:04:54 PDT 2026
https://github.com/akash-manna-sky created https://github.com/llvm/llvm-project/pull/228864
Fixes #140257
`PerformContextualImplicitConversion` diagnosed an expression it couldn't convert, but then returned that same expression as a valid result. The OpenMP clause code took that as success and kept going with the unconverted expression. In C, `device(omp_is_initial_device)` (a missing `()`) ended up captured in a variable of function type with no initializer, and we crashed on that null initializer at the end of the region. `num_threads`, `schedule`, `linear` and the other clauses that share the conversion crashed the same way.
It now returns `ExprError()` on every path where it reports that no conversion exists. The OpenMP callers already handle an invalid result, so the clause is just dropped after the diagnostic. The other callers were rejecting a non-matching result on their own, so nothing changes for them, and the two re-checks whose `FIXMEs` asked for this are removed along with the `sizes` workaround. Two visible side effects: a clause argument of the wrong type that doesn't depend on a template parameter is diagnosed once instead of once more per instantiation, and array sections and array shaping now also emit their existing "is not an integer" error.
>From 2385dfd203fc6e1d2b687a485a9568fef1b045c0 Mon Sep 17 00:00:00 2001
From: Akash Manna <akash.manna.mymail at gmail.com>
Date: Sun, 4 Oct 2026 14:32:01 +0530
Subject: [PATCH] [Clang][OpenMP] Fix crash on a function name used as an
integer clause argument
`PerformContextualImplicitConversion` diagnosed an expression it could
not convert but still returned it as a valid result. OpenMP clauses
such as `device` took that as success and captured the unconverted
expression. In C, with a function name as the argument, the captured
variable had function type and no initializer, and reading that
initializer at the end of the region asserted. `num_threads`,
`schedule`, `linear` and the other clauses that share the conversion
crashed the same way.
Return `ExprError()` on every path where the function reports that no
conversion exists. The OpenMP callers already handle an invalid result,
so the clause is dropped after the diagnostic. The other callers
rejected a non-matching result themselves, so nothing changes for them;
remove the two re-checks whose FIXMEs asked for this and the workaround
in the `sizes` clause.
A clause argument of the wrong type that does not depend on a template
parameter is now diagnosed once instead of once more per instantiation,
and array sections and array shaping also emit their existing "is not
an integer" error.
Fixes #140257
---
clang/docs/ReleaseNotes.md | 2 ++
clang/lib/Sema/SemaExprCXX.cpp | 4 ----
clang/lib/Sema/SemaOpenMP.cpp | 6 ------
clang/lib/Sema/SemaOverload.cpp | 15 +++++++------
clang/lib/Sema/SemaStmt.cpp | 9 +-------
.../distribute_dist_schedule_messages.cpp | 2 +-
...te_parallel_for_dist_schedule_messages.cpp | 2 +-
...rallel_for_simd_dist_schedule_messages.cpp | 2 +-
...distribute_simd_dist_schedule_messages.cpp | 2 +-
.../OpenMP/parallel_num_threads_messages.cpp | 2 +-
clang/test/OpenMP/target_data_messages.c | 16 ++++++++++++++
clang/test/OpenMP/target_device_messages.cpp | 4 ++++
.../target_parallel_for_misc_messages.c | 21 +++++++++++++++++++
.../target_parallel_num_threads_messages.cpp | 2 +-
...eams_distribute_dist_schedule_messages.cpp | 2 +-
...et_teams_distribute_num_teams_messages.cpp | 2 +-
...te_parallel_for_dist_schedule_messages.cpp | 2 +-
...ribute_parallel_for_num_teams_messages.cpp | 2 +-
...rallel_for_simd_dist_schedule_messages.cpp | 2 +-
...e_parallel_for_simd_num_teams_messages.cpp | 2 +-
...arallel_for_simd_thread_limit_messages.cpp | 2 +-
...ute_parallel_for_thread_limit_messages.cpp | 2 +-
...distribute_simd_dist_schedule_messages.cpp | 2 +-
...ams_distribute_simd_num_teams_messages.cpp | 2 +-
..._distribute_simd_thread_limit_messages.cpp | 2 +-
.../target_teams_num_teams_messages.cpp | 2 +-
.../target_teams_thread_limit_messages.cpp | 2 +-
.../OpenMP/target_update_device_messages.cpp | 2 +-
...eams_distribute_dist_schedule_messages.cpp | 2 +-
.../teams_distribute_num_teams_messages.cpp | 2 +-
...te_parallel_for_dist_schedule_messages.cpp | 2 +-
...ribute_parallel_for_num_teams_messages.cpp | 2 +-
...rallel_for_simd_dist_schedule_messages.cpp | 2 +-
...e_parallel_for_simd_num_teams_messages.cpp | 2 +-
...allel_for_simd_num_teams_messages_attr.cpp | 2 +-
...arallel_for_simd_thread_limit_messages.cpp | 2 +-
...ute_parallel_for_thread_limit_messages.cpp | 2 +-
...distribute_simd_dist_schedule_messages.cpp | 2 +-
...ams_distribute_simd_num_teams_messages.cpp | 2 +-
..._distribute_simd_thread_limit_messages.cpp | 2 +-
...teams_distribute_thread_limit_messages.cpp | 2 +-
.../test/OpenMP/teams_num_teams_messages.cpp | 2 +-
.../OpenMP/teams_thread_limit_messages.cpp | 2 +-
43 files changed, 88 insertions(+), 59 deletions(-)
diff --git a/clang/docs/ReleaseNotes.md b/clang/docs/ReleaseNotes.md
index bf194e87f76a6..371447920354b 100644
--- a/clang/docs/ReleaseNotes.md
+++ b/clang/docs/ReleaseNotes.md
@@ -1102,6 +1102,8 @@ The `alpha.cplusplus.UseAfterLifetimeEnd` checker was renamed to `alpha.core.Use
- The `holds` clause on the `assume` directive now lowers side-effect-free
conditions to `llvm.assume`, enabling downstream optimizations. Previously
the clause was parsed but its condition was discarded without effect.
+- Fixed a crash in C when a function name is used as the argument of an OpenMP
+ clause that requires an integer expression, such as `device`. (#GH140257)
- Fixed a crash when the loop variable or a loop bound of an OpenMP loop has a
`_BitInt` type wider than any standard integer type. (#GH140074)
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index b89c97f2b8900..dabbf72b17ce1 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -4196,10 +4196,6 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
if (Ex.isInvalid())
return ExprError();
Type = Ex.get()->getType();
- if (!Converter.match(Type))
- // FIXME: PerformContextualImplicitConversion should return ExprError
- // itself in this case.
- return ExprError();
QualType Pointee = Type->castAs<PointerType>()->getPointeeType();
QualType PointeeElem = Context.getBaseElementType(Pointee);
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index efc570a8933f1..410a679f4635e 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -19373,12 +19373,6 @@ OMPClause *SemaOpenMP::ActOnOpenMPSizesClause(ArrayRef<Expr *> SizeExprs,
bool IsValid = isNonNegativeIntegerValue(SizeExpr, SemaRef, OMPC_sizes,
/*StrictlyPositive=*/true);
- // isNonNegativeIntegerValue returns true for non-integral types (but still
- // emits error diagnostic), so check for the expected type explicitly.
- QualType SizeTy = SizeExpr->getType();
- if (!SizeTy->isIntegerType())
- IsValid = false;
-
// Handling in templates is tricky. There are four possibilities to
// consider:
//
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index cd1bd2cecc490..9e8e24e488416 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -6986,7 +6986,7 @@ diagnoseAmbiguousConversion(Sema &SemaRef, SourceLocation Loc, Expr *From,
QualType ConvTy = Conv->getConversionType().getNonReferenceType();
Converter.noteAmbiguous(SemaRef, Conv, ConvTy);
}
- return From;
+ return ExprError();
}
static bool
@@ -7066,9 +7066,12 @@ static bool recordConversion(Sema &SemaRef, SourceLocation Loc, Expr *&From,
static ExprResult finishContextualImplicitConversion(
Sema &SemaRef, SourceLocation Loc, Expr *From,
Sema::ContextualImplicitConverter &Converter) {
- if (!Converter.match(From->getType()) && !Converter.Suppress)
- Converter.diagnoseNoMatch(SemaRef, Loc, From->getType())
- << From->getSourceRange();
+ if (!Converter.match(From->getType())) {
+ if (!Converter.Suppress)
+ Converter.diagnoseNoMatch(SemaRef, Loc, From->getType())
+ << From->getSourceRange();
+ return ExprError();
+ }
return SemaRef.DefaultLvalueConversion(From);
}
@@ -7144,7 +7147,7 @@ ExprResult Sema::PerformContextualImplicitConversion(
if (!RecordTy || !getLangOpts().CPlusPlus) {
if (!Converter.Suppress)
Converter.diagnoseNoMatch(*this, Loc, T) << From->getSourceRange();
- return From;
+ return ExprError();
}
// We must have a complete class type.
@@ -7162,7 +7165,7 @@ ExprResult Sema::PerformContextualImplicitConversion(
if (Converter.Suppress ? !isCompleteType(Loc, T)
: RequireCompleteType(Loc, T, IncompleteDiagnoser))
- return From;
+ return ExprError();
// Look for a conversion to an integral or enumeration type.
UnresolvedSet<4>
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 25db6087d8d25..903ec39cc5c17 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -1184,15 +1184,8 @@ ExprResult Sema::CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond) {
if (CondResult.isInvalid())
return ExprError();
- // FIXME: PerformContextualImplicitConversion doesn't always tell us if it
- // failed and produced a diagnostic.
- Cond = CondResult.get();
- if (!Cond->isTypeDependent() &&
- !Cond->getType()->isIntegralOrEnumerationType())
- return ExprError();
-
// C99 6.8.4.2p5 - Integer promotions are performed on the controlling expr.
- return UsualUnaryConversions(Cond);
+ return UsualUnaryConversions(CondResult.get());
}
StmtResult Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc,
diff --git a/clang/test/OpenMP/distribute_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_dist_schedule_messages.cpp
index cd232f40feb43..15ff00ba3bf3f 100644
--- a/clang/test/OpenMP/distribute_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/distribute_dist_schedule_messages.cpp
@@ -35,7 +35,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i) foo();
- #pragma omp distribute dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp distribute dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
}
diff --git a/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
index 07e7704dffded..fe9e4d993bf0c 100644
--- a/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
@@ -54,7 +54,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp distribute parallel for dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
}
diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
index ed7b19111dee8..7d4a41030fbd8 100644
--- a/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp distribute parallel for simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
}
diff --git a/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp
index 794681c02646c..87fded6e65250 100644
--- a/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/distribute_simd_dist_schedule_messages.cpp
@@ -63,7 +63,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp distribute simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
}
diff --git a/clang/test/OpenMP/parallel_num_threads_messages.cpp b/clang/test/OpenMP/parallel_num_threads_messages.cpp
index fbffa06c29d6d..2637fa5353ec9 100644
--- a/clang/test/OpenMP/parallel_num_threads_messages.cpp
+++ b/clang/test/OpenMP/parallel_num_threads_messages.cpp
@@ -42,7 +42,7 @@ T tmain(T argc, S **argv) {
#pragma omp parallel num_threads(strict: // omp60-error {{expected expression}} omp60-error {{expected ')'}} omp60-note {{to match this '('}}
// Invalid: unknown/missing modifier
- #pragma omp parallel num_threads(foo: 4) // omp60-error {{expected ',' or ')' in 'num_threads' clause}} omp60-error {{expected ')'}} omp60-note {{to match this '('}} omp60-error 3 {{expression must have integral or unscoped enumeration type, not 'void ()'}}
+ #pragma omp parallel num_threads(foo: 4) // omp60-error {{expected ',' or ')' in 'num_threads' clause}} omp60-error {{expected ')'}} omp60-note {{to match this '('}} omp60-error {{expression must have integral or unscoped enumeration type, not 'void ()'}}
#pragma omp parallel num_threads(: 4) // omp60-error {{expected expression}}
#pragma omp parallel num_threads(:)// omp60-error {{expected expression}}
diff --git a/clang/test/OpenMP/target_data_messages.c b/clang/test/OpenMP/target_data_messages.c
index bb56629a33663..52a2d283d5bc7 100644
--- a/clang/test/OpenMP/target_data_messages.c
+++ b/clang/test/OpenMP/target_data_messages.c
@@ -54,3 +54,19 @@ int main(int argc, char **argv) {
{}
return 0;
}
+
+extern int omp_is_initial_device(void);
+
+void gh140257(void) {
+ int i = 0, a[2];
+ #pragma omp target device(omp_is_initial_device) // expected-error {{expression must have integral or unscoped enumeration type, not 'int (void)'}}
+ i++;
+ #pragma omp target data map(i) device(omp_is_initial_device) // expected-error {{expression must have integral or unscoped enumeration type, not 'int (void)'}}
+ i++;
+ #pragma omp target map(a[omp_is_initial_device:1]) // expected-error {{expression must have integral or unscoped enumeration type, not 'int (void)'}} expected-error {{array section lower bound is not an integer}}
+ i++;
+ #pragma omp target device(omp_is_initial_device())
+ i++;
+ #pragma omp target device(1)
+ i++;
+}
diff --git a/clang/test/OpenMP/target_device_messages.cpp b/clang/test/OpenMP/target_device_messages.cpp
index a58ba2bcaee6c..e0e9803b3b3aa 100644
--- a/clang/test/OpenMP/target_device_messages.cpp
+++ b/clang/test/OpenMP/target_device_messages.cpp
@@ -45,6 +45,10 @@ int main(int argc, char **argv) {
foo();
#pragma omp target device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
+ #pragma omp target device (foobool) // expected-error {{expression must have integral or unscoped enumeration type, not 'bool (int)'}}
+ foo();
+ #pragma omp target device (foobool(argc))
+ foo();
#pragma omp target device (ancestor) // expected-error {{use of undeclared identifier 'ancestor'}}
foo();
diff --git a/clang/test/OpenMP/target_parallel_for_misc_messages.c b/clang/test/OpenMP/target_parallel_for_misc_messages.c
index d225a1e93d53e..92588d81da3cf 100644
--- a/clang/test/OpenMP/target_parallel_for_misc_messages.c
+++ b/clang/test/OpenMP/target_parallel_for_misc_messages.c
@@ -314,3 +314,24 @@ void test_loop_messages(void) {
}
}
+extern int omp_is_initial_device(void);
+
+void test_gh140257(void) {
+ int i, k = 0;
+// expected-error at +1 {{expression must have integral or unscoped enumeration type, not 'int (void)'}}
+#pragma omp target parallel for num_threads(omp_is_initial_device)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error at +1 {{expression must have integral or unscoped enumeration type, not 'int (void)'}}
+#pragma omp target parallel for schedule(static, omp_is_initial_device)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error at +1 {{expression must have integral or unscoped enumeration type, not 'int (void)'}}
+#pragma omp target parallel for linear(k : omp_is_initial_device)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp target parallel for num_threads(omp_is_initial_device())
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
diff --git a/clang/test/OpenMP/target_parallel_num_threads_messages.cpp b/clang/test/OpenMP/target_parallel_num_threads_messages.cpp
index 19d40a3448cef..532b3a46446df 100644
--- a/clang/test/OpenMP/target_parallel_num_threads_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_num_threads_messages.cpp
@@ -59,7 +59,7 @@ T tmain(T argc, S **argv) {
foo();
// Invalid: unknown/missing modifier
- #pragma omp target parallel num_threads(foo: 4) // omp60-error {{expected ',' or ')' in 'num_threads' clause}} omp60-error {{expected ')'}} omp60-note {{to match this '('}} omp60-error 3 {{expression must have integral or unscoped enumeration type, not 'void ()'}}
+ #pragma omp target parallel num_threads(foo: 4) // omp60-error {{expected ',' or ')' in 'num_threads' clause}} omp60-error {{expected ')'}} omp60-note {{to match this '('}} omp60-error {{expression must have integral or unscoped enumeration type, not 'void ()'}}
foo();
#pragma omp target parallel num_threads(: 4) // omp60-error {{expected expression}}
foo();
diff --git a/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp
index 69c1e55eeaa3b..42cae3a5601e3 100644
--- a/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp
@@ -45,7 +45,7 @@ T tmain(T argc) {
#pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp target teams distribute dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp
index 0fc2f3ff54017..40cec9333f6ab 100644
--- a/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_num_teams_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute num_teams(-10u)
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams distribute num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute num_teams(1, 2, 3) // expected-error {{unexpected number of expressions in 'num_teams' clause (expected 1, have 3)}}
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp
index a0efad18668e9..d0511644f7446 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp
@@ -45,7 +45,7 @@ T tmain(T argc) {
#pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute parallel for dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp target teams distribute parallel for dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp
index 4d72a2c23bb28..39c3a4edc6941 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(-10u)
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams distribute parallel for num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(1, 2, 3) // expected-error {{unexpected number of expressions in 'num_teams' clause (expected 1, have 3)}}
for (int i=0; i<100; i++) foo();
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
index ec634c8ac01c9..febfd37fe0e7e 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
@@ -45,7 +45,7 @@ T tmain(T argc) {
#pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute parallel for simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp target teams distribute parallel for simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp
index 8d611f76ed5ad..b7e78a8aab1b5 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for simd num_teams(-10u)
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for simd num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams distribute parallel for simd num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
return 0;
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp
index 1905b55478401..24d035cf179f7 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute parallel for simd thread_limit(-10u)
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams distribute parallel for simd thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int j=0; j<100; j++) foo();
return 0;
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp
index a015f9984ea63..8b08288cff2cf 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp
@@ -54,7 +54,7 @@ T tmain(T argc) {
#pragma omp target teams distribute parallel for thread_limit(-10u)
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams distribute parallel for thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int j=0; j<100; j++) foo();
return 0;
diff --git a/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp
index 507ddabd2fc20..11a0d3d1b3cae 100644
--- a/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp
@@ -45,7 +45,7 @@ T tmain(T argc) {
#pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 0; i < 10; ++i) foo();
-#pragma omp target teams distribute simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp target teams distribute simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp
index 7c44d6861ef83..42d5a71543e9f 100644
--- a/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute simd num_teams(-10u)
for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute simd num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams distribute simd num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
return 0;
diff --git a/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp
index fcdcde53f3af3..7e4eeb10eccbf 100644
--- a/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
for (int j=0; j<100; j++) foo();
#pragma omp target teams distribute simd thread_limit(-10u)
for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams distribute simd thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int j=0; j<100; j++) foo();
return 0;
diff --git a/clang/test/OpenMP/target_teams_num_teams_messages.cpp b/clang/test/OpenMP/target_teams_num_teams_messages.cpp
index 94f4c0f811b35..0b344728bafa8 100644
--- a/clang/test/OpenMP/target_teams_num_teams_messages.cpp
+++ b/clang/test/OpenMP/target_teams_num_teams_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
foo();
#pragma omp target teams num_teams(-10u)
foo();
-#pragma omp target teams num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
return 0;
diff --git a/clang/test/OpenMP/target_teams_thread_limit_messages.cpp b/clang/test/OpenMP/target_teams_thread_limit_messages.cpp
index 0693e64a71148..c8d15f2b00561 100644
--- a/clang/test/OpenMP/target_teams_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/target_teams_thread_limit_messages.cpp
@@ -41,7 +41,7 @@ T tmain(T argc) {
foo();
#pragma omp target teams thread_limit(-10u)
foo();
-#pragma omp target teams thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target teams thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
return 0;
diff --git a/clang/test/OpenMP/target_update_device_messages.cpp b/clang/test/OpenMP/target_update_device_messages.cpp
index 826575c2ba22b..df7f7c1e16e44 100644
--- a/clang/test/OpenMP/target_update_device_messages.cpp
+++ b/clang/test/OpenMP/target_update_device_messages.cpp
@@ -24,7 +24,7 @@ int tmain(T argc, S **argv) {
#pragma omp target update from(i) device (device_num: argc + z) // expected-error {{use of undeclared identifier 'device_num'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}}
#pragma omp target update from(i) device (S1) // expected-error {{'S1' does not refer to a value}}
-#pragma omp target update from(i) device (3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp target update from(i) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
#pragma omp target update from(i) device (-3) // expected-error {{argument to 'device' clause must be a non-negative integer value, 'omp_initial_device' (-1), or 'omp_invalid_device' (-2)}}
#pragma omp target update from(i) device (-2) // OK: omp_invalid_device
#pragma omp target update from(i) device (-1) // OK: omp_initial_device
diff --git a/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp
index 4f146e562db44..75718e7c7ae2c 100644
--- a/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_dist_schedule_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp teams distribute dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp
index 5156439e67755..d1488cce0b258 100644
--- a/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_num_teams_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute num_teams(-10u)
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp
index 27ff4125daf7f..b75f8a37227cb 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp teams distribute parallel for dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp
index 2f34c8b60faf1..5e092460c276a 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for num_teams(-10u)
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute parallel for num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
index cbd4ec4ce9793..f1190add6cf10 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp teams distribute parallel for simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp
index c18890ff90c27..1aebac007fff9 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for simd num_teams(-10u)
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute parallel for simd num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages_attr.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages_attr.cpp
index 88851f5750618..ee1fbdb858d2c 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages_attr.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages_attr.cpp
@@ -34,7 +34,7 @@ T tmain(T argc) {
for (int i=0; i<100; i++) foo();
[[omp::sequence(directive(target), directive(teams distribute parallel for simd num_teams(-10u)))]]
for (int i=0; i<100; i++) foo();
- [[omp::sequence(directive(target), directive(teams distribute parallel for simd num_teams(3.14)))]] // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+ [[omp::sequence(directive(target), directive(teams distribute parallel for simd num_teams(3.14)))]] // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp
index 6d0cfaa78003a..5cad54da65047 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for simd thread_limit(-10u)
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for simd thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute parallel for simd thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int j=0; j<100; j++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp
index 85aa33a7b62d9..24a2706387593 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute parallel for thread_limit(-10u)
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute parallel for thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute parallel for thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int j=0; j<100; j++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp
index 424797576837f..eff576263849f 100644
--- a/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
for (int i = 0; i < 10; ++i) foo();
#pragma omp target
-#pragma omp teams distribute simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error3 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+#pragma omp teams distribute simd dist_schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (int i = 0; i < 10; ++i) foo();
return T();
diff --git a/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp
index 25ef0f32ddab6..5caa7761595d6 100644
--- a/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute simd num_teams(-10u)
for (int i=0; i<100; i++) foo();
#pragma omp target
-#pragma omp teams distribute simd num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute simd num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int i=0; i<100; i++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp
index e2b30ef2e8f14..9fa771cd57da9 100644
--- a/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute simd thread_limit(-10u)
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute simd thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute simd thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int j=0; j<100; j++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp b/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp
index 14ccbc29d8b42..4067611d47536 100644
--- a/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_thread_limit_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams distribute thread_limit(-10u)
for (int j=0; j<100; j++) foo();
#pragma omp target
-#pragma omp teams distribute thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams distribute thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
for (int j=0; j<100; j++) foo();
return 0;
diff --git a/clang/test/OpenMP/teams_num_teams_messages.cpp b/clang/test/OpenMP/teams_num_teams_messages.cpp
index 92c85ac3d710b..fe976c1a6a226 100644
--- a/clang/test/OpenMP/teams_num_teams_messages.cpp
+++ b/clang/test/OpenMP/teams_num_teams_messages.cpp
@@ -58,7 +58,7 @@ T tmain(T argc) {
#pragma omp teams num_teams(-10u)
foo();
#pragma omp target
-#pragma omp teams num_teams(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams num_teams(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
#pragma omp target
#pragma omp teams num_teams (1, 2, 3) // expected-error {{unexpected number of expressions in 'num_teams' clause (expected 1, have 3)}}
diff --git a/clang/test/OpenMP/teams_thread_limit_messages.cpp b/clang/test/OpenMP/teams_thread_limit_messages.cpp
index cc42c97ad8ac3..d7f072180d3e9 100644
--- a/clang/test/OpenMP/teams_thread_limit_messages.cpp
+++ b/clang/test/OpenMP/teams_thread_limit_messages.cpp
@@ -55,7 +55,7 @@ T tmain(T argc) {
#pragma omp teams thread_limit(-10u)
foo();
#pragma omp target
-#pragma omp teams thread_limit(3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp teams thread_limit(3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
return 0;
More information about the cfe-commits
mailing list