@@ -466,7 +466,7 @@ class DSAStackTy {
466
466
getTopOfStack().PossiblyLoopCounter = D ? D->getCanonicalDecl() : D;
467
467
}
468
468
/// Gets the possible loop counter decl.
469
- const Decl *getPossiblyLoopCunter () const {
469
+ const Decl *getPossiblyLoopCounter () const {
470
470
return getTopOfStack().PossiblyLoopCounter;
471
471
}
472
472
/// Start new OpenMP region stack in new non-capturing function.
@@ -718,7 +718,7 @@ class DSAStackTy {
718
718
TargetLocations.push_back(LocStart);
719
719
}
720
720
721
- /// Add location for the first encountered atomicc directive.
721
+ /// Add location for the first encountered atomic directive.
722
722
void addAtomicDirectiveLoc(SourceLocation Loc) {
723
723
if (AtomicLocation.isInvalid())
724
724
AtomicLocation = Loc;
@@ -2584,7 +2584,7 @@ OpenMPClauseKind SemaOpenMP::isOpenMPPrivateDecl(ValueDecl *D, unsigned Level,
2584
2584
DSAStack->loopStart();
2585
2585
return OMPC_private;
2586
2586
}
2587
- if ((DSAStack->getPossiblyLoopCunter () == D->getCanonicalDecl() ||
2587
+ if ((DSAStack->getPossiblyLoopCounter () == D->getCanonicalDecl() ||
2588
2588
DSAStack->isLoopControlVariable(D).first) &&
2589
2589
!DSAStack->hasExplicitDSA(
2590
2590
D, [](OpenMPClauseKind K, bool) { return K != OMPC_private; },
@@ -2694,8 +2694,8 @@ bool SemaOpenMP::isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level,
2694
2694
unsigned NumLevels =
2695
2695
getOpenMPCaptureLevels(DSAStack->getDirective(Level));
2696
2696
if (Level == 0)
2697
- // non-file scope static variale with default(firstprivate)
2698
- // should be gloabal captured.
2697
+ // non-file scope static variable with default(firstprivate)
2698
+ // should be global captured.
2699
2699
return (NumLevels == CaptureLevel + 1 &&
2700
2700
(TopDVar.CKind != OMPC_shared ||
2701
2701
DSAStack->getDefaultDSA() == DSA_firstprivate));
@@ -2730,11 +2730,11 @@ void SemaOpenMP::finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller,
2730
2730
assert(getLangOpts().OpenMP && "Expected OpenMP compilation mode.");
2731
2731
std::optional<OMPDeclareTargetDeclAttr::DevTypeTy> DevTy =
2732
2732
OMPDeclareTargetDeclAttr::getDeviceType(Caller->getMostRecentDecl());
2733
- // Ignore host functions during device analyzis .
2733
+ // Ignore host functions during device analysis .
2734
2734
if (getLangOpts().OpenMPIsTargetDevice &&
2735
2735
(!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host))
2736
2736
return;
2737
- // Ignore nohost functions during host analyzis .
2737
+ // Ignore nohost functions during host analysis .
2738
2738
if (!getLangOpts().OpenMPIsTargetDevice && DevTy &&
2739
2739
*DevTy == OMPDeclareTargetDeclAttr::DT_NoHost)
2740
2740
return;
@@ -3880,7 +3880,7 @@ class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {
3880
3880
if (SemaRef.LangOpts.OpenMP >= 50)
3881
3881
return !StackComponents.empty();
3882
3882
// Variable is used if it has been marked as an array, array
3883
- // section, array shaping or the variable iself .
3883
+ // section, array shaping or the variable itself .
3884
3884
return StackComponents.size() == 1 ||
3885
3885
llvm::all_of(
3886
3886
llvm::drop_begin(llvm::reverse(StackComponents)),
@@ -5759,7 +5759,7 @@ static CapturedStmt *buildDistanceFunc(Sema &Actions, QualType LogicalTy,
5759
5759
// Divide by the absolute step amount. If the range is not a multiple of
5760
5760
// the step size, rounding-up the effective upper bound ensures that the
5761
5761
// last iteration is included.
5762
- // Note that the rounding-up may cause an overflow in a temporry that
5762
+ // Note that the rounding-up may cause an overflow in a temporary that
5763
5763
// could be avoided, but would have occurred in a C-style for-loop as
5764
5764
// well.
5765
5765
Expr *Divisor = BuildVarRef(NewStep);
@@ -6040,7 +6040,7 @@ static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S,
6040
6040
static void
6041
6041
processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack,
6042
6042
SmallVectorImpl<OMPClause *> &Clauses) {
6043
- // Check for the deault mapper for data members.
6043
+ // Check for the default mapper for data members.
6044
6044
if (S.getLangOpts().OpenMP < 50)
6045
6045
return;
6046
6046
SmallVector<OMPClause *, 4> ImplicitMaps;
@@ -6941,7 +6941,7 @@ StmtResult SemaOpenMP::ActOnOpenMPExecutableDirective(
6941
6941
switch (C->getClauseKind()) {
6942
6942
case OMPC_num_threads:
6943
6943
case OMPC_dist_schedule:
6944
- // Do not analyse if no parent teams directive.
6944
+ // Do not analyze if no parent teams directive.
6945
6945
if (isOpenMPTeamsDirective(Kind))
6946
6946
break;
6947
6947
continue;
@@ -7757,7 +7757,7 @@ SemaOpenMP::checkOpenMPDeclareVariantFunction(SemaOpenMP::DeclGroupPtrTy DG,
7757
7757
FnPtrType = Context.getMemberPointerType(AdjustedFnType, ClassType);
7758
7758
ExprResult ER;
7759
7759
{
7760
- // Build adrr_of unary op to correctly handle type checks for member
7760
+ // Build addr_of unary op to correctly handle type checks for member
7761
7761
// functions.
7762
7762
Sema::TentativeAnalysisScope Trap(SemaRef);
7763
7763
ER = SemaRef.CreateBuiltinUnaryOp(VariantRef->getBeginLoc(), UO_AddrOf,
@@ -8299,7 +8299,7 @@ bool OpenMPIterationSpaceChecker::setStep(Expr *NewStep, bool Subtract) {
8299
8299
diag::err_omp_loop_incr_not_compatible)
8300
8300
<< LCDecl << *TestIsLessOp << NewStep->getSourceRange();
8301
8301
SemaRef.Diag(ConditionLoc,
8302
- diag::note_omp_loop_cond_requres_compatible_incr )
8302
+ diag::note_omp_loop_cond_requires_compatible_incr )
8303
8303
<< *TestIsLessOp << ConditionSrcRange;
8304
8304
return true;
8305
8305
}
@@ -9382,7 +9382,7 @@ void SemaOpenMP::ActOnOpenMPLoopInitialization(SourceLocation ForLoc,
9382
9382
}
9383
9383
}
9384
9384
DSAStack->addLoopControlVariable(D, VD);
9385
- const Decl *LD = DSAStack->getPossiblyLoopCunter ();
9385
+ const Decl *LD = DSAStack->getPossiblyLoopCounter ();
9386
9386
if (LD != D->getCanonicalDecl()) {
9387
9387
DSAStack->resetPossibleLoopCounter();
9388
9388
if (auto *Var = dyn_cast_or_null<VarDecl>(LD))
@@ -9444,7 +9444,7 @@ void SemaOpenMP::ActOnOpenMPLoopInitialization(SourceLocation ForLoc,
9444
9444
}
9445
9445
9446
9446
namespace {
9447
- // Utility for openmp doacross clause kind
9447
+ // Utility for OpenMP doacross clause kind
9448
9448
class OMPDoacrossKind {
9449
9449
public:
9450
9450
bool isSource(const OMPDoacrossClause *C) {
@@ -9822,7 +9822,7 @@ static Stmt *buildPreInits(ASTContext &Context,
9822
9822
/// stored in lieu of using an explicit list. Flattening is necessary because
9823
9823
/// contained DeclStmts need to be visible after the execution of the list. Used
9824
9824
/// for OpenMP pre-init declarations/statements.
9825
- static void appendFlattendedStmtList (SmallVectorImpl<Stmt *> &TargetList,
9825
+ static void appendFlattenedStmtList (SmallVectorImpl<Stmt *> &TargetList,
9826
9826
Stmt *Item) {
9827
9827
// nullptr represents an empty list.
9828
9828
if (!Item)
@@ -9854,7 +9854,7 @@ static Stmt *buildPreInits(ASTContext &Context, ArrayRef<Stmt *> PreInits) {
9854
9854
9855
9855
SmallVector<Stmt *> Stmts;
9856
9856
for (Stmt *S : PreInits)
9857
- appendFlattendedStmtList (Stmts, S);
9857
+ appendFlattenedStmtList (Stmts, S);
9858
9858
return CompoundStmt::Create(Context, PreInits, FPOptionsOverride(), {}, {});
9859
9859
}
9860
9860
@@ -9958,7 +9958,7 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr,
9958
9958
// Search for pre-init declared variables that need to be captured
9959
9959
// to be referenceable inside the directive.
9960
9960
SmallVector<Stmt *> Constituents;
9961
- appendFlattendedStmtList (Constituents, DependentPreInits);
9961
+ appendFlattenedStmtList (Constituents, DependentPreInits);
9962
9962
for (Stmt *S : Constituents) {
9963
9963
if (auto *DC = dyn_cast<DeclStmt>(S)) {
9964
9964
for (Decl *C : DC->decls()) {
@@ -11628,7 +11628,7 @@ StmtResult SemaOpenMP::ActOnOpenMPScanDirective(ArrayRef<OMPClause *> Clauses,
11628
11628
diag::err_omp_scan_single_clause_expected);
11629
11629
return StmtError();
11630
11630
}
11631
- // Check that scan directive is used in the scopeof the OpenMP loop body.
11631
+ // Check that scan directive is used in the scope of the OpenMP loop body.
11632
11632
if (Scope *S = DSAStack->getCurScope()) {
11633
11633
Scope *ParentS = S->getParent();
11634
11634
if (!ParentS || ParentS->getParent() != ParentS->getBreakParent() ||
@@ -11783,7 +11783,7 @@ class OpenMPAtomicUpdateChecker {
11783
11783
NotAnAssignmentOp,
11784
11784
/// RHS part of the binary operation is not a binary expression.
11785
11785
NotABinaryExpression,
11786
- /// RHS part is not additive/multiplicative/shift/biwise binary
11786
+ /// RHS part is not additive/multiplicative/shift/bitwise binary
11787
11787
/// expression.
11788
11788
NotABinaryOperator,
11789
11789
/// RHS binary operation does not have reference to the updated LHS
@@ -12061,7 +12061,7 @@ class OpenMPAtomicCompareChecker {
12061
12061
InvalidAssignment,
12062
12062
/// Not if statement
12063
12063
NotIfStmt,
12064
- /// More than two statements in a compund statement.
12064
+ /// More than two statements in a compound statement.
12065
12065
MoreThanTwoStmts,
12066
12066
/// Not a compound statement.
12067
12067
NotCompoundStmt,
@@ -15138,7 +15138,7 @@ bool SemaOpenMP::checkTransformableLoopNest(
15138
15138
else
15139
15139
llvm_unreachable("Unhandled loop transformation");
15140
15140
15141
- appendFlattendedStmtList (OriginalInits.back(), DependentPreInits);
15141
+ appendFlattenedStmtList (OriginalInits.back(), DependentPreInits);
15142
15142
});
15143
15143
assert(OriginalInits.back().empty() && "No preinit after innermost loop");
15144
15144
OriginalInits.pop_back();
0 commit comments