[clang] 68b30bc - [NFC] Correct spelling of "ambiguous"

Casey Carter via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 14:51:51 PDT 2020


Author: Casey Carter
Date: 2020-04-28T14:51:37-07:00
New Revision: 68b30bc02b3a7e84d03f43a82cc08e5df76a28dd

URL: https://github.com/llvm/llvm-project/commit/68b30bc02b3a7e84d03f43a82cc08e5df76a28dd
DIFF: https://github.com/llvm/llvm-project/commit/68b30bc02b3a7e84d03f43a82cc08e5df76a28dd.diff

LOG: [NFC] Correct spelling of "ambiguous"

Added: 
    

Modified: 
    clang/include/clang/Sema/Sema.h
    clang/lib/Sema/SemaDeclCXX.cpp
    clang/lib/Sema/SemaOverload.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp
    llvm/lib/CodeGen/ReachingDefAnalysis.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 8a0dd4a1d96f..c3c5533b73ec 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -6862,7 +6862,7 @@ class Sema final {
                                     bool IgnoreAccess = false);
   bool CheckDerivedToBaseConversion(QualType Derived, QualType Base,
                                     unsigned InaccessibleBaseID,
-                                    unsigned AmbigiousBaseConvID,
+                                    unsigned AmbiguousBaseConvID,
                                     SourceLocation Loc, SourceRange Range,
                                     DeclarationName Name,
                                     CXXCastPath *BasePath,

diff  --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index e827fe3b1ace..78d9322bf393 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -2821,13 +2821,13 @@ void Sema::BuildBasePathArray(const CXXBasePaths &Paths,
 /// if there is an error, and Range is the source range to highlight
 /// if there is an error.
 ///
-/// If either InaccessibleBaseID or AmbigiousBaseConvID are 0, then the
+/// If either InaccessibleBaseID or AmbiguousBaseConvID are 0, then the
 /// diagnostic for the respective type of error will be suppressed, but the
 /// check for ill-formed code will still be performed.
 bool
 Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
                                    unsigned InaccessibleBaseID,
-                                   unsigned AmbigiousBaseConvID,
+                                   unsigned AmbiguousBaseConvID,
                                    SourceLocation Loc, SourceRange Range,
                                    DeclarationName Name,
                                    CXXCastPath *BasePath,
@@ -2853,7 +2853,7 @@ Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
     for (const CXXBasePath &PossiblePath : Paths) {
       if (PossiblePath.size() == 1) {
         Path = &PossiblePath;
-        if (AmbigiousBaseConvID)
+        if (AmbiguousBaseConvID)
           Diag(Loc, diag::ext_ms_ambiguous_direct_base)
               << Base << Derived << Range;
         break;
@@ -2881,7 +2881,7 @@ Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
     return false;
   }
 
-  if (AmbigiousBaseConvID) {
+  if (AmbiguousBaseConvID) {
     // We know that the derived-to-base conversion is ambiguous, and
     // we're going to produce a diagnostic. Perform the derived-to-base
     // search just one more time to compute all of the possible paths so
@@ -2900,7 +2900,7 @@ Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
     // to each base class subobject.
     std::string PathDisplayStr = getAmbiguousPathsDisplayString(Paths);
 
-    Diag(Loc, AmbigiousBaseConvID)
+    Diag(Loc, AmbiguousBaseConvID)
     << Derived << Base << PathDisplayStr << Range << Name;
   }
   return true;

diff  --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 1db854e789d7..fb5eff006fd3 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -3003,13 +3003,13 @@ bool Sema::CheckPointerConversion(Expr *From, QualType ToType,
         // We must have a derived-to-base conversion. Check an
         // ambiguous or inaccessible conversion.
         unsigned InaccessibleID = 0;
-        unsigned AmbigiousID = 0;
+        unsigned AmbiguousID = 0;
         if (Diagnose) {
           InaccessibleID = diag::err_upcast_to_inaccessible_base;
-          AmbigiousID = diag::err_ambiguous_derived_to_base_conv;
+          AmbiguousID = diag::err_ambiguous_derived_to_base_conv;
         }
         if (CheckDerivedToBaseConversion(
-                FromPointeeType, ToPointeeType, InaccessibleID, AmbigiousID,
+                FromPointeeType, ToPointeeType, InaccessibleID, AmbiguousID,
                 From->getExprLoc(), From->getSourceRange(), DeclarationName(),
                 &BasePath, IgnoreBaseAccess))
           return true;

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp
index cf44921fe572..b75dbfed029b 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/const_optional_U.pass.cpp
@@ -143,7 +143,7 @@ void test_with_test_type() {
     assert(T::alive == 0);
 }
 
-void test_ambigious_assign() {
+void test_ambiguous_assign() {
     using OptInt = std::optional<int>;
     {
         using T = AssignableFrom<OptInt const&>;
@@ -199,7 +199,7 @@ void test_ambigious_assign() {
 int main(int, char**)
 {
     test_with_test_type();
-    test_ambigious_assign();
+    test_ambiguous_assign();
     {
         optional<int> opt;
         constexpr optional<short> opt2;

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp
index 2239acaf6295..d8bae281b9a5 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/optional_U.pass.cpp
@@ -148,7 +148,7 @@ void test_with_test_type() {
 }
 
 
-void test_ambigious_assign() {
+void test_ambiguous_assign() {
     using OptInt = std::optional<int>;
     {
         using T = AssignableFrom<OptInt&&>;
@@ -204,7 +204,7 @@ void test_ambigious_assign() {
 int main(int, char**)
 {
     test_with_test_type();
-    test_ambigious_assign();
+    test_ambiguous_assign();
     {
         optional<int> opt;
         optional<short> opt2;

diff  --git a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
index 9785c04aec94..ea667f1704f6 100644
--- a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
+++ b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
@@ -538,7 +538,7 @@ bool ReachingDefAnalysis::isSafeToMove(MachineInstr *From,
 
   // Now walk checking that the rest of the instructions will compute the same
   // value and that we're not overwriting anything. Don't move the instruction
-  // past any memory, control-flow or other ambigious instructions.
+  // past any memory, control-flow or other ambiguous instructions.
   for (auto I = ++Iterator(From), E = Iterator(To); I != E; ++I) {
     if (mayHaveSideEffects(*I))
       return false;


        


More information about the cfe-commits mailing list