-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ben Shi (benshi001) ChangesFull diff: https://github.com/llvm/llvm-project/pull/130456.diff 6 Files Affected:
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
index 168983fd5cb68..bb33a6912bec7 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
//
// This file defines CheckerContext that provides contextual info for
-// path-sensitive checkers.
+// path-sensitive checkers.
//
//===----------------------------------------------------------------------===//
@@ -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.
@@ -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
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index 80b79fd4e928f..b2b4e8729af25 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -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() ||
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
index 2fb05ac46e8fa..967b25e5696f6 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
@@ -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
@@ -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
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
index 804fc74b009df..2c95a6d16afe7 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -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(); }
@@ -498,11 +498,11 @@ 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);
@@ -510,7 +510,7 @@ class ExprEngine {
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);
@@ -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,
@@ -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,
@@ -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,
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
index 208b32e376883..4d66e086a2c2c 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
@@ -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.
//
//===----------------------------------------------------------------------===//
@@ -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; }
@@ -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.
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
index fcc9c02999b3b..580b49a38dc72 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
@@ -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.
//
//===----------------------------------------------------------------------===//
|
steakhal
approved these changes
Mar 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.