Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaOpenMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3286,7 +3286,7 @@ SemaOpenMP::ActOnOpenMPGroupPrivateDirective(SourceLocation Loc,
ArrayRef<Expr *> VarList) {
if (!getLangOpts().OpenMP || getLangOpts().OpenMP < 60) {
Diag(Loc, diag::err_omp_unexpected_directive)
<< getOpenMPDirectiveName(OMPD_groupprivate, getLangOpts().OpenMP);
<< 1 << getOpenMPDirectiveName(OMPD_groupprivate, getLangOpts().OpenMP);
return nullptr;
}
if (OMPGroupPrivateDecl *D = CheckOMPGroupPrivateDecl(Loc, VarList)) {
Expand Down
1 change: 1 addition & 0 deletions clang/test/OpenMP/groupprivate_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#pragma omp groupprivate( // expected-error {{expected identifier}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp groupprivate() // expected-error {{expected identifier}}
#pragma omp groupprivate(1) // expected-error {{expected unqualified-id}}
#pragma omp groupprivate(a) // expected-error {{use of undeclared identifier 'a'}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it test the bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The crash was reported for the same line of code

struct CompleteSt{
int a;
};
Expand Down