[clang] c79345f - [NFC][Clang][test] Inclusive language: Remove and rephrase uses of sanity test/check in clang/test

Zarko Todorovski via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 24 11:08:44 PST 2021


Author: Zarko Todorovski
Date: 2021-11-24T14:03:49-05:00
New Revision: c79345fb7b149d9c952f8506c9e6c6317a5b4cd8

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

LOG: [NFC][Clang][test] Inclusive language: Remove and rephrase uses of sanity test/check in clang/test

Part of work to use more inclusive terms in clang/llvm.

Added: 
    

Modified: 
    clang/test/Analysis/additive-folding.cpp
    clang/test/Analysis/bitwise-ops.c
    clang/test/Analysis/comparison-implicit-casts.cpp
    clang/test/Analysis/ctor.mm
    clang/test/Analysis/derived-to-base.cpp
    clang/test/Analysis/dtor.cpp
    clang/test/Analysis/expr-inspection.cpp
    clang/test/Analysis/malloc-sizeof.cpp
    clang/test/Analysis/plist-html-macros.c
    clang/test/Analysis/reference.cpp
    clang/test/Analysis/retain-release.m
    clang/test/CodeGen/attr-nodebug.c
    clang/test/CodeGenObjCXX/arc-attrs.mm
    clang/test/CodeGenObjCXX/arc.mm
    clang/test/Driver/arm-target-as-march-mcpu.s
    clang/test/Driver/clang-g-opts.c
    clang/test/Modules/framework-name.m
    clang/test/Modules/target-features.m
    clang/test/Modules/va_list.m
    clang/test/PCH/cxx11-statement-attributes.cpp
    clang/test/Rewriter/instancetype-test.mm
    clang/test/Rewriter/rewrite-foreach-in-block.mm
    clang/test/Sema/dllexport.c
    clang/test/Sema/dllimport.c
    clang/test/Sema/predef.c
    clang/test/SemaCXX/coroutines-exp-namespace.cpp
    clang/test/SemaCXX/coroutines.cpp
    clang/test/SemaCXX/dllexport.cpp
    clang/test/SemaCXX/dllimport.cpp
    clang/test/SemaCXX/warn-thread-safety-analysis.cpp
    clang/test/SemaObjC/arc-repeated-weak.mm
    clang/test/SemaObjC/conversion.m
    clang/test/SemaObjC/instancetype.m
    clang/test/SemaObjC/warn-retain-cycle.m
    clang/test/SemaObjCXX/instancetype.mm
    clang/unittests/AST/ASTImporterFixtures.h
    clang/unittests/Analysis/CFGDominatorTree.cpp
    clang/unittests/Sema/ExternalSemaSourceTest.cpp
    clang/unittests/Tooling/Syntax/TokensTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/Analysis/additive-folding.cpp b/clang/test/Analysis/additive-folding.cpp
