Skip to content

[clang][analyzer][NFC] Fix typos in comments #130456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
//
// This file defines CheckerContext that provides contextual info for
// path-sensitive checkers.
// path-sensitive checkers.
//
//===----------------------------------------------------------------------===//

Expand Down Expand Up @@ -152,7 +152,7 @@ class CheckerContext {
}

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

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

/// Depending on wither the location corresponds to a macro, return
/// Depending on whether the location corresponds to a macro, return
/// either the macro name or the token spelling.
///
/// This could be useful when checkers' logic depends on whether a function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class CoreEngine {
void dispatchWorkItem(ExplodedNode* Pred, ProgramPoint Loc,
const WorkListUnit& WU);

// Functions for external checking of whether we have unfinished work
// Functions for external checking of whether we have unfinished work.
bool wasBlockAborted() const { return !blocksAborted.empty(); }
bool wasBlocksExhausted() const { return !blocksExhausted.empty(); }
bool hasWorkRemaining() const { return wasBlocksExhausted() ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
//
// This file defines the template classes ExplodedNode and ExplodedGraph,
// which represent a path-sensitive, intra-procedural "exploded graph."
// which represent a path-sensitive, intra-procedural "exploded graph".
// See "Precise interprocedural dataflow analysis via graph reachability"
// by Reps, Horwitz, and Sagiv
// (http://portal.acm.org/citation.cfm?id=199462) for the definition of an
Expand Down Expand Up @@ -426,8 +426,8 @@ class ExplodedGraph {
///
/// \param Nodes The nodes which must appear in the final graph. Presumably
/// these are end-of-path nodes (i.e. they have no successors).
/// \param[out] ForwardMap A optional map from nodes in this graph to nodes in
/// the returned graph.
/// \param[out] ForwardMap An optional map from nodes in this graph to nodes
/// in the returned graph.
/// \param[out] InverseMap An optional map from nodes in the returned graph to
/// nodes in this graph.
/// \returns The trimmed graph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class ExprEngine {

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

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

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

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

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

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

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

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

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

/// Mark the object sa fully constructed, cleaning up the state trait
/// Mark the object as fully constructed, cleaning up the state trait
/// that tracks objects under construction.
static ProgramStateRef
finishObjectConstruction(ProgramStateRef State,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// This file defines the state of the program along the analysisa path.
// This file defines the state of the program along the analysis path.
//
//===----------------------------------------------------------------------===//

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


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

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

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

/// Return the value bound to the specified location.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
//
// This file defines a set of functions to create SMT expressions
// This file defines a set of functions to create SMT expressions.
//
//===----------------------------------------------------------------------===//

Expand Down