Skip to content

Commit bcce7cf

Browse files
committed
[OpenMP] SemaOpenMP.cpp and StmtOpenMP.cpp spelling fixes
This patch just fixes a few spelling mistakes in the above two files. (I changed one British spelling to American -- analyse to analyze -- because the latter spelling is used elsewhere in file, and it's probably best to be consistent.)
1 parent 2033b1c commit bcce7cf

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11117,7 +11117,7 @@ def err_omp_loop_variable_type : Error<
1111711117
def err_omp_loop_incr_not_compatible : Error<
1111811118
"increment expression must cause %0 to %select{decrease|increase}1 "
1111911119
"on each iteration of OpenMP for loop">;
11120-
def note_omp_loop_cond_requres_compatible_incr : Note<
11120+
def note_omp_loop_cond_requires_compatible_incr : Note<
1112111121
"loop step is expected to be %select{negative|positive}0 due to this condition">;
1112211122
def err_omp_loop_diff_cxx : Error<
1112311123
"could not calculate number of iterations calling 'operator-' with "

clang/lib/AST/StmtOpenMP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88
//
9-
// This file implements the subclesses of Stmt class declared in StmtOpenMP.h
9+
// This file implements the subclasses of Stmt class declared in StmtOpenMP.h
1010
//
1111
//===----------------------------------------------------------------------===//
1212

clang/lib/Sema/SemaOpenMP.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ class DSAStackTy {
466466
getTopOfStack().PossiblyLoopCounter = D ? D->getCanonicalDecl() : D;
467467
}
468468
/// Gets the possible loop counter decl.
469-
const Decl *getPossiblyLoopCunter() const {
469+
const Decl *getPossiblyLoopCounter() const {
470470
return getTopOfStack().PossiblyLoopCounter;
471471
}
472472
/// Start new OpenMP region stack in new non-capturing function.
@@ -718,7 +718,7 @@ class DSAStackTy {
718718
TargetLocations.push_back(LocStart);
719719
}
720720

721-
/// Add location for the first encountered atomicc directive.
721+
/// Add location for the first encountered atomic directive.
722722
void addAtomicDirectiveLoc(SourceLocation Loc) {
723723
if (AtomicLocation.isInvalid())
724724
AtomicLocation = Loc;
@@ -2584,7 +2584,7 @@ OpenMPClauseKind SemaOpenMP::isOpenMPPrivateDecl(ValueDecl *D, unsigned Level,
25842584
DSAStack->loopStart();
25852585
return OMPC_private;
25862586
}
2587-
if ((DSAStack->getPossiblyLoopCunter() == D->getCanonicalDecl() ||
2587+
if ((DSAStack->getPossiblyLoopCounter() == D->getCanonicalDecl() ||
25882588
DSAStack->isLoopControlVariable(D).first) &&
25892589
!DSAStack->hasExplicitDSA(
25902590
D, [](OpenMPClauseKind K, bool) { return K != OMPC_private; },
@@ -2694,8 +2694,8 @@ bool SemaOpenMP::isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level,
26942694
unsigned NumLevels =
26952695
getOpenMPCaptureLevels(DSAStack->getDirective(Level));
26962696
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.
26992699
return (NumLevels == CaptureLevel + 1 &&
27002700
(TopDVar.CKind != OMPC_shared ||
27012701
DSAStack->getDefaultDSA() == DSA_firstprivate));
@@ -2730,11 +2730,11 @@ void SemaOpenMP::finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller,
27302730
assert(getLangOpts().OpenMP && "Expected OpenMP compilation mode.");
27312731
std::optional<OMPDeclareTargetDeclAttr::DevTypeTy> DevTy =
27322732
OMPDeclareTargetDeclAttr::getDeviceType(Caller->getMostRecentDecl());
2733-
// Ignore host functions during device analyzis.
2733+
// Ignore host functions during device analysis.
27342734
if (getLangOpts().OpenMPIsTargetDevice &&
27352735
(!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host))
27362736
return;
2737-
// Ignore nohost functions during host analyzis.
2737+
// Ignore nohost functions during host analysis.
27382738
if (!getLangOpts().OpenMPIsTargetDevice && DevTy &&
27392739
*DevTy == OMPDeclareTargetDeclAttr::DT_NoHost)
27402740
return;
@@ -3880,7 +3880,7 @@ class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {
38803880
if (SemaRef.LangOpts.OpenMP >= 50)
38813881
return !StackComponents.empty();
38823882
// 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.
38843884
return StackComponents.size() == 1 ||
38853885
llvm::all_of(
38863886
llvm::drop_begin(llvm::reverse(StackComponents)),
@@ -5759,7 +5759,7 @@ static CapturedStmt *buildDistanceFunc(Sema &Actions, QualType LogicalTy,
57595759
// Divide by the absolute step amount. If the range is not a multiple of
57605760
// the step size, rounding-up the effective upper bound ensures that the
57615761
// 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
57635763
// could be avoided, but would have occurred in a C-style for-loop as
57645764
// well.
57655765
Expr *Divisor = BuildVarRef(NewStep);
@@ -6040,7 +6040,7 @@ static ExprResult buildUserDefinedMapperRef(Sema &SemaRef, Scope *S,
60406040
static void
60416041
processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack,
60426042
SmallVectorImpl<OMPClause *> &Clauses) {
6043-
// Check for the deault mapper for data members.
6043+
// Check for the default mapper for data members.
60446044
if (S.getLangOpts().OpenMP < 50)
60456045
return;
60466046
SmallVector<OMPClause *, 4> ImplicitMaps;
@@ -6941,7 +6941,7 @@ StmtResult SemaOpenMP::ActOnOpenMPExecutableDirective(
69416941
switch (C->getClauseKind()) {
69426942
case OMPC_num_threads:
69436943
case OMPC_dist_schedule:
6944-
// Do not analyse if no parent teams directive.
6944+
// Do not analyze if no parent teams directive.
69456945
if (isOpenMPTeamsDirective(Kind))
69466946
break;
69476947
continue;
@@ -7757,7 +7757,7 @@ SemaOpenMP::checkOpenMPDeclareVariantFunction(SemaOpenMP::DeclGroupPtrTy DG,
77577757
FnPtrType = Context.getMemberPointerType(AdjustedFnType, ClassType);
77587758
ExprResult ER;
77597759
{
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
77617761
// functions.
77627762
Sema::TentativeAnalysisScope Trap(SemaRef);
77637763
ER = SemaRef.CreateBuiltinUnaryOp(VariantRef->getBeginLoc(), UO_AddrOf,
@@ -8299,7 +8299,7 @@ bool OpenMPIterationSpaceChecker::setStep(Expr *NewStep, bool Subtract) {
82998299
diag::err_omp_loop_incr_not_compatible)
83008300
<< LCDecl << *TestIsLessOp << NewStep->getSourceRange();
83018301
SemaRef.Diag(ConditionLoc,
8302-
diag::note_omp_loop_cond_requres_compatible_incr)
8302+
diag::note_omp_loop_cond_requires_compatible_incr)
83038303
<< *TestIsLessOp << ConditionSrcRange;
83048304
return true;
83058305
}
@@ -9382,7 +9382,7 @@ void SemaOpenMP::ActOnOpenMPLoopInitialization(SourceLocation ForLoc,
93829382
}
93839383
}
93849384
DSAStack->addLoopControlVariable(D, VD);
9385-
const Decl *LD = DSAStack->getPossiblyLoopCunter();
9385+
const Decl *LD = DSAStack->getPossiblyLoopCounter();
93869386
if (LD != D->getCanonicalDecl()) {
93879387
DSAStack->resetPossibleLoopCounter();
93889388
if (auto *Var = dyn_cast_or_null<VarDecl>(LD))
@@ -9444,7 +9444,7 @@ void SemaOpenMP::ActOnOpenMPLoopInitialization(SourceLocation ForLoc,
94449444
}
94459445

94469446
namespace {
9447-
// Utility for openmp doacross clause kind
9447+
// Utility for OpenMP doacross clause kind
94489448
class OMPDoacrossKind {
94499449
public:
94509450
bool isSource(const OMPDoacrossClause *C) {
@@ -9822,7 +9822,7 @@ static Stmt *buildPreInits(ASTContext &Context,
98229822
/// stored in lieu of using an explicit list. Flattening is necessary because
98239823
/// contained DeclStmts need to be visible after the execution of the list. Used
98249824
/// for OpenMP pre-init declarations/statements.
9825-
static void appendFlattendedStmtList(SmallVectorImpl<Stmt *> &TargetList,
9825+
static void appendFlattenedStmtList(SmallVectorImpl<Stmt *> &TargetList,
98269826
Stmt *Item) {
98279827
// nullptr represents an empty list.
98289828
if (!Item)
@@ -9854,7 +9854,7 @@ static Stmt *buildPreInits(ASTContext &Context, ArrayRef<Stmt *> PreInits) {
98549854

98559855
SmallVector<Stmt *> Stmts;
98569856
for (Stmt *S : PreInits)
9857-
appendFlattendedStmtList(Stmts, S);
9857+
appendFlattenedStmtList(Stmts, S);
98589858
return CompoundStmt::Create(Context, PreInits, FPOptionsOverride(), {}, {});
98599859
}
98609860

@@ -9958,7 +9958,7 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr,
99589958
// Search for pre-init declared variables that need to be captured
99599959
// to be referenceable inside the directive.
99609960
SmallVector<Stmt *> Constituents;
9961-
appendFlattendedStmtList(Constituents, DependentPreInits);
9961+
appendFlattenedStmtList(Constituents, DependentPreInits);
99629962
for (Stmt *S : Constituents) {
99639963
if (auto *DC = dyn_cast<DeclStmt>(S)) {
99649964
for (Decl *C : DC->decls()) {
@@ -11628,7 +11628,7 @@ StmtResult SemaOpenMP::ActOnOpenMPScanDirective(ArrayRef<OMPClause *> Clauses,
1162811628
diag::err_omp_scan_single_clause_expected);
1162911629
return StmtError();
1163011630
}
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.
1163211632
if (Scope *S = DSAStack->getCurScope()) {
1163311633
Scope *ParentS = S->getParent();
1163411634
if (!ParentS || ParentS->getParent() != ParentS->getBreakParent() ||
@@ -11783,7 +11783,7 @@ class OpenMPAtomicUpdateChecker {
1178311783
NotAnAssignmentOp,
1178411784
/// RHS part of the binary operation is not a binary expression.
1178511785
NotABinaryExpression,
11786-
/// RHS part is not additive/multiplicative/shift/biwise binary
11786+
/// RHS part is not additive/multiplicative/shift/bitwise binary
1178711787
/// expression.
1178811788
NotABinaryOperator,
1178911789
/// RHS binary operation does not have reference to the updated LHS
@@ -12061,7 +12061,7 @@ class OpenMPAtomicCompareChecker {
1206112061
InvalidAssignment,
1206212062
/// Not if statement
1206312063
NotIfStmt,
12064-
/// More than two statements in a compund statement.
12064+
/// More than two statements in a compound statement.
1206512065
MoreThanTwoStmts,
1206612066
/// Not a compound statement.
1206712067
NotCompoundStmt,
@@ -15138,7 +15138,7 @@ bool SemaOpenMP::checkTransformableLoopNest(
1513815138
else
1513915139
llvm_unreachable("Unhandled loop transformation");
1514015140

15141-
appendFlattendedStmtList(OriginalInits.back(), DependentPreInits);
15141+
appendFlattenedStmtList(OriginalInits.back(), DependentPreInits);
1514215142
});
1514315143
assert(OriginalInits.back().empty() && "No preinit after innermost loop");
1514415144
OriginalInits.pop_back();

0 commit comments

Comments
 (0)