From: Alexey Bataev Date: Wed, 23 Jul 2014 07:46:59 +0000 (+0000) Subject: [OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' directive. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dea4761c06f9dd40032c31c952922e2cb62ae3c4;p=platform%2Fupstream%2Fllvm.git [OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' directive. llvm-svn: 213728 --- diff --git a/clang/include/clang/AST/DataRecursiveASTVisitor.h b/clang/include/clang/AST/DataRecursiveASTVisitor.h index 579d24c..3e4c3c9e 100644 --- a/clang/include/clang/AST/DataRecursiveASTVisitor.h +++ b/clang/include/clang/AST/DataRecursiveASTVisitor.h @@ -2426,6 +2426,11 @@ bool RecursiveASTVisitor::VisitOMPReadClause(OMPReadClause *) { } template +bool RecursiveASTVisitor::VisitOMPWriteClause(OMPWriteClause *) { + return true; +} + +template template bool RecursiveASTVisitor::VisitOMPClauseList(T *Node) { for (auto *E : Node->varlists()) { diff --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h index 08b1379..b213ddd 100644 --- a/clang/include/clang/AST/OpenMPClause.h +++ b/clang/include/clang/AST/OpenMPClause.h @@ -798,6 +798,35 @@ public: StmtRange children() { return StmtRange(); } }; +/// \brief This represents 'write' clause in the '#pragma omp atomic' directive. +/// +/// \code +/// #pragma omp atomic write +/// \endcode +/// In this example directive '#pragma omp atomic' has 'write' clause. +/// +class OMPWriteClause : public OMPClause { +public: + /// \brief Build 'write' clause. + /// + /// \param StartLoc Starting location of the clause. + /// \param EndLoc Ending location of the clause. + /// + OMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc) + : OMPClause(OMPC_write, StartLoc, EndLoc) {} + + /// \brief Build an empty clause. + /// + OMPWriteClause() + : OMPClause(OMPC_write, SourceLocation(), SourceLocation()) {} + + static bool classof(const OMPClause *T) { + return T->getClauseKind() == OMPC_write; + } + + StmtRange children() { return StmtRange(); } +}; + /// \brief This represents clause 'private' in the '#pragma omp ...' directives. /// /// \code diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h index cef019b..727c8a5 100644 --- a/clang/include/clang/AST/RecursiveASTVisitor.h +++ b/clang/include/clang/AST/RecursiveASTVisitor.h @@ -2448,6 +2448,11 @@ bool RecursiveASTVisitor::VisitOMPReadClause(OMPReadClause *) { } template +bool RecursiveASTVisitor::VisitOMPWriteClause(OMPWriteClause *) { + return true; +} + +template template bool RecursiveASTVisitor::VisitOMPClauseList(T *Node) { for (auto *E : Node->varlists()) { diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index f0975bd..28590cf 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -7151,6 +7151,13 @@ def err_omp_parallel_reduction_in_task_firstprivate : Error< def err_omp_atomic_read_not_expression_statement : Error< "the statement for 'atomic read' must be an expression statement of form 'v = x;'," " where v and x are both l-value expressions with scalar type">; +def err_omp_atomic_write_not_expression_statement : Error< + "the statement for 'atomic write' must be an expression statement of form 'x = expr;'," + " where x is an l-value expression with scalar type">; +def err_omp_atomic_several_clauses : Error< + "directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause">; +def note_omp_atomic_previous_clause : Note< + "'%0' clause used here">; } // end of OpenMP category let CategoryName = "Related Result Type Issue" in { diff --git a/clang/include/clang/Basic/OpenMPKinds.def b/clang/include/clang/Basic/OpenMPKinds.def index 9fe3fe9..ac87a2a 100644 --- a/clang/include/clang/Basic/OpenMPKinds.def +++ b/clang/include/clang/Basic/OpenMPKinds.def @@ -102,6 +102,7 @@ OPENMP_CLAUSE(untied, OMPUntiedClause) OPENMP_CLAUSE(mergeable, OMPMergeableClause) OPENMP_CLAUSE(flush, OMPFlushClause) OPENMP_CLAUSE(read, OMPReadClause) +OPENMP_CLAUSE(write, OMPWriteClause) // Clauses allowed for OpenMP directive 'parallel'. OPENMP_PARALLEL_CLAUSE(if) @@ -201,6 +202,7 @@ OPENMP_TASK_CLAUSE(mergeable) // TODO More clauses allowed for OpenMP directive 'atomic'. OPENMP_ATOMIC_CLAUSE(read) +OPENMP_ATOMIC_CLAUSE(write) #undef OPENMP_SCHEDULE_KIND #undef OPENMP_PROC_BIND_KIND diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index b08c278..4b59583 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -7485,6 +7485,9 @@ public: /// \brief Called on well-formed 'read' clause. OMPClause *ActOnOpenMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc); + /// \brief Called on well-formed 'write' clause. + OMPClause *ActOnOpenMPWriteClause(SourceLocation StartLoc, + SourceLocation EndLoc); OMPClause * ActOnOpenMPVarListClause(OpenMPClauseKind Kind, ArrayRef Vars, diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 2a704c3..bf90a5e 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -667,6 +667,8 @@ void OMPClausePrinter::VisitOMPMergeableClause(OMPMergeableClause *) { void OMPClausePrinter::VisitOMPReadClause(OMPReadClause *) { OS << "read"; } +void OMPClausePrinter::VisitOMPWriteClause(OMPWriteClause *) { OS << "write"; } + template void OMPClausePrinter::VisitOMPClauseList(T *Node, char StartSym) { for (typename T::varlist_iterator I = Node->varlist_begin(), diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 4cf7077..b65d070 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -312,6 +312,8 @@ void OMPClauseProfiler::VisitOMPMergeableClause(const OMPMergeableClause *) {} void OMPClauseProfiler::VisitOMPReadClause(const OMPReadClause *) {} +void OMPClauseProfiler::VisitOMPWriteClause(const OMPWriteClause *) {} + template void OMPClauseProfiler::VisitOMPClauseList(T *Node) { for (auto *I : Node->varlists()) diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp index 78cfa18..db86cc7 100644 --- a/clang/lib/Basic/OpenMPKinds.cpp +++ b/clang/lib/Basic/OpenMPKinds.cpp @@ -109,6 +109,7 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, case OMPC_mergeable: case OMPC_flush: case OMPC_read: + case OMPC_write: break; } llvm_unreachable("Invalid OpenMP simple clause kind"); @@ -169,6 +170,7 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, case OMPC_mergeable: case OMPC_flush: case OMPC_read: + case OMPC_write: break; } llvm_unreachable("Invalid OpenMP simple clause kind"); diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 9ba18b4..a5bc4a4 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -342,7 +342,7 @@ bool Parser::ParseOpenMPSimpleVarList(OpenMPDirectiveKind Kind, /// | linear-clause | aligned-clause | collapse-clause | /// lastprivate-clause | reduction-clause | proc_bind-clause | /// schedule-clause | copyin-clause | copyprivate-clause | untied-clause | -/// mergeable-clause | flush-clause | read-clause +/// mergeable-clause | flush-clause | read-clause | write-clause /// OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, bool FirstClause) { @@ -373,6 +373,7 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, if (!FirstClause) { Diag(Tok, diag::err_omp_more_one_clause) << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind); + ErrorFound = true; } Clause = ParseOpenMPSingleExprClause(CKind); @@ -387,6 +388,7 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, if (!FirstClause) { Diag(Tok, diag::err_omp_more_one_clause) << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind); + ErrorFound = true; } Clause = ParseOpenMPSimpleClause(CKind); @@ -397,6 +399,7 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, if (!FirstClause) { Diag(Tok, diag::err_omp_more_one_clause) << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind); + ErrorFound = true; } Clause = ParseOpenMPSingleExprWithArgClause(CKind); @@ -406,6 +409,7 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, case OMPC_untied: case OMPC_mergeable: case OMPC_read: + case OMPC_write: // OpenMP [2.7.1, Restrictions, p. 9] // Only one ordered clause can appear on a loop directive. // OpenMP [2.7.1, Restrictions, C/C++, p. 4] @@ -413,6 +417,7 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, if (!FirstClause) { Diag(Tok, diag::err_omp_more_one_clause) << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind); + ErrorFound = true; } Clause = ParseOpenMPClause(CKind); diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 7ec0d2b..318b00c 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -92,16 +92,15 @@ private: Scope *CurScope; SourceLocation ConstructLoc; bool OrderedRegion; - SourceLocation AtomicClauseLoc; SharingMapTy(OpenMPDirectiveKind DKind, DeclarationNameInfo Name, Scope *CurScope, SourceLocation Loc) : SharingMap(), AlignedMap(), DefaultAttr(DSA_unspecified), Directive(DKind), DirectiveName(std::move(Name)), CurScope(CurScope), - ConstructLoc(Loc), OrderedRegion(false), AtomicClauseLoc() {} + ConstructLoc(Loc), OrderedRegion(false) {} SharingMapTy() : SharingMap(), AlignedMap(), DefaultAttr(DSA_unspecified), Directive(OMPD_unknown), DirectiveName(), CurScope(nullptr), - ConstructLoc(), OrderedRegion(false), AtomicClauseLoc() {} + ConstructLoc(), OrderedRegion(false) {} }; typedef SmallVector StackTy; @@ -208,22 +207,6 @@ public: return false; } - /// \brief Checks if the 'atomic' construct has explicitly specified 'read', - /// 'update', 'write' or 'capture' clause. - bool hasAtomicClause() const { - return Stack.back().AtomicClauseLoc.isValid(); - } - /// \brief Gets location of explicitly specified clause for 'atomic' - /// construct. - SourceLocation getAtomicClauseLoc() const { - return Stack.back().AtomicClauseLoc; - } - /// \brief Sets location of explicitly specified clause for 'atomic' - /// directive. - void setAtomicClauseLoc(SourceLocation Loc) { - Stack.back().AtomicClauseLoc = Loc; - } - Scope *getCurScope() const { return Stack.back().CurScope; } Scope *getCurScope() { return Stack.back().CurScope; } SourceLocation getConstructLoc() { return Stack.back().ConstructLoc; } @@ -2403,15 +2386,34 @@ StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef Clauses, // The point of exit cannot be a branch out of the structured block. // longjmp() and throw() must not violate the entry/exit criteria. // TODO further analysis of associated statements and clauses. + OpenMPClauseKind AtomicKind = OMPC_unknown; + SourceLocation AtomicKindLoc; for (auto *C : Clauses) { - if (C->getClauseKind() == OMPC_read) { - if (!isa(CS->getCapturedStmt())) { - Diag(CS->getCapturedStmt()->getLocStart(), - diag::err_omp_atomic_read_not_expression_statement); - return StmtError(); + if (C->getClauseKind() == OMPC_read || C->getClauseKind() == OMPC_write) { + if (AtomicKind != OMPC_unknown) { + Diag(C->getLocStart(), diag::err_omp_atomic_several_clauses) + << SourceRange(C->getLocStart(), C->getLocEnd()); + Diag(AtomicKindLoc, diag::note_omp_atomic_previous_clause) + << getOpenMPClauseName(AtomicKind); + } else { + AtomicKind = C->getClauseKind(); + AtomicKindLoc = C->getLocStart(); } } } + if (AtomicKind == OMPC_read) { + if (!isa(CS->getCapturedStmt())) { + Diag(CS->getCapturedStmt()->getLocStart(), + diag::err_omp_atomic_read_not_expression_statement); + return StmtError(); + } + } else if (AtomicKind == OMPC_write) { + if (!isa(CS->getCapturedStmt())) { + Diag(CS->getCapturedStmt()->getLocStart(), + diag::err_omp_atomic_write_not_expression_statement); + return StmtError(); + } + } getCurFunction()->setHasBranchProtectedScope(); @@ -2458,6 +2460,7 @@ OMPClause *Sema::ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr, case OMPC_threadprivate: case OMPC_flush: case OMPC_read: + case OMPC_write: case OMPC_unknown: llvm_unreachable("Clause is not allowed."); } @@ -2500,7 +2503,6 @@ OMPClause *Sema::ActOnOpenMPFinalClause(Expr *Condition, return new (Context) OMPFinalClause(ValExpr, StartLoc, LParenLoc, EndLoc); } - ExprResult Sema::PerformOpenMPImplicitIntegerConversion(SourceLocation Loc, Expr *Op) { if (!Op) @@ -2662,6 +2664,7 @@ OMPClause *Sema::ActOnOpenMPSimpleClause( case OMPC_threadprivate: case OMPC_flush: case OMPC_read: + case OMPC_write: case OMPC_unknown: llvm_unreachable("Clause is not allowed."); } @@ -2778,6 +2781,7 @@ OMPClause *Sema::ActOnOpenMPSingleExprWithArgClause( case OMPC_threadprivate: case OMPC_flush: case OMPC_read: + case OMPC_write: case OMPC_unknown: llvm_unreachable("Clause is not allowed."); } @@ -2860,6 +2864,9 @@ OMPClause *Sema::ActOnOpenMPClause(OpenMPClauseKind Kind, case OMPC_read: Res = ActOnOpenMPReadClause(StartLoc, EndLoc); break; + case OMPC_write: + Res = ActOnOpenMPWriteClause(StartLoc, EndLoc); + break; case OMPC_if: case OMPC_final: case OMPC_num_threads: @@ -2908,10 +2915,14 @@ OMPClause *Sema::ActOnOpenMPMergeableClause(SourceLocation StartLoc, OMPClause *Sema::ActOnOpenMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc) { - DSAStack->setAtomicClauseLoc(StartLoc); return new (Context) OMPReadClause(StartLoc, EndLoc); } +OMPClause *Sema::ActOnOpenMPWriteClause(SourceLocation StartLoc, + SourceLocation EndLoc) { + return new (Context) OMPWriteClause(StartLoc, EndLoc); +} + OMPClause *Sema::ActOnOpenMPVarListClause( OpenMPClauseKind Kind, ArrayRef VarList, Expr *TailExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, @@ -2966,6 +2977,7 @@ OMPClause *Sema::ActOnOpenMPVarListClause( case OMPC_mergeable: case OMPC_threadprivate: case OMPC_read: + case OMPC_write: case OMPC_unknown: llvm_unreachable("Clause is not allowed."); } @@ -4266,3 +4278,4 @@ OMPClause *Sema::ActOnOpenMPFlushClause(ArrayRef VarList, return OMPFlushClause::Create(Context, StartLoc, LParenLoc, EndLoc, VarList); } + diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index fff0e57..66da412 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -6768,6 +6768,12 @@ OMPClause *TreeTransform::TransformOMPReadClause(OMPReadClause *C) { } template +OMPClause *TreeTransform::TransformOMPWriteClause(OMPWriteClause *C) { + // No need to rebuild this clause, no template-dependent parameters. + return C; +} + +template OMPClause * TreeTransform::TransformOMPPrivateClause(OMPPrivateClause *C) { llvm::SmallVector Vars; diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index ae87017..7cefa80 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -1718,6 +1718,9 @@ OMPClause *OMPClauseReader::readClause() { case OMPC_read: C = new (Context) OMPReadClause(); break; + case OMPC_write: + C = new (Context) OMPWriteClause(); + break; case OMPC_private: C = OMPPrivateClause::CreateEmpty(Context, Record[Idx++]); break; @@ -1814,6 +1817,8 @@ void OMPClauseReader::VisitOMPMergeableClause(OMPMergeableClause *) {} void OMPClauseReader::VisitOMPReadClause(OMPReadClause *) {} +void OMPClauseReader::VisitOMPWriteClause(OMPWriteClause *) {} + void OMPClauseReader::VisitOMPPrivateClause(OMPPrivateClause *C) { C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx)); unsigned NumVars = C->varlist_size(); diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index d42f9d6..5048594 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -1737,6 +1737,8 @@ void OMPClauseWriter::VisitOMPMergeableClause(OMPMergeableClause *) {} void OMPClauseWriter::VisitOMPReadClause(OMPReadClause *) {} +void OMPClauseWriter::VisitOMPWriteClause(OMPWriteClause *) {} + void OMPClauseWriter::VisitOMPPrivateClause(OMPPrivateClause *C) { Record.push_back(C->varlist_size()); Writer->Writer.AddSourceLocation(C->getLParenLoc(), Record); diff --git a/clang/test/OpenMP/atomic_ast_print.cpp b/clang/test/OpenMP/atomic_ast_print.cpp index 957d4ae..a24e34f 100644 --- a/clang/test/OpenMP/atomic_ast_print.cpp +++ b/clang/test/OpenMP/atomic_ast_print.cpp @@ -7,37 +7,47 @@ #define HEADER template -T foo(T arg) { - T a; +T foo(T argc) { + T a = T(); #pragma omp atomic a++; #pragma omp atomic read - a = arg; + a = argc; +#pragma omp atomic write + a = argc + argc; return T(); } -// CHECK: int a; +// CHECK: int a = int(); // CHECK-NEXT: #pragma omp atomic // CHECK-NEXT: a++; // CHECK-NEXT: #pragma omp atomic read -// CHECK-NEXT: a = arg; -// CHECK: T a; +// CHECK-NEXT: a = argc; +// CHECK-NEXT: #pragma omp atomic write +// CHECK-NEXT: a = argc + argc; +// CHECK: T a = T(); // CHECK-NEXT: #pragma omp atomic // CHECK-NEXT: a++; // CHECK-NEXT: #pragma omp atomic read -// CHECK-NEXT: a = arg; +// CHECK-NEXT: a = argc; +// CHECK-NEXT: #pragma omp atomic write +// CHECK-NEXT: a = argc + argc; int main(int argc, char **argv) { - int a; -// CHECK: int a; + int a = 0; +// CHECK: int a = 0; #pragma omp atomic a++; #pragma omp atomic read a = argc; +#pragma omp atomic write + a = argc + argc; // CHECK-NEXT: #pragma omp atomic // CHECK-NEXT: a++; // CHECK-NEXT: #pragma omp atomic read // CHECK-NEXT: a = argc; + // CHECK-NEXT: #pragma omp atomic write + // CHECK-NEXT: a = argc + argc; return foo(a); } diff --git a/clang/test/OpenMP/atomic_messages.cpp b/clang/test/OpenMP/atomic_messages.cpp index 7b35e42..4bc7686 100644 --- a/clang/test/OpenMP/atomic_messages.cpp +++ b/clang/test/OpenMP/atomic_messages.cpp @@ -45,3 +45,59 @@ int read() { return read(); } + +template +T write() { + T a, b = 0; +// Test for atomic write +#pragma omp atomic write +// expected-error@+1 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is an l-value expression with scalar type}} + ; +// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'write' clause}} +#pragma omp atomic write write + a = b; + + return T(); +} + +int write() { + int a, b = 0; +// Test for atomic write +#pragma omp atomic write +// expected-error@+1 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is an l-value expression with scalar type}} + ; +// expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'write' clause}} +#pragma omp atomic write write + a = b; + + return write(); +} + +template +T mixed() { + T a, b = T(); +// expected-error@+2 2 {{directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause}} +// expected-note@+1 2 {{'read' clause used here}} +#pragma omp atomic read write + a = b; +// expected-error@+2 2 {{directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause}} +// expected-note@+1 2 {{'write' clause used here}} +#pragma omp atomic write read + a = b; + return T(); +} + +int mixed() { + int a, b = 0; +// expected-error@+2 {{directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause}} +// expected-note@+1 {{'read' clause used here}} +#pragma omp atomic read write + a = b; +// expected-error@+2 {{directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause}} +// expected-note@+1 {{'write' clause used here}} +#pragma omp atomic write read + a = b; +// expected-note@+1 {{in instantiation of function template specialization 'mixed' requested here}} + return mixed(); +} + diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 099302f..e989566 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1983,6 +1983,8 @@ void OMPClauseEnqueue::VisitOMPMergeableClause(const OMPMergeableClause *) {} void OMPClauseEnqueue::VisitOMPReadClause(const OMPReadClause *) {} +void OMPClauseEnqueue::VisitOMPWriteClause(const OMPWriteClause *) {} + template void OMPClauseEnqueue::VisitOMPClauseList(T *Node) { for (const auto *I : Node->varlists())