Skip to content

Commit 2172a5e

Browse files
authored
[clang][analyzer][NFC] Fix typos in comments (#130456)
1 parent d47bc6f commit 2172a5e

File tree

6 files changed

+19
-20
lines changed

6 files changed

+19
-20
lines changed

clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// This file defines CheckerContext that provides contextual info for
10-
// path-sensitive checkers.
10+
// path-sensitive checkers.
1111
//
1212
//===----------------------------------------------------------------------===//
1313

@@ -152,7 +152,7 @@ class CheckerContext {
152152
}
153153

154154
/// Returns true if the value of \p E is greater than or equal to \p
155-
/// Val under unsigned comparison
155+
/// Val under unsigned comparison.
156156
bool isGreaterOrEqual(const Expr *E, unsigned long long Val);
157157

158158
/// Returns true if the value of \p E is negative.
@@ -392,7 +392,7 @@ class CheckerContext {
392392
/// hardened variant that's not yet covered by it.
393393
static bool isHardenedVariantOf(const FunctionDecl *FD, StringRef Name);
394394

395-
/// Depending on wither the location corresponds to a macro, return
395+
/// Depending on whether the location corresponds to a macro, return
396396
/// either the macro name or the token spelling.
397397
///
398398
/// This could be useful when checkers' logic depends on whether a function

clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class CoreEngine {
156156
void dispatchWorkItem(ExplodedNode* Pred, ProgramPoint Loc,
157157
const WorkListUnit& WU);
158158

159-
// Functions for external checking of whether we have unfinished work
159+
// Functions for external checking of whether we have unfinished work.
160160
bool wasBlockAborted() const { return !blocksAborted.empty(); }
161161
bool wasBlocksExhausted() const { return !blocksExhausted.empty(); }
162162
bool hasWorkRemaining() const { return wasBlocksExhausted() ||

clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// This file defines the template classes ExplodedNode and ExplodedGraph,
10-
// which represent a path-sensitive, intra-procedural "exploded graph."
10+
// which represent a path-sensitive, intra-procedural "exploded graph".
1111
// See "Precise interprocedural dataflow analysis via graph reachability"
1212
// by Reps, Horwitz, and Sagiv
1313
// (http://portal.acm.org/citation.cfm?id=199462) for the definition of an
@@ -426,8 +426,8 @@ class ExplodedGraph {
426426
///
427427
/// \param Nodes The nodes which must appear in the final graph. Presumably
428428
/// these are end-of-path nodes (i.e. they have no successors).
429-
/// \param[out] ForwardMap A optional map from nodes in this graph to nodes in
430-
/// the returned graph.
429+
/// \param[out] ForwardMap An optional map from nodes in this graph to nodes
430+
/// in the returned graph.
431431
/// \param[out] InverseMap An optional map from nodes in the returned graph to
432432
/// nodes in this graph.
433433
/// \returns The trimmed graph

clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ class ExprEngine {
429429

430430
DataTag::Factory &getDataTags() { return Engine.getDataTags(); }
431431

432-
// Functions for external checking of whether we have unfinished work
432+
// Functions for external checking of whether we have unfinished work.
433433
bool wasBlocksExhausted() const { return Engine.wasBlocksExhausted(); }
434434
bool hasEmptyWorkList() const { return !Engine.getWorkList()->hasWork(); }
435435
bool hasWorkRemaining() const { return Engine.hasWorkRemaining(); }
@@ -498,19 +498,19 @@ class ExprEngine {
498498
void VisitInitListExpr(const InitListExpr *E, ExplodedNode *Pred,
499499
ExplodedNodeSet &Dst);
500500

501-
/// VisitAttributedStmt - Transfer function logic for AttributedStmt
501+
/// VisitAttributedStmt - Transfer function logic for AttributedStmt.
502502
void VisitAttributedStmt(const AttributedStmt *A, ExplodedNode *Pred,
503503
ExplodedNodeSet &Dst);
504504

505-
/// VisitLogicalExpr - Transfer function logic for '&&', '||'
505+
/// VisitLogicalExpr - Transfer function logic for '&&', '||'.
506506
void VisitLogicalExpr(const BinaryOperator* B, ExplodedNode *Pred,
507507
ExplodedNodeSet &Dst);
508508

509509
/// VisitMemberExpr - Transfer function for member expressions.
510510
void VisitMemberExpr(const MemberExpr *M, ExplodedNode *Pred,
511511
ExplodedNodeSet &Dst);
512512

513-
/// VisitAtomicExpr - Transfer function for builtin atomic expressions
513+
/// VisitAtomicExpr - Transfer function for builtin atomic expressions.
514514
void VisitAtomicExpr(const AtomicExpr *E, ExplodedNode *Pred,
515515
ExplodedNodeSet &Dst);
516516

@@ -725,7 +725,7 @@ class ExprEngine {
725725
/// For `int arr[4]` this index can be 0,1,2,3.
726726
/// For `int arr2[3][3]` this index can be 0,1,...,7,8.
727727
/// A multi-dimensional array is also a continuous memory location in a
728-
/// row major order, so for arr[0][0] Idx is 0 and for arr[2][2] Idx is 8.
728+
/// row major order, so for arr[0][0] Idx is 0 and for arr[3][3] Idx is 8.
729729
SVal computeObjectUnderConstruction(const Expr *E, ProgramStateRef State,
730730
const NodeBuilderContext *BldrCtx,
731731
const LocationContext *LCtx,
@@ -806,7 +806,7 @@ class ExprEngine {
806806
/// should inline, just by looking at the declaration of the function.
807807
bool mayInlineDecl(AnalysisDeclContext *ADC) const;
808808

809-
/// Checks our policies and decides weither the given call should be inlined.
809+
/// Checks our policies and decides whether the given call should be inlined.
810810
bool shouldInlineCall(const CallEvent &Call, const Decl *D,
811811
const ExplodedNode *Pred,
812812
const EvalCallOptions &CallOpts = {});
@@ -902,8 +902,8 @@ class ExprEngine {
902902
ExplodedNodeSet &Dst);
903903

904904
public:
905-
/// Note whether this loop has any more iteratios to model. These methods are
906-
/// essentially an interface for a GDM trait. Further reading in
905+
/// Note whether this loop has any more iterations to model. These methods
906+
// are essentially an interface for a GDM trait. Further reading in
907907
/// ExprEngine::VisitObjCForCollectionStmt().
908908
[[nodiscard]] static ProgramStateRef
909909
setWhetherHasMoreIteration(ProgramStateRef State,
@@ -967,7 +967,7 @@ class ExprEngine {
967967
const ConstructionContextItem &Item,
968968
const LocationContext *LC, SVal V);
969969

970-
/// Mark the object sa fully constructed, cleaning up the state trait
970+
/// Mark the object as fully constructed, cleaning up the state trait
971971
/// that tracks objects under construction.
972972
static ProgramStateRef
973973
finishObjectConstruction(ProgramStateRef State,

clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88
//
9-
// This file defines the state of the program along the analysisa path.
9+
// This file defines the state of the program along the analysis path.
1010
//
1111
//===----------------------------------------------------------------------===//
1212

@@ -161,7 +161,6 @@ class ProgramState : public llvm::FoldingSetNode {
161161
/// is a mapping from locations to values.
162162
Store getStore() const { return store; }
163163

164-
165164
/// getGDM - Return the generic data map associated with this state.
166165
GenericDataMap getGDM() const { return GDM; }
167166

@@ -382,7 +381,7 @@ class ProgramState : public llvm::FoldingSetNode {
382381
/// Returns UnknownVal() if none found.
383382
SVal getSVal(Loc LV, QualType T = QualType()) const;
384383

385-
/// Returns the "raw" SVal bound to LV before any value simplfication.
384+
/// Returns the "raw" SVal bound to LV before any value simplification.
386385
SVal getRawSVal(Loc LV, QualType T= QualType()) const;
387386

388387
/// Return the value bound to the specified location.

clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88
//
9-
// This file defines a set of functions to create SMT expressions
9+
// This file defines a set of functions to create SMT expressions.
1010
//
1111
//===----------------------------------------------------------------------===//
1212

0 commit comments

Comments
 (0)