r211342 - [OPENMP] Initial support for 'schedule' clause.
Tobias Grosser
tobias at grosser.es
Tue Jul 8 05:17:33 PDT 2014
On 20/06/2014 09:16, Alexey Bataev wrote:
> Author: abataev
> Date: Fri Jun 20 02:16:17 2014
> New Revision: 211342
>
> URL: http://llvm.org/viewvc/llvm-project?rev=211342&view=rev
> Log:
> [OPENMP] Initial support for 'schedule' clause.
>
> Added:
> cfe/trunk/test/OpenMP/for_schedule_messages.cpp (with props)
> Modified:
> cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
> cfe/trunk/include/clang/AST/OpenMPClause.h
> cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
> cfe/trunk/include/clang/Basic/OpenMPKinds.def
> cfe/trunk/include/clang/Basic/OpenMPKinds.h
> cfe/trunk/include/clang/Parse/Parser.h
> cfe/trunk/include/clang/Sema/Sema.h
> cfe/trunk/lib/AST/StmtPrinter.cpp
> cfe/trunk/lib/AST/StmtProfile.cpp
> cfe/trunk/lib/Basic/OpenMPKinds.cpp
> cfe/trunk/lib/Parse/ParseOpenMP.cpp
> cfe/trunk/lib/Sema/SemaOpenMP.cpp
> cfe/trunk/lib/Sema/TreeTransform.h
> cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
> cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
> cfe/trunk/test/OpenMP/for_ast_print.cpp
> cfe/trunk/tools/libclang/CIndex.cpp
>
> Modified: cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h?rev=211342&r1=211341&r2=211342&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h (original)
> +++ cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h Fri Jun 20 02:16:17 2014
> @@ -2344,6 +2344,13 @@ RecursiveASTVisitor<Derived>::VisitOMPPr
> }
>
> template <typename Derived>
> +bool
> +RecursiveASTVisitor<Derived>::VisitOMPScheduleClause(OMPScheduleClause *C) {
> + TraverseStmt(C->getChunkSize());
> + return true;
> +}
I just got a coverity mail, which to my understanding warned that the
return value of TraverseStmt() is not checked here. Looking at the other
definitions in this file the uses of TraverseStmt() outside of OMP
support are commonly guarded by the TRY_TO() macro. However, in the OMP
related code the return value is always ignored. Is this a bug/problem?
To my understanding, several more cases miss a TRY_TO macro, and this
function:
template <typename Derived>
template <typename T>
void RecursiveASTVisitor<Derived>::VisitOMPClauseList(T *Node) {
for (auto *I : Node->varlists())
TraverseStmt(I);
}
does not even have the possibility to return a boolean value.
Cheers,
Tobias
More information about the cfe-commits
mailing list