[compiler-rt] 4880a48 - [NFC][asan] Fix typo in names

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 27 23:49:13 PST 2022


Author: Vitaly Buka
Date: 2022-11-27T23:42:10-08:00
New Revision: 4880a48ab27ca8ef794bee4746f4fec7515283b4

URL: https://github.com/llvm/llvm-project/commit/4880a48ab27ca8ef794bee4746f4fec7515283b4
DIFF: https://github.com/llvm/llvm-project/commit/4880a48ab27ca8ef794bee4746f4fec7515283b4.diff

LOG: [NFC][asan] Fix typo in names

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/contiguous_container.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/contiguous_container.cpp b/compiler-rt/test/asan/TestCases/contiguous_container.cpp
index 7fcb644be797..c796d04579da 100644
--- a/compiler-rt/test/asan/TestCases/contiguous_container.cpp
+++ b/compiler-rt/test/asan/TestCases/contiguous_container.cpp
@@ -26,8 +26,8 @@ static std::vector<bool> GetPoisonedMask(char *begin, char *end) {
   return result;
 }
 
-static int GetFirstMissmatch(const std::vector<bool> &a,
-                             const std::vector<bool> &b) {
+static int GetFirstMismatch(const std::vector<bool> &a,
+                            const std::vector<bool> &b) {
   return std::mismatch(a.begin(), a.end(), b.begin(), b.end()).first -
          a.begin();
 }
@@ -97,7 +97,7 @@ void TestContainer(size_t capacity, size_t off_begin, bool poison_buffer) {
       assert(!is_valid);
       assert(bad_address == std::min(cur, end));
       assert(bad_address ==
-             st_beg + GetFirstMissmatch(masks[i], masks[cur - st_beg]));
+             st_beg + GetFirstMismatch(masks[i], masks[cur - st_beg]));
     }
   }
 
@@ -174,7 +174,7 @@ void TestDoubleEndedContainer(size_t capacity, size_t off_begin,
       __sanitizer_annotate_double_ended_contiguous_container(
           st_beg, st_end, old_beg, old_end, beg, end);
 
-      // Try to missmatch the end of the container.
+      // Try to mismatch the end of the container.
       char *cur_first = std::max(end - 2 * kGranularity, beg);
       char *cur_last = std::min(end + 2 * kGranularity, st_end);
       for (char *cur = cur_first; cur <= cur_last; ++cur) {
@@ -193,10 +193,10 @@ void TestDoubleEndedContainer(size_t capacity, size_t off_begin,
         assert(!is_valid);
         assert(bad_address);
         assert(bad_address ==
-               st_beg + GetFirstMissmatch(masks[i][j], masks[i][cur - st_beg]));
+               st_beg + GetFirstMismatch(masks[i][j], masks[i][cur - st_beg]));
       }
 
-      // Try to missmatch the begin of the container.
+      // Try to mismatch the begin of the container.
       cur_first = std::max(beg - 2 * kGranularity, st_beg);
       cur_last = std::min(beg + 2 * kGranularity, end);
       for (char *cur = cur_first; cur <= cur_last; ++cur) {
@@ -217,7 +217,7 @@ void TestDoubleEndedContainer(size_t capacity, size_t off_begin,
         assert(!is_valid);
         assert(bad_address);
         assert(bad_address ==
-               st_beg + GetFirstMissmatch(masks[i][j], masks[cur - st_beg][j]));
+               st_beg + GetFirstMismatch(masks[i][j], masks[cur - st_beg][j]));
       }
     }
   }


        


More information about the llvm-commits mailing list