@@ -467,7 +467,7 @@ class DSAStackTy {
467
467
getTopOfStack().PossiblyLoopCounter = D ? D->getCanonicalDecl() : D;
468
468
}
469
469
/// Gets the possible loop counter decl.
470
- const Decl *getPossiblyLoopCunter () const {
470
+ const Decl *getPossiblyLoopCounter () const {
471
471
return getTopOfStack().PossiblyLoopCounter;
472
472
}
473
473
/// Start new OpenMP region stack in new non-capturing function.
@@ -719,7 +719,7 @@ class DSAStackTy {
719
719
TargetLocations.push_back(LocStart);
720
720
}
721
721
722
- /// Add location for the first encountered atomicc directive.
722
+ /// Add location for the first encountered atomic directive.
723
723
void addAtomicDirectiveLoc(SourceLocation Loc) {
724
724
if (AtomicLocation.isInvalid())
725
725
AtomicLocation = Loc;
@@ -2585,7 +2585,7 @@ OpenMPClauseKind SemaOpenMP::isOpenMPPrivateDecl(ValueDecl *D, unsigned Level,
2585
2585
DSAStack->loopStart();
2586
2586
return OMPC_private;
2587
2587
}
2588
- if ((DSAStack->getPossiblyLoopCunter () == D->getCanonicalDecl() ||
2588
+ if ((DSAStack->getPossiblyLoopCounter () == D->getCanonicalDecl() ||
2589
2589
DSAStack->isLoopControlVariable(D).first) &&
2590
2590
!DSAStack->hasExplicitDSA(
2591
2591
D, [](OpenMPClauseKind K, bool) { return K != OMPC_private; },
@@ -2695,8 +2695,8 @@ bool SemaOpenMP::isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level,
2695
2695
unsigned NumLevels =
2696
2696
getOpenMPCaptureLevels(DSAStack->getDirective(Level));
2697
2697
if (Level == 0)
2698
- // non-file scope static variale with default(firstprivate)
2699
- // should be gloabal captured.
2698
+ // non-file scope static variable with default(firstprivate)
2699
+ // should be global captured.
2700
2700
return (NumLevels == CaptureLevel + 1 &&
2701
2701
(TopDVar.CKind != OMPC_shared ||
2702
2702
DSAStack->getDefaultDSA() == DSA_firstprivate));
@@ -2731,11 +2731,11 @@ void SemaOpenMP::finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller,
2731
2731
assert(getLangOpts().OpenMP && "Expected OpenMP compilation mode.");
2732
2732
std::optional<OMPDeclareTargetDeclAttr::DevTypeTy> DevTy =
2733
2733
OMPDeclareTargetDeclAttr::getDeviceType(Caller->getMostRecentDecl());
2734
- // Ignore host functions during device analyzis .
2734
+ // Ignore host functions during device analysis .
2735
2735
if (getLangOpts().OpenMPIsTargetDevice &&
2736
2736
(!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host))
2737
2737
return;
2738
- // Ignore nohost functions during host analyzis .
2738
+ // Ignore nohost functions during host analysis .
2739
2739
if (!getLangOpts().OpenMPIsTargetDevice && DevTy &&
2740
2740
*DevTy == OMPDeclareTargetDeclAttr::DT_NoHost)
2741
2741
return;
@@ -3904,7 +3904,7 @@ class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {
3904
3904
if (SemaRef.LangOpts.OpenMP >= 50)
3905
3905
return !StackComponents.empty();
3906
3906
// Variable is used if it has been marked as an array, array
3907
- // section, array shaping or the variable iself .
3907
+ // section, array shaping or the variable itself .
3908
3908
return StackComponents.size() == 1 ||
3909
3909
llvm::all_of(
3910
3910
llvm::drop_begin(llvm::reverse(StackComponents)),
@@ -5783,7 +5783,7 @@ static CapturedStmt *buildDistanceFunc(Sema &Actions, QualType LogicalTy,
5783
5783
// Divide by the absolute step amount. If the range is not a multiple of
5784
5784
// the step size, rounding-up the effective upper bound ensures that the
5785
5785
// last iteration is included.
5786
- // Note that the rounding-up may cause an overflow in a temporry that
5786
+ // Note that the rounding-up may cause an overflow in a temporary that
5787
5787
// could be avoided, but would have occurred in a C-style for-loop as
5788
5788
// well.
5789
5789
Expr *Divisor = BuildVarRef(NewStep);
@@ -6064,7 +6064,7 @@ static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S,
6064
6064
static void
6065
6065
processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack,
6066
6066
SmallVectorImpl<OMPClause *> &Clauses) {
6067
- // Check for the deault mapper for data members.
6067
+ // Check for the default mapper for data members.
6068
6068
if (S.getLangOpts().OpenMP < 50)
6069
6069
return;
6070
6070
SmallVector<OMPClause *, 4> ImplicitMaps;
@@ -6882,7 +6882,7 @@ StmtResult SemaOpenMP::ActOnOpenMPExecutableDirective(
6882
6882
switch (C->getClauseKind()) {
6883
6883
case OMPC_num_threads:
6884
6884
case OMPC_dist_schedule:
6885
- // Do not analyse if no parent teams directive.
6885
+ // Do not analyze if no parent teams directive.
6886
6886
if (isOpenMPTeamsDirective(Kind))
6887
6887
break;
6888
6888
continue;
@@ -7703,7 +7703,7 @@ SemaOpenMP::checkOpenMPDeclareVariantFunction(SemaOpenMP::DeclGroupPtrTy DG,
7703
7703
FnPtrType = Context.getMemberPointerType(AdjustedFnType, ClassType);
7704
7704
ExprResult ER;
7705
7705
{
7706
- // Build adrr_of unary op to correctly handle type checks for member
7706
+ // Build addr_of unary op to correctly handle type checks for member
7707
7707
// functions.
7708
7708
Sema::TentativeAnalysisScope Trap(SemaRef);
7709
7709
ER = SemaRef.CreateBuiltinUnaryOp(VariantRef->getBeginLoc(), UO_AddrOf,
@@ -8262,7 +8262,7 @@ bool OpenMPIterationSpaceChecker::setStep(Expr *NewStep, bool Subtract) {
8262
8262
diag::err_omp_loop_incr_not_compatible)
8263
8263
<< LCDecl << *TestIsLessOp << NewStep->getSourceRange();
8264
8264
SemaRef.Diag(ConditionLoc,
8265
- diag::note_omp_loop_cond_requres_compatible_incr )
8265
+ diag::note_omp_loop_cond_requires_compatible_incr )
8266
8266
<< *TestIsLessOp << ConditionSrcRange;
8267
8267
return true;
8268
8268
}
@@ -9345,7 +9345,7 @@ void SemaOpenMP::ActOnOpenMPLoopInitialization(SourceLocation ForLoc,
9345
9345
}
9346
9346
}
9347
9347
DSAStack->addLoopControlVariable(D, VD);
9348
- const Decl *LD = DSAStack->getPossiblyLoopCunter ();
9348
+ const Decl *LD = DSAStack->getPossiblyLoopCounter ();
9349
9349
if (LD != D->getCanonicalDecl()) {
9350
9350
DSAStack->resetPossibleLoopCounter();
9351
9351
if (auto *Var = dyn_cast_or_null<VarDecl>(LD))
@@ -9407,7 +9407,7 @@ void SemaOpenMP::ActOnOpenMPLoopInitialization(SourceLocation ForLoc,
9407
9407
}
9408
9408
9409
9409
namespace {
9410
- // Utility for openmp doacross clause kind
9410
+ // Utility for OpenMP doacross clause kind
9411
9411
class OMPDoacrossKind {
9412
9412
public:
9413
9413
bool isSource(const OMPDoacrossClause *C) {
@@ -9785,7 +9785,7 @@ static Stmt *buildPreInits(ASTContext &Context,
9785
9785
/// stored in lieu of using an explicit list. Flattening is necessary because
9786
9786
/// contained DeclStmts need to be visible after the execution of the list. Used
9787
9787
/// for OpenMP pre-init declarations/statements.
9788
- static void appendFlattendedStmtList (SmallVectorImpl<Stmt *> &TargetList,
9788
+ static void appendFlattenedStmtList (SmallVectorImpl<Stmt *> &TargetList,
9789
9789
Stmt *Item) {
9790
9790
// nullptr represents an empty list.
9791
9791
if (!Item)
@@ -9817,7 +9817,7 @@ static Stmt *buildPreInits(ASTContext &Context, ArrayRef<Stmt *> PreInits) {
9817
9817
9818
9818
SmallVector<Stmt *> Stmts;
9819
9819
for (Stmt *S : PreInits)
9820
- appendFlattendedStmtList (Stmts, S);
9820
+ appendFlattenedStmtList (Stmts, S);
9821
9821
return CompoundStmt::Create(Context, PreInits, FPOptionsOverride(), {}, {});
9822
9822
}
9823
9823
@@ -9921,7 +9921,7 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr,
9921
9921
// Search for pre-init declared variables that need to be captured
9922
9922
// to be referenceable inside the directive.
9923
9923
SmallVector<Stmt *> Constituents;
9924
- appendFlattendedStmtList (Constituents, DependentPreInits);
9924
+ appendFlattenedStmtList (Constituents, DependentPreInits);
9925
9925
for (Stmt *S : Constituents) {
9926
9926
if (auto *DC = dyn_cast<DeclStmt>(S)) {
9927
9927
for (Decl *C : DC->decls()) {
@@ -11407,7 +11407,7 @@ StmtResult SemaOpenMP::ActOnOpenMPScanDirective(ArrayRef<OMPClause *> Clauses,
11407
11407
diag::err_omp_scan_single_clause_expected);
11408
11408
return StmtError();
11409
11409
}
11410
- // Check that scan directive is used in the scopeof the OpenMP loop body.
11410
+ // Check that scan directive is used in the scope of the OpenMP loop body.
11411
11411
if (Scope *S = DSAStack->getCurScope()) {
11412
11412
Scope *ParentS = S->getParent();
11413
11413
if (!ParentS || ParentS->getParent() != ParentS->getBreakParent() ||
@@ -11562,7 +11562,7 @@ class OpenMPAtomicUpdateChecker {
11562
11562
NotAnAssignmentOp,
11563
11563
/// RHS part of the binary operation is not a binary expression.
11564
11564
NotABinaryExpression,
11565
- /// RHS part is not additive/multiplicative/shift/biwise binary
11565
+ /// RHS part is not additive/multiplicative/shift/bitwise binary
11566
11566
/// expression.
11567
11567
NotABinaryOperator,
11568
11568
/// RHS binary operation does not have reference to the updated LHS
@@ -11840,7 +11840,7 @@ class OpenMPAtomicCompareChecker {
11840
11840
InvalidAssignment,
11841
11841
/// Not if statement
11842
11842
NotIfStmt,
11843
- /// More than two statements in a compund statement.
11843
+ /// More than two statements in a compound statement.
11844
11844
MoreThanTwoStmts,
11845
11845
/// Not a compound statement.
11846
11846
NotCompoundStmt,
@@ -14327,7 +14327,7 @@ bool SemaOpenMP::checkTransformableLoopNest(
14327
14327
else
14328
14328
llvm_unreachable("Unhandled loop transformation");
14329
14329
14330
- appendFlattendedStmtList (OriginalInits.back(), DependentPreInits);
14330
+ appendFlattenedStmtList (OriginalInits.back(), DependentPreInits);
14331
14331
});
14332
14332
assert(OriginalInits.back().empty() && "No preinit after innermost loop");
14333
14333
OriginalInits.pop_back();
0 commit comments