From 4c8035bca46c7d05f04215ccae1fdc0fd1fd8db5 Mon Sep 17 00:00:00 2001 From: Samuel Antao Date: Mon, 12 Dec 2016 18:00:20 +0000 Subject: [PATCH] Fix format and a few typos in comments. llvm-svn: 289450 --- clang/include/clang-c/Index.h | 2 +- clang/lib/CodeGen/CGOpenMPRuntime.cpp | 11 +++++------ clang/lib/Sema/SemaOpenMP.cpp | 21 ++++++++++----------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index f5d44f8..5756f9f 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -326,7 +326,7 @@ clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file); * * \param tu the translation unit * -* \param file_name the name of the file. + * \param file_name the name of the file. * * \returns the file handle for the named file in the translation unit \p tu, * or a NULL file handle if the file was not a part of this translation unit. diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index c03e449..05aff9d 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -490,7 +490,7 @@ enum OpenMPSchedType { OMP_sch_runtime = 37, OMP_sch_auto = 38, /// static with chunk adjustment (e.g., simd) - OMP_sch_static_balanced_chunked = 45, + OMP_sch_static_balanced_chunked = 45, /// \brief Lower bound for 'ordered' versions. OMP_ord_lower = 64, OMP_ord_static_chunked = 65, @@ -2930,8 +2930,8 @@ void CGOpenMPRuntime::createOffloadEntry(llvm::Constant *ID, void CGOpenMPRuntime::createOffloadEntriesAndInfoMetadata() { // Emit the offloading entries and metadata so that the device codegen side - // can - // easily figure out what to emit. The produced metadata looks like this: + // can easily figure out what to emit. The produced metadata looks like + // this: // // !omp_offload.info = !{!1, ...} // @@ -4444,9 +4444,8 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, auto *IdentTLoc = emitUpdateLocation(CGF, Loc, OMP_ATOMIC_REDUCE); auto *ThreadId = getThreadID(CGF, Loc); auto *ReductionArrayTySize = CGF.getTypeSize(ReductionArrayTy); - auto *RL = - CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(ReductionList.getPointer(), - CGF.VoidPtrTy); + auto *RL = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( + ReductionList.getPointer(), CGF.VoidPtrTy); llvm::Value *Args[] = { IdentTLoc, // ident_t * ThreadId, // i32 diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index f4f0ba6..6aa34b4 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -326,8 +326,8 @@ public: Scope *getCurScope() { return Stack.back().CurScope; } SourceLocation getConstructLoc() { return Stack.back().ConstructLoc; } - // Do the check specified in \a Check to all component lists and return true - // if any issue is found. + /// Do the check specified in \a Check to all component lists and return true + /// if any issue is found. bool checkMappableExprComponentListsForDecl( ValueDecl *VD, bool CurrentRegionOnly, const llvm::function_ref< @@ -355,8 +355,8 @@ public: return false; } - // Create a new mappable expression component list associated with a given - // declaration and initialize it with the provided list of components. + /// Create a new mappable expression component list associated with a given + /// declaration and initialize it with the provided list of components. void addMappableExpressionComponents( ValueDecl *VD, OMPClauseMappableExprCommon::MappableExprComponentListRef Components, @@ -919,7 +919,7 @@ bool Sema::IsOpenMPCapturedByRef(ValueDecl *D, unsigned Level) { OpenMPClauseKind WhereFoundClauseKind) { // Only the map clause information influences how a variable is // captured. E.g. is_device_ptr does not require changing the default - // behaviour. + // behavior. if (WhereFoundClauseKind != OMPC_map) return false; @@ -3359,7 +3359,7 @@ Expr *OpenMPIterationSpaceChecker::BuildPrivateCounterVar() const { return nullptr; } -/// \brief Build instillation of the counter be used for codegen. +/// \brief Build initialization of the counter to be used for codegen. Expr *OpenMPIterationSpaceChecker::BuildCounterInit() const { return LB; } /// \brief Build step of the counter be used for codegen. @@ -6124,11 +6124,10 @@ StmtResult Sema::ActOnOpenMPTeamsDistributeSimdDirective( OMPLoopDirective::HelperExprs B; // In presence of clause 'collapse' with number of loops, it will // define the nested loops number. - unsigned NestedLoopCount = - CheckOpenMPLoop(OMPD_teams_distribute_simd, - getCollapseNumberExpr(Clauses), - nullptr /*ordered not a clause on distribute*/, AStmt, - *this, *DSAStack, VarsWithImplicitDSA, B); + unsigned NestedLoopCount = CheckOpenMPLoop( + OMPD_teams_distribute_simd, getCollapseNumberExpr(Clauses), + nullptr /*ordered not a clause on distribute*/, AStmt, *this, *DSAStack, + VarsWithImplicitDSA, B); if (NestedLoopCount == 0) return StmtError(); -- 2.7.4