index 6c84bf345e5ee..ddb32bdfa966a 100644
--- a/clang/test/Analysis/additive-folding.cpp
+++ b/clang/test/Analysis/additive-folding.cpp
@@ -141,7 +141,7 @@ void tautologiesOutside(unsigned char a) {
 
 // Wraparound with mixed types. Note that the analyzer assumes
 // -fwrapv semantics.
-void mixedWraparoundSanityCheck(int a) {
+void mixedWraparoundBasicCheck(int a) {
   int max = INT_MAX;
   int min = INT_MIN;
 
@@ -197,7 +197,7 @@ void mixedSignedness3(unsigned a) {
 }
 
 
-void multiplicativeSanityTest(int x) {
+void multiplicativeBasicTest(int x) {
   // At one point we were ignoring the *4 completely -- the constraint manager
   // would see x < 8 and then declare the assertion to be known false.
   if (x*4 < 8)

diff  --git a/clang/test/Analysis/bitwise-ops.c b/clang/test/Analysis/bitwise-ops.c
index fcd3d7dbc7cff..d8d2c920517d4 100644
--- a/clang/test/Analysis/bitwise-ops.c
+++ b/clang/test/Analysis/bitwise-ops.c
@@ -4,7 +4,7 @@ void clang_analyzer_eval(int);
 #define CHECK(expr) if (!(expr)) return; clang_analyzer_eval(expr)
 
 void testPersistentConstraints(int x, int y) {
-  // Sanity check
+  // Basic check
   CHECK(x); // expected-warning{{TRUE}}
   CHECK(x & 1); // expected-warning{{TRUE}}
   

diff  --git a/clang/test/Analysis/comparison-implicit-casts.cpp b/clang/test/Analysis/comparison-implicit-casts.cpp
index fe5254c0a53bd..dac2860110366 100644
--- a/clang/test/Analysis/comparison-implicit-casts.cpp
+++ b/clang/test/Analysis/comparison-implicit-casts.cpp
@@ -18,7 +18,7 @@ typedef typeof(sizeof(int)) size_t;
 void PR12206(int x) {
   size_t comparisonSize = sizeof(1 == 1);
 
-  // Sanity check. This test is useless if size_t isn't bigger than bool.
+  // This test is useless if size_t isn't bigger than bool.
   clang_analyzer_eval(sizeof(size_t) > comparisonSize); // expected-warning{{TRUE}}
 
   // Build a SymIntExpr, dependent on x.
@@ -75,7 +75,7 @@ size_t strlen(const char *s);
 void PR12206_strlen(const char *x) {
   size_t comparisonSize = sizeof(1 == 1);
 
-  // Sanity check. This test is useless if size_t isn't bigger than bool.
+  // This test is useless if size_t isn't bigger than bool.
   clang_analyzer_eval(sizeof(size_t) > comparisonSize); // expected-warning{{TRUE}}
 
   // Create a value that requires more bits to store than a comparison result.

diff  --git a/clang/test/Analysis/ctor.mm b/clang/test/Analysis/ctor.mm
index 08f06e75aebfe..1eafabb443de6 100644
--- a/clang/test/Analysis/ctor.mm
+++ b/clang/test/Analysis/ctor.mm
@@ -93,7 +93,7 @@ void test() {
 
     clang_analyzer_eval(obj.get() == 3); // expected-warning{{TRUE}}
 
-    // Sanity check for devirtualization.
+    // Correctness check for devirtualization.
     A *base = &obj;
     clang_analyzer_eval(base->get() == 3); // expected-warning{{TRUE}}
   }

diff  --git a/clang/test/Analysis/derived-to-base.cpp b/clang/test/Analysis/derived-to-base.cpp
index b9851fd3e4042..ef30f97aadf70 100644
--- a/clang/test/Analysis/derived-to-base.cpp
+++ b/clang/test/Analysis/derived-to-base.cpp
@@ -353,7 +353,7 @@ namespace Redeclaration {
 
   void test(Derived d) {
     d.foo(); // don't crash
-    d.bar(); // sanity check
+    d.bar(); // basic correctness check
 
     Base &b = d;
     b.foo(); // don't crash

diff  --git a/clang/test/Analysis/dtor.cpp b/clang/test/Analysis/dtor.cpp
index 1c6251781545c..2e984fca39cb7 100644
--- a/clang/test/Analysis/dtor.cpp
+++ b/clang/test/Analysis/dtor.cpp
@@ -214,7 +214,7 @@ namespace DestructorVirtualCalls {
       C obj;
       clang_analyzer_eval(obj.get() == 3); // expected-warning{{TRUE}}
 
-      // Sanity check for devirtualization.
+      // Correctness check for devirtualization.
       A *base = &obj;
       clang_analyzer_eval(base->get() == 3); // expected-warning{{TRUE}}
 

diff  --git a/clang/test/Analysis/expr-inspection.cpp b/clang/test/Analysis/expr-inspection.cpp
index 0bf824c2be5d8..bf8ce5f7681ed 100644
--- a/clang/test/Analysis/expr-inspection.cpp
+++ b/clang/test/Analysis/expr-inspection.cpp
@@ -5,7 +5,7 @@
 void clang_analyzer_denote(int x, const char *str);
 void clang_analyzer_express(int x);
 
-// Invalid declarations to test sanity checks.
+// Invalid declarations to test basic correctness checks.
 void clang_analyzer_denote();
 void clang_analyzer_denote(int x);
 void clang_analyzer_express();

diff  --git a/clang/test/Analysis/malloc-sizeof.cpp b/clang/test/Analysis/malloc-sizeof.cpp
index 30227a9cbc806..77ddf3412b52b 100644
--- a/clang/test/Analysis/malloc-sizeof.cpp
+++ b/clang/test/Analysis/malloc-sizeof.cpp
@@ -11,7 +11,7 @@ struct A {};
 struct B {};
 
 void foo(unsigned int unsignedInt, unsigned int readSize) {
-  // Sanity check the checker is working as expected.
+  // Verify the checker is working as expected.
   A* a = static_cast<A*>(malloc(sizeof(int))); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'struct A', which is incompatible with sizeof operand type 'int'}}
   free(a);
 }

diff  --git a/clang/test/Analysis/plist-html-macros.c b/clang/test/Analysis/plist-html-macros.c
index 0ac79be1b9c0c..3563450788c8e 100644
--- a/clang/test/Analysis/plist-html-macros.c
+++ b/clang/test/Analysis/plist-html-macros.c
@@ -1,5 +1,5 @@
 // RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
-// (sanity check)
+// (basic correctness check)
 
 // RUN: rm -rf %t.dir
 // RUN: mkdir -p %t.dir

diff  --git a/clang/test/Analysis/reference.cpp b/clang/test/Analysis/reference.cpp
index 9f3082a8b856a..37113f0fa13c2 100644
--- a/clang/test/Analysis/reference.cpp
+++ b/clang/test/Analysis/reference.cpp
@@ -24,14 +24,14 @@ char t1 () {
   return '0';
 }
 
-// just a sanity test, the same behavior as t1()
+// just a basic correctness test, the same behavior as t1()
 char t2 () {
   *ptr() = 'c';
   return '0';
 }
 
 // Each of the tests below is repeated with pointers as well as references.
-// This is mostly a sanity check, but then again, both should work!
+// This is mostly a basic correctness check, but then again, both should work!
 char t3 () {
   char& r = ref();
   r = 'c'; // no-warning

diff  --git a/clang/test/Analysis/retain-release.m b/clang/test/Analysis/retain-release.m
index 6563662e155f7..c74908483249d 100644
--- a/clang/test/Analysis/retain-release.m
+++ b/clang/test/Analysis/retain-release.m
@@ -2271,7 +2271,7 @@ void useAfterAutorelease() {
 }
 
 void useAfterRelease() {
-  // Sanity check that the previous example would have warned with CFRelease.
+  // Verify that the previous example would have warned with CFRelease.
   extern CFTypeRef CFCreateSomething();
   CFTypeRef obj = CFCreateSomething();
   CFRelease(obj);

diff  --git a/clang/test/CodeGen/attr-nodebug.c b/clang/test/CodeGen/attr-nodebug.c
index 8ffe33621b819..177cb81e7f863 100644
--- a/clang/test/CodeGen/attr-nodebug.c
+++ b/clang/test/CodeGen/attr-nodebug.c
@@ -19,7 +19,7 @@ void t2()
 // CHECK-NOT:   dbg
 // CHECK:       }
 
-// For sanity, check those things do occur normally.
+// Verify those things do occur normally.
 // CHECK-LABEL: @t2
 // CHECK:       call{{.*}}llvm.dbg
 // CHECK:       !dbg

diff  --git a/clang/test/CodeGenObjCXX/arc-attrs.mm b/clang/test/CodeGenObjCXX/arc-attrs.mm
index f6da5427f3944..167dcd5602843 100644
--- a/clang/test/CodeGenObjCXX/arc-attrs.mm
+++ b/clang/test/CodeGenObjCXX/arc-attrs.mm
@@ -4,8 +4,8 @@
 id makeObject2() __attribute__((ns_returns_retained));
 void releaseObject(__attribute__((ns_consumed)) id);
 
-// CHECK-LABEL: define{{.*}} void @_Z10sanityTestv
-void sanityTest() {
+// CHECK-LABEL: define{{.*}} void @_Z20basicCorrectnessTestv
+void basicCorrectnessTest() {
   // CHECK: [[X:%.*]] = alloca i8*, align 8
   // CHECK-NEXT: [[OBJ1:%.*]] = call i8* @_Z11makeObject1v()
   // CHECK-NEXT: store i8* [[OBJ1]], i8** [[X]], align 8
@@ -26,7 +26,7 @@ void sanityTest() {
 T makeObjectT2() __attribute__((ns_returns_retained));
 
 template <typename T>
-void releaseObjectT(__attribute__((ns_consumed)) T);  
+void releaseObjectT(__attribute__((ns_consumed)) T);
 
 // CHECK-LABEL: define{{.*}} void @_Z12templateTestv
 void templateTest() {

diff  --git a/clang/test/CodeGenObjCXX/arc.mm b/clang/test/CodeGenObjCXX/arc.mm
index abf4cbeb66f79..9b3fe9f227048 100644
--- a/clang/test/CodeGenObjCXX/arc.mm
+++ b/clang/test/CodeGenObjCXX/arc.mm
@@ -293,7 +293,7 @@ void test(T x) {
 // CHECK-NEXT: ret i8*
 
 // rdar://13617051
-// Just a basic sanity-check that IR-gen still works after instantiating
+// Just a basic correctness check that IR-gen still works after instantiating
 // a non-dependent message send that requires writeback.
 @interface Test40
 + (void) foo:(id *)errorPtr;

diff  --git a/clang/test/Driver/arm-target-as-march-mcpu.s b/clang/test/Driver/arm-target-as-march-mcpu.s
index 31c027bd0fa65..186b3a497e0b4 100644
--- a/clang/test/Driver/arm-target-as-march-mcpu.s
+++ b/clang/test/Driver/arm-target-as-march-mcpu.s
@@ -6,7 +6,7 @@
 /// Note that the cortex-a8 is armv7-a, the cortex-a32 is armv8-a
 /// and clang's default Arm architecture is armv4t.
 
-/// Sanity check how the options behave when passed to the compiler
+/// Basic correctness check for how the options behave when passed to the compiler
 // RUN: %clang -target arm-linux-gnueabi -### -c -march=armv7-a %s 2>&1 | \
 // RUN: FileCheck --check-prefix=TRIPLE-ARMV7 %s
 // RUN: %clang -target arm-linux-gnueabi -### -c -march=armv7-a+crc %s 2>&1 | \

diff  --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c
index 60c97790b7dae..bb129e75769c9 100644
--- a/clang/test/Driver/clang-g-opts.c
+++ b/clang/test/Driver/clang-g-opts.c
@@ -10,7 +10,7 @@
 // RUN: %clang -### -S %s -g -target x86_64-pc-freebsd10.0 2>&1 \
 // RUN:             | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
 
-// 'g0' is the default. Just sanity-test that it does nothing
+// 'g0' is the default. Just basic correctness check that it does nothing
 // RUN: %clang -### -S %s -g0    2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
 
 // And check that the last of -g or -g0 wins.

diff  --git a/clang/test/Modules/framework-name.m b/clang/test/Modules/framework-name.m
index 5b5d4c66401d2..ebd9de0eb46d7 100644
--- a/clang/test/Modules/framework-name.m
+++ b/clang/test/Modules/framework-name.m
@@ -5,8 +5,8 @@
 // RUN: ln -s %S/Inputs/NameInDirInferred.framework %t/NameInImportInferred.framework
 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fimplicit-module-maps -I %S/Inputs -F %S/Inputs -F %t -Wauto-import -verify %s
 
-// Sanity check that we won't somehow find non-canonical module names or
-// modules where we shouldn't search the framework.
+// Verify that we won't somehow find non-canonical module names or modules where
+// we shouldn't search the framework.
 // RUN: echo '@import NameInModMap;' | not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -F %S/Inputs -F %t -Wauto-import -x objective-c - 2>&1 | FileCheck %s
 // RUN: echo '@import NameInDir;' | not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -F %S/Inputs -F %t -Wauto-import -x objective-c - 2>&1 | FileCheck %s
 // RUN: echo '@import NameInImport;' | not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -F %S/Inputs -F %t -Wauto-import -x objective-c - 2>&1 | FileCheck %s

diff  --git a/clang/test/Modules/target-features.m b/clang/test/Modules/target-features.m
index b2597960cbd03..bbf889b3c7e76 100644
--- a/clang/test/Modules/target-features.m
+++ b/clang/test/Modules/target-features.m
@@ -5,8 +5,8 @@
 
 // RUN: rm -rf %t
 
-// Sanity check one of the compilations.
-// RUN: %clang_cc1 -triple aarch64-unknown-unknown -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -I %S/Inputs -fsyntax-only %s -verify -DSANITY_CHECK
+// Basic check on one of the compilations.
+// RUN: %clang_cc1 -triple aarch64-unknown-unknown -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -I %S/Inputs -fsyntax-only %s -verify -DBASIC_CHECK
 // expected-no-diagnostics
 
 // Check all the targets:
@@ -23,7 +23,7 @@
 // RUN: not %clang_cc1 -triple riscv64-unknown-unknown -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -I %S/Inputs -fsyntax-only  %s 2> %t.riscv64
 // RUN: FileCheck %s -check-prefix=RISCV64 < %t.riscv64
 
-#ifndef SANITY_CHECK
+#ifndef BASIC_CHECK
 @import TargetFeatures;
 // AARCH32-NOT: module 'TargetFeatures' requires
 // AARCH64-NOT: module 'TargetFeatures' requires
@@ -55,7 +55,7 @@
 // RISCV32: module 'TargetFeatures.arm.aarch64' requires feature
 // RISCV64: module 'TargetFeatures.arm.aarch64' requires feature
 
-#ifndef SANITY_CHECK
+#ifndef BASIC_CHECK
 @import TargetFeatures.x86;
 // AARCH32:  module 'TargetFeatures.x86' requires feature 'x86'
 // AARCH64:  module 'TargetFeatures.x86' requires feature 'x86'

diff  --git a/clang/test/Modules/va_list.m b/clang/test/Modules/va_list.m
index aa140fb45cd48..dd8f8955507d6 100644
--- a/clang/test/Modules/va_list.m
+++ b/clang/test/Modules/va_list.m
@@ -4,7 +4,7 @@
 // RUN:     -fmodules-ignore-macro=PREFIX -DPREFIX -I %S/Inputs/va_list \
 // RUN:     -x objective-c-header %s -o %t.pch -emit-pch
 
-// Include the pch, as a sanity check.
+// Include the pch, as a basic correctness check.
 // RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
 // RUN:     -fmodules-ignore-macro=PREFIX -I %S/Inputs/va_list -include-pch %t.pch \
 // RUN:     -x objective-c %s -fsyntax-only

diff  --git a/clang/test/PCH/cxx11-statement-attributes.cpp b/clang/test/PCH/cxx11-statement-attributes.cpp
index b5dfc6cd4c0fc..c3d59ab178a76 100644
--- a/clang/test/PCH/cxx11-statement-attributes.cpp
+++ b/clang/test/PCH/cxx11-statement-attributes.cpp
@@ -1,4 +1,4 @@
-// Sanity check.
+// Basic correctness check.
 // RUN: %clang_cc1 -include %S/Inputs/cxx11-statement-attributes.h -std=c++11 -Wimplicit-fallthrough -fsyntax-only %s -o - -verify
 // RUN: %clang_cc1 -include %S/Inputs/cxx11-statement-attributes.h -std=c++1z -Wimplicit-fallthrough -fsyntax-only %s -o - -verify
 // Run the same tests, this time with the attributes loaded from the PCH file.

diff  --git a/clang/test/Rewriter/instancetype-test.mm b/clang/test/Rewriter/instancetype-test.mm
index 4a7f96103afd3..1c4a92397f8dd 100644
--- a/clang/test/Rewriter/instancetype-test.mm
+++ b/clang/test/Rewriter/instancetype-test.mm
@@ -37,7 +37,7 @@ - (instancetype)initSubclass2;
 - (void)methodOnSubclass2;
 @end
 
-// Sanity check: the basic initialization pattern.
+// Check the basic initialization pattern.
 void test_instancetype_alloc_init_simple() {
   Root *r1 = [[Root alloc] init];
   Subclass1 *sc1 = [[Subclass1 alloc] init];

diff  --git a/clang/test/Rewriter/rewrite-foreach-in-block.mm b/clang/test/Rewriter/rewrite-foreach-in-block.mm
index 14d9d3a66f863..85067017cd78b 100644
--- a/clang/test/Rewriter/rewrite-foreach-in-block.mm
+++ b/clang/test/Rewriter/rewrite-foreach-in-block.mm
@@ -20,12 +20,12 @@ @implementation I
 - (void)M {
     I* ace;
     self.c = ^() {
-          // sanity test for the changes.
+          // Basic correctness check for the changes.
 	  [ace ARR];
           for (I *privilege in [ace ARR]) { }
     };
     self.c = ^() {
-          // sanity test for the changes.
+          // Basic correctness test for the changes.
 	  [ace ARR];
     };
 }

diff  --git a/clang/test/Sema/dllexport.c b/clang/test/Sema/dllexport.c
index 2e0fe0ce114a3..6735999d389eb 100644
--- a/clang/test/Sema/dllexport.c
+++ b/clang/test/Sema/dllexport.c
@@ -73,7 +73,7 @@ void functionScope() {
 //===----------------------------------------------------------------------===//
 
 // Export function declaration. Check 
diff erent placements.
-__attribute__((dllexport)) void decl1A(); // Sanity check with __attribute__
+__attribute__((dllexport)) void decl1A(); // Basic check with __attribute__
 __declspec(dllexport)      void decl1B();
 
 void __attribute__((dllexport)) decl2A();

diff  --git a/clang/test/Sema/dllimport.c b/clang/test/Sema/dllimport.c
index 464623235b886..5f9cc7489226b 100644
--- a/clang/test/Sema/dllimport.c
+++ b/clang/test/Sema/dllimport.c
@@ -149,7 +149,7 @@ void functionScope() {
 //===----------------------------------------------------------------------===//
 
 // Import function declaration. Check 
diff erent placements.
-__attribute__((dllimport)) void decl1A(); // Sanity check with __attribute__
+__attribute__((dllimport)) void decl1A(); // Basic check with __attribute__
 __declspec(dllimport)      void decl1B();
 
 void __attribute__((dllimport)) decl2A();

diff  --git a/clang/test/Sema/predef.c b/clang/test/Sema/predef.c
index 6db683eb66e1b..49776b0ca8f99 100644
--- a/clang/test/Sema/predef.c
+++ b/clang/test/Sema/predef.c
@@ -12,7 +12,7 @@ void a() {
   __func__[0] = 'a';  // expected-error {{variable is not assignable}}
 }
 
-// rdar://6097892 - GCC permits this insanity.
+// rdar://6097892 - GCC permits this.
 const char *b = __func__;  // expected-warning {{predefined identifier is only valid}}
 const char *c = __FUNCTION__; // expected-warning {{predefined identifier is only valid}}
 const char *d = __PRETTY_FUNCTION__; // expected-warning {{predefined identifier is only valid}}

diff  --git a/clang/test/SemaCXX/coroutines-exp-namespace.cpp b/clang/test/SemaCXX/coroutines-exp-namespace.cpp
index cb32ac2d3a8ae..1a1537a0ea1c5 100644
--- a/clang/test/SemaCXX/coroutines-exp-namespace.cpp
+++ b/clang/test/SemaCXX/coroutines-exp-namespace.cpp
@@ -1119,7 +1119,7 @@ struct TestType {
     static_assert(!TC.MatchesArgs<TestType *>, "");
   }
 
-  CoroMemberTag test_sanity(int *) const {
+  CoroMemberTag test_asserts(int *) const {
     auto TC = co_yield 0;
     static_assert(TC.MatchesArgs<const TestType &>, ""); // expected-error {{static_assert failed}}
     static_assert(TC.MatchesArgs<const TestType &>, ""); // expected-error {{static_assert failed}}
@@ -1211,7 +1211,7 @@ template CoroMemberTag TestType::test_static_template<void>(const char *volatile
 template <class... Args>
 struct DepTestType {
 
-  CoroMemberTag test_sanity(int *) const {
+  CoroMemberTag test_asserts(int *) const {
     auto TC = co_yield 0;
     static_assert(TC.template MatchesArgs<const DepTestType &>, ""); // expected-error {{static_assert failed}}
     static_assert(TC.template MatchesArgs<>, "");                    // expected-error {{static_assert failed}}

diff  --git a/clang/test/SemaCXX/coroutines.cpp b/clang/test/SemaCXX/coroutines.cpp
index 26415be800608..e175e3f9fa64f 100644
--- a/clang/test/SemaCXX/coroutines.cpp
+++ b/clang/test/SemaCXX/coroutines.cpp
@@ -1111,7 +1111,7 @@ struct TestType {
     static_assert(!TC.MatchesArgs<TestType *>, "");
   }
 
-  CoroMemberTag test_sanity(int *) const {
+  CoroMemberTag test_asserts(int *) const {
     auto TC = co_yield 0;
     static_assert(TC.MatchesArgs<const TestType &>, ""); // expected-error {{static_assert failed}}
     static_assert(TC.MatchesArgs<const TestType &>, ""); // expected-error {{static_assert failed}}
@@ -1203,7 +1203,7 @@ template CoroMemberTag TestType::test_static_template<void>(const char *volatile
 template <class... Args>
 struct DepTestType {
 
-  CoroMemberTag test_sanity(int *) const {
+  CoroMemberTag test_asserts(int *) const {
     auto TC = co_yield 0;
     static_assert(TC.template MatchesArgs<const DepTestType &>, ""); // expected-error {{static_assert failed}}
     static_assert(TC.template MatchesArgs<>, ""); // expected-error {{static_assert failed}}

diff  --git a/clang/test/SemaCXX/dllexport.cpp b/clang/test/SemaCXX/dllexport.cpp
index 97ce9de86d7e9..b4af68086b940 100644
--- a/clang/test/SemaCXX/dllexport.cpp
+++ b/clang/test/SemaCXX/dllexport.cpp
@@ -181,7 +181,7 @@ template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Def_Exported> = 1;
 //===----------------------------------------------------------------------===//
 
 // Export function declaration. Check 
diff erent placements.
-__attribute__((dllexport)) void decl1A(); // Sanity check with __attribute__
+__attribute__((dllexport)) void decl1A(); // Correctness check with __attribute__
 __declspec(dllexport)      void decl1B();
 
 void __attribute__((dllexport)) decl2A();

diff  --git a/clang/test/SemaCXX/dllimport.cpp b/clang/test/SemaCXX/dllimport.cpp
index 77929430d91bf..642cdd07a6642 100644
--- a/clang/test/SemaCXX/dllimport.cpp
+++ b/clang/test/SemaCXX/dllimport.cpp
@@ -267,7 +267,7 @@ template<> __declspec(dllimport) int VarTmpl<ExplicitSpec_Def_Imported> = 1; //
 //===----------------------------------------------------------------------===//
 
 // Import function declaration. Check 
diff erent placements.
-__attribute__((dllimport)) void decl1A(); // Sanity check with __attribute__
+__attribute__((dllimport)) void decl1A(); // Validation check with __attribute__
 __declspec(dllimport)      void decl1B();
 
 void __attribute__((dllimport)) decl2A();

diff  --git a/clang/test/SemaCXX/warn-thread-safety-analysis.cpp b/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
index a3c07cd27d8f8..a37cd1ad292e8 100644
--- a/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+++ b/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
@@ -2552,7 +2552,7 @@ void test2(Bar* b1, Bar* b2) {
 }
 
 
-// Sanity check -- lock the mutex directly, but use attributes that call getMu()
+// Lock the mutex directly, but use attributes that call getMu()
 // Also lock the mutex using getFooMu, which calls a lock_returned function.
 void test3(Bar* b1, Bar* b2) {
   b1->mu_.Lock();
@@ -4830,7 +4830,7 @@ class Cell {
 
 
 // This mainly duplicates earlier tests, but just to make sure...
-class PtGuardedBySanityTest {
+class PtGuardedByCorrectnessTest {
   Mutex  mu1;
   Mutex  mu2;
   int*   a GUARDED_BY(mu1) PT_GUARDED_BY(mu2);

diff  --git a/clang/test/SemaObjC/arc-repeated-weak.mm b/clang/test/SemaObjC/arc-repeated-weak.mm
index 90388598c7b8d..e9b4d1a048f13 100644
--- a/clang/test/SemaObjC/arc-repeated-weak.mm
+++ b/clang/test/SemaObjC/arc-repeated-weak.mm
@@ -19,7 +19,7 @@ + (__weak id)weakProp;
 extern bool condition();
 #define nil ((id)0)
 
-void sanity(Test *a) {
+void basicCorrectnessTest(Test *a) {
   use(a.weakProp); // expected-warning{{weak property 'weakProp' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive}}
   use(a.weakProp); // expected-note{{also accessed here}}
 
@@ -295,7 +295,7 @@ @interface Test (Methods)
 @end
 
 @implementation Test (Methods)
-- (void)sanity {
+- (void)basicCorrectnessTest {
   use(self.weakProp); // expected-warning{{weak property 'weakProp' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive}}
   use(self.weakProp); // expected-note{{also accessed here}}
 }

diff  --git a/clang/test/SemaObjC/conversion.m b/clang/test/SemaObjC/conversion.m
index 743f7440e2e43..de616e4ae553d 100644
--- a/clang/test/SemaObjC/conversion.m
+++ b/clang/test/SemaObjC/conversion.m
@@ -10,7 +10,7 @@ void radar14415662(RDar14415662 *f, char x, int y) {
   f.otherStuff = !f.stuff; // no-warning
   BOOL b = !f.stuff; // no-warning
 
-  // True positive to sanity check warning is working.
+  // True positive to verify warning is working.
   x = y; // expected-warning {{implicit conversion loses integer precision: 'int' to 'char'}}
 }
 

diff  --git a/clang/test/SemaObjC/instancetype.m b/clang/test/SemaObjC/instancetype.m
index 7811d3eba5834..59a67247a35cd 100644
--- a/clang/test/SemaObjC/instancetype.m
+++ b/clang/test/SemaObjC/instancetype.m
@@ -36,7 +36,7 @@ - (instancetype)initSubclass2;
 - (void)methodOnSubclass2;
 @end
 
-// Sanity check: the basic initialization pattern.
+// Check the basic initialization pattern.
 void test_instancetype_alloc_init_simple() {
   Root *r1 = [[Root alloc] init];
   Subclass1 *sc1 = [[Subclass1 alloc] init];

diff  --git a/clang/test/SemaObjC/warn-retain-cycle.m b/clang/test/SemaObjC/warn-retain-cycle.m
index f27f1f8e041f1..7d40e26f594ef 100644
--- a/clang/test/SemaObjC/warn-retain-cycle.m
+++ b/clang/test/SemaObjC/warn-retain-cycle.m
@@ -119,7 +119,7 @@ - (void) test {
   }];
 }
 - (void) test_positive {
-  // Sanity check that we are really whitelisting 'addOperationWithBlock:' and not doing
+  // Check that we are really allowlisting 'addOperationWithBlock:' and not doing
   // something funny.
   [myOperationQueue addSomethingElse:^() { // expected-note {{block will be retained by an object strongly retained by the captured object}}
     if (count > 20) {

diff  --git a/clang/test/SemaObjCXX/instancetype.mm b/clang/test/SemaObjCXX/instancetype.mm
index 3030d043f4de5..b80eb8fb87379 100644
--- a/clang/test/SemaObjCXX/instancetype.mm
+++ b/clang/test/SemaObjCXX/instancetype.mm
@@ -36,7 +36,7 @@ - (instancetype)initSubclass2;
 - (void)methodOnSubclass2;
 @end
 
-// Sanity check: the basic initialization pattern.
+// Verify the basic initialization pattern.
 void test_instancetype_alloc_init_simple() {
   Root *r1 = [[Root alloc] init];
   Subclass1 *sc1 = [[Subclass1 alloc] init];

diff  --git a/clang/unittests/AST/ASTImporterFixtures.h b/clang/unittests/AST/ASTImporterFixtures.h
index a63a98b7654c9..f309a5090ad2a 100644
--- a/clang/unittests/AST/ASTImporterFixtures.h
+++ b/clang/unittests/AST/ASTImporterFixtures.h
@@ -268,7 +268,7 @@ class TestImportBase
     if (!ToImport)
       return testing::AssertionFailure() << "Node type mismatch!";
 
-    // Sanity check: the node being imported should match in the same way as
+    // The node being imported should match in the same way as
     // the result node.
     internal::BindableMatcher<NodeType> WrapperMatcher(VerificationMatcher);
     EXPECT_TRUE(Verifier.match(ToImport, WrapperMatcher));

diff  --git a/clang/unittests/Analysis/CFGDominatorTree.cpp b/clang/unittests/Analysis/CFGDominatorTree.cpp
index 8cbd72c94e677..db99c13bd99cd 100644
--- a/clang/unittests/Analysis/CFGDominatorTree.cpp
+++ b/clang/unittests/Analysis/CFGDominatorTree.cpp
@@ -33,7 +33,7 @@ TEST(CFGDominatorTree, DomTree) {
 
   CFG *cfg = Result.getCFG();
 
-  // Sanity checks.
+  // Basic correctness checks.
   EXPECT_EQ(cfg->size(), 4u);
 
   CFGBlock *ExitBlock = *cfg->begin();
@@ -122,7 +122,7 @@ TEST(CFGDominatorTree, ControlDependency) {
 
   CFG *cfg = Result.getCFG();
 
-  // Sanity checks.
+  // Basic correctness checks.
   EXPECT_EQ(cfg->size(), 6u);
 
   CFGBlock *ExitBlock = *cfg->begin();

diff  --git a/clang/unittests/Sema/ExternalSemaSourceTest.cpp b/clang/unittests/Sema/ExternalSemaSourceTest.cpp
index 2a86f948abc54..b7679fecb4be2 100644
--- a/clang/unittests/Sema/ExternalSemaSourceTest.cpp
+++ b/clang/unittests/Sema/ExternalSemaSourceTest.cpp
@@ -220,7 +220,7 @@ class ExternalSemaSourceInstaller : public clang::ASTFrontendAction {
 };
 
 // Make sure that the DiagnosticWatcher is not miscounting.
-TEST(ExternalSemaSource, SanityCheck) {
+TEST(ExternalSemaSource, DiagCheck) {
   auto Installer = std::make_unique<ExternalSemaSourceInstaller>();
   DiagnosticWatcher Watcher("AAB", "BBB");
   Installer->PushWatcher(&Watcher);

diff  --git a/clang/unittests/Tooling/Syntax/TokensTest.cpp b/clang/unittests/Tooling/Syntax/TokensTest.cpp
index 1768529e0a620..e7cb25782133e 100644
--- a/clang/unittests/Tooling/Syntax/TokensTest.cpp
+++ b/clang/unittests/Tooling/Syntax/TokensTest.cpp
@@ -633,7 +633,7 @@ TEST_F(TokenBufferTest, SpelledByExpanded) {
     a1 a2 a3 b1 b2
   )cpp");
 
-  // Sanity check: expanded and spelled tokens are stored separately.
+  // Expanded and spelled tokens are stored separately.
   EXPECT_THAT(findExpanded("a1 a2"), Not(SameRange(findSpelled("a1 a2"))));
   // Searching for subranges of expanded tokens should give the corresponding
   // spelled ones.
@@ -751,7 +751,7 @@ TEST_F(TokenBufferTest, ExpandedTokensForRange) {
 
   SourceRange R(findExpanded("C").front().location(),
                 findExpanded("F_washere").front().location());
-  // Sanity check: expanded and spelled tokens are stored separately.
+  // Expanded and spelled tokens are stored separately.
   EXPECT_THAT(Buffer.expandedTokens(R),
               SameRange(findExpanded("C D_washere E F_washere")));
   EXPECT_THAT(Buffer.expandedTokens(SourceRange()), testing::IsEmpty());
@@ -935,7 +935,7 @@ TEST_F(TokenBufferTest, ExpandedBySpelled) {
   recordTokens(R"cpp(
     a1 a2 a3 b1 b2
   )cpp");
-  // Sanity check: expanded and spelled tokens are stored separately.
+  // Expanded and spelled tokens are stored separately.
   EXPECT_THAT(findExpanded("a1 a2"), Not(SameRange(findSpelled("a1 a2"))));
   // Searching for subranges of expanded tokens should give the corresponding
   // spelled ones.


        


More information about the cfe-commits mailing list