Skip to content
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

Fix some typos in comments: evalute -> evaluate (NFC) #65906

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

SuperSodaSea
Copy link
Contributor

@SuperSodaSea SuperSodaSea requested review from a team as code owners September 10, 2023 19:19
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:modules C++20 modules and Clang Header Modules mlir:core MLIR Core Infrastructure mlir:linalg mlir flang Flang issues not falling into any other category clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html flang:semantics flang:fir-hlfir labels Sep 10, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 10, 2023

@llvm/pr-subscribers-clang

Changes

(Moved from https://reviews.llvm.org/D154646.)

Full diff: https://github.com/llvm/llvm-project/pull/65906.diff

7 Files Affected:

  • (modified) clang/include/clang/AST/Expr.h (+1-1)
  • (modified) clang/lib/Serialization/ASTWriter.cpp (+1-1)
  • (modified) clang/unittests/Analysis/FlowSensitive/TransferTest.cpp (+1-1)
  • (modified) flang/include/flang/Lower/Support/Utils.h (+1-1)
  • (modified) flang/lib/Evaluate/shape.cpp (+1-1)
  • (modified) mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td (+5-5)
  • (modified) openmp/libomptarget/test/lit.cfg (+1-1)
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index c9315de8024e2f1..fe20a84216d1f11 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -566,7 +566,7 @@ class Expr : public ValueStmt {
                                       SmallVectorImpl<
                                         PartialDiagnosticAt> &Diags);
 
-  /// isPotentialConstantExprUnevaluted - Return true if this expression might
+  /// isPotentialConstantExprUnevaluated - Return true if this expression might
   /// be usable in a constant expression in C++11 in an unevaluated context, if
   /// it were in function FD marked constexpr. Return false if the function can
   /// never produce a constant expression, along with diagnostics describing
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 5ba07271cd81867..65bee806d2c5571 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -6081,7 +6081,7 @@ void ASTRecordWriter::AddVarDeclInit(const VarDecl *VD) {
     Val |= (ES->HasConstantInitialization ? 2 : 0);
     Val |= (ES->HasConstantDestruction ? 4 : 0);
     APValue *Evaluated = VD->getEvaluatedValue();
-    // If the evaluted result is constant, emit it.
+    // If the evaluated result is constant, emit it.
     if (Evaluated && (Evaluated->isInt() || Evaluated->isFloat()))
       Val |= 8;
   }
diff --git a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
index ec07555d7f33b3b..cced3925c4721c5 100644
--- a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
@@ -5855,7 +5855,7 @@ TEST(TransferTest, AnonymousStructWithReferenceField) {
 
 TEST(TransferTest, EvaluateBlockWithUnreachablePreds) {
   // This is a crash repro.
-  // `false` block may not have been processed when we try to evalute the `||`
+  // `false` block may not have been processed when we try to evaluate the `||`
   // after visiting `true`, because it is not necessary (and therefore the edge
   // is marked unreachable). Trying to get the analysis state via
   // `getEnvironment` for the subexpression still should not crash.
diff --git a/flang/include/flang/Lower/Support/Utils.h b/flang/include/flang/Lower/Support/Utils.h
index 9ab00dad51d39a5..64641ab4b6ca13e 100644
--- a/flang/include/flang/Lower/Support/Utils.h
+++ b/flang/include/flang/Lower/Support/Utils.h
@@ -89,7 +89,7 @@ namespace Fortran::lower {
 // Fortran::evaluate::Expr are functional values organized like an AST. A
 // Fortran::evaluate::Expr is meant to be moved and cloned. Using the front end
 // tools can often cause copies and extra wrapper classes to be added to any
-// Fortran::evalute::Expr. These values should not be assumed or relied upon to
+// Fortran::evaluate::Expr. These values should not be assumed or relied upon to
 // have an *object* identity. They are deeply recursive, irregular structures
 // built from a large number of classes which do not use inheritance and
 // necessitate a large volume of boilerplate code as a result.
diff --git a/flang/lib/Evaluate/shape.cpp b/flang/lib/Evaluate/shape.cpp
index ada26ac46af8363..8f4923ff96a94b0 100644
--- a/flang/lib/Evaluate/shape.cpp
+++ b/flang/lib/Evaluate/shape.cpp
@@ -1086,7 +1086,7 @@ void GetShapeHelper::AccumulateExtent(
   result = std::move(result) + std::move(n);
   if (context_) {
     // Fold during expression creation to avoid creating an expression so
-    // large we can't evalute it without overflowing the stack.
+    // large we can't evaluate it without overflowing the stack.
     result = Fold(*context_, std::move(result));
   }
 }
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
index 4567b3f1902d728..c45ec11a46cb7cc 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
@@ -324,7 +324,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         return getBlock()->getArguments().take_front(
             cast(*this->getOperation())
                 .getNumDpsInputs());
@@ -342,7 +342,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         return getBlock()->getArguments().take_back(
             cast(*this->getOperation())
                 .getNumDpsInits());
@@ -421,7 +421,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         return *(indexingMaps.begin() +
                  cast(*this->getOperation())
                      .getNumDpsInputs() +
@@ -442,7 +442,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         int64_t resultIndex =
             opOperand->getOperandNumber() -
             cast(*this->getOperation())
@@ -807,7 +807,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
     // MLIR currently does not support dependent interfaces or interface
     // inheritance. By construction all ops with StructuredOpInterface must
     // implement DestinationStyleOpInterface.
-    // TODO: reevalute the need for a cast when a better mechanism exists.
+    // TODO: reevaluate the need for a cast when a better mechanism exists.
     //========================================================================//
 
     int64_t getNumDpsInputs() {
diff --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg
index f54edf91574671e..a53d4e32436de12 100644
--- a/openmp/libomptarget/test/lit.cfg
+++ b/openmp/libomptarget/test/lit.cfg
@@ -45,7 +45,7 @@ def append_dynamic_library_path(name, value, sep):
     else:
         config.environment[name] = value
 
-# Evalute the environment variable which is a string boolean value.
+# Evaluate the environment variable which is a string boolean value.
 def evaluate_bool_env(env):
     env = env.lower()
     possible_true_values = ["on", "true", "1"]

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 10, 2023

@llvm/pr-subscribers-mlir

Changes

(Moved from https://reviews.llvm.org/D154646.)

Full diff: https://github.com/llvm/llvm-project/pull/65906.diff

7 Files Affected:

  • (modified) clang/include/clang/AST/Expr.h (+1-1)
  • (modified) clang/lib/Serialization/ASTWriter.cpp (+1-1)
  • (modified) clang/unittests/Analysis/FlowSensitive/TransferTest.cpp (+1-1)
  • (modified) flang/include/flang/Lower/Support/Utils.h (+1-1)
  • (modified) flang/lib/Evaluate/shape.cpp (+1-1)
  • (modified) mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td (+5-5)
  • (modified) openmp/libomptarget/test/lit.cfg (+1-1)
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h
index c9315de8024e2f1..fe20a84216d1f11 100644
--- a/clang/include/clang/AST/Expr.h
+++ b/clang/include/clang/AST/Expr.h
@@ -566,7 +566,7 @@ class Expr : public ValueStmt {
                                       SmallVectorImpl<
                                         PartialDiagnosticAt> &Diags);
 
-  /// isPotentialConstantExprUnevaluted - Return true if this expression might
+  /// isPotentialConstantExprUnevaluated - Return true if this expression might
   /// be usable in a constant expression in C++11 in an unevaluated context, if
   /// it were in function FD marked constexpr. Return false if the function can
   /// never produce a constant expression, along with diagnostics describing
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 5ba07271cd81867..65bee806d2c5571 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -6081,7 +6081,7 @@ void ASTRecordWriter::AddVarDeclInit(const VarDecl *VD) {
     Val |= (ES->HasConstantInitialization ? 2 : 0);
     Val |= (ES->HasConstantDestruction ? 4 : 0);
     APValue *Evaluated = VD->getEvaluatedValue();
-    // If the evaluted result is constant, emit it.
+    // If the evaluated result is constant, emit it.
     if (Evaluated && (Evaluated->isInt() || Evaluated->isFloat()))
       Val |= 8;
   }
diff --git a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
index ec07555d7f33b3b..cced3925c4721c5 100644
--- a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
@@ -5855,7 +5855,7 @@ TEST(TransferTest, AnonymousStructWithReferenceField) {
 
 TEST(TransferTest, EvaluateBlockWithUnreachablePreds) {
   // This is a crash repro.
-  // `false` block may not have been processed when we try to evalute the `||`
+  // `false` block may not have been processed when we try to evaluate the `||`
   // after visiting `true`, because it is not necessary (and therefore the edge
   // is marked unreachable). Trying to get the analysis state via
   // `getEnvironment` for the subexpression still should not crash.
diff --git a/flang/include/flang/Lower/Support/Utils.h b/flang/include/flang/Lower/Support/Utils.h
index 9ab00dad51d39a5..64641ab4b6ca13e 100644
--- a/flang/include/flang/Lower/Support/Utils.h
+++ b/flang/include/flang/Lower/Support/Utils.h
@@ -89,7 +89,7 @@ namespace Fortran::lower {
 // Fortran::evaluate::Expr are functional values organized like an AST. A
 // Fortran::evaluate::Expr is meant to be moved and cloned. Using the front end
 // tools can often cause copies and extra wrapper classes to be added to any
-// Fortran::evalute::Expr. These values should not be assumed or relied upon to
+// Fortran::evaluate::Expr. These values should not be assumed or relied upon to
 // have an *object* identity. They are deeply recursive, irregular structures
 // built from a large number of classes which do not use inheritance and
 // necessitate a large volume of boilerplate code as a result.
diff --git a/flang/lib/Evaluate/shape.cpp b/flang/lib/Evaluate/shape.cpp
index ada26ac46af8363..8f4923ff96a94b0 100644
--- a/flang/lib/Evaluate/shape.cpp
+++ b/flang/lib/Evaluate/shape.cpp
@@ -1086,7 +1086,7 @@ void GetShapeHelper::AccumulateExtent(
   result = std::move(result) + std::move(n);
   if (context_) {
     // Fold during expression creation to avoid creating an expression so
-    // large we can't evalute it without overflowing the stack.
+    // large we can't evaluate it without overflowing the stack.
     result = Fold(*context_, std::move(result));
   }
 }
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
index 4567b3f1902d728..c45ec11a46cb7cc 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
@@ -324,7 +324,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         return getBlock()->getArguments().take_front(
             cast(*this->getOperation())
                 .getNumDpsInputs());
@@ -342,7 +342,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         return getBlock()->getArguments().take_back(
             cast(*this->getOperation())
                 .getNumDpsInits());
@@ -421,7 +421,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         return *(indexingMaps.begin() +
                  cast(*this->getOperation())
                      .getNumDpsInputs() +
@@ -442,7 +442,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
         // MLIR currently does not support dependent interfaces or interface
         // inheritance. By construction all ops with StructuredOpInterface must
         // implement DestinationStyleOpInterface.
-        // TODO: reevalute the need for a cast when a better mechanism exists.
+        // TODO: reevaluate the need for a cast when a better mechanism exists.
         int64_t resultIndex =
             opOperand->getOperandNumber() -
             cast(*this->getOperation())
@@ -807,7 +807,7 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
     // MLIR currently does not support dependent interfaces or interface
     // inheritance. By construction all ops with StructuredOpInterface must
     // implement DestinationStyleOpInterface.
-    // TODO: reevalute the need for a cast when a better mechanism exists.
+    // TODO: reevaluate the need for a cast when a better mechanism exists.
     //========================================================================//
 
     int64_t getNumDpsInputs() {
diff --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg
index f54edf91574671e..a53d4e32436de12 100644
--- a/openmp/libomptarget/test/lit.cfg
+++ b/openmp/libomptarget/test/lit.cfg
@@ -45,7 +45,7 @@ def append_dynamic_library_path(name, value, sep):
     else:
         config.environment[name] = value
 
-# Evalute the environment variable which is a string boolean value.
+# Evaluate the environment variable which is a string boolean value.
 def evaluate_bool_env(env):
     env = env.lower()
     possible_true_values = ["on", "true", "1"]

@dtcxzyw dtcxzyw merged commit 057564f into llvm:main Sep 10, 2023
12 checks passed
@SuperSodaSea SuperSodaSea deleted the fix/typo branch September 10, 2023 20:12
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:modules C++20 modules and Clang Header Modules clang Clang issues not falling into any other category flang:fir-hlfir flang Flang issues not falling into any other category mlir:core MLIR Core Infrastructure mlir:linalg mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants