[clang] 57a4f9b - Fix failing test case found by bots:

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 15 06:20:23 PDT 2022


Author: Aaron Ballman
Date: 2022-04-15T09:20:16-04:00
New Revision: 57a4f9bd493bca0dc78b16951c7d3f3fadfbc2f2

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

LOG: Fix failing test case found by bots:

https://lab.llvm.org/buildbot#builders/109/builds/36683
https://lab.llvm.org/buildbot#builders/164/builds/15456
(and others)

Added: 
    

Modified: 
    clang/test/SemaObjC/nonnull.m

Removed: 
    


################################################################################
diff  --git a/clang/test/SemaObjC/nonnull.m b/clang/test/SemaObjC/nonnull.m
index 303a201f48618..3b087b096d8f9 100644
--- a/clang/test/SemaObjC/nonnull.m
+++ b/clang/test/SemaObjC/nonnull.m
@@ -41,10 +41,8 @@ extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1)
   func4(0, cp1); // expected-warning {{null passed to a callee that requires a non-null argument}}
   func4(cp1, 0); // expected-warning {{null passed to a callee that requires a non-null argument}}
   
-  // Shouldn't these emit warnings?  Clang doesn't, and neither does GCC.  It
-  // seems that the checking should handle Objective-C pointers.
-  func6((NSObject*) 0); // no-warning
-  func7((NSObject*) 0); // no-warning
+  func6((NSObject*) 0); // expected-warning {{passing arguments to 'func6' without a prototype is deprecated in all versions of C and is not supported in C2x}}
+  func7((NSObject*) 0); // expected-warning {{passing arguments to 'func7' without a prototype is deprecated in all versions of C and is not supported in C2x}}
 }
 
 void func5(int) NONNULL_ATTR; //  no warning


        


More information about the cfe-commits mailing list