[cfe-commits] r82866 - /cfe/trunk/test/Analysis/misc-ps.m
Ted Kremenek
kremenek at apple.com
Sat Sep 26 10:18:45 PDT 2009
Author: kremenek
Date: Sat Sep 26 12:18:44 2009
New Revision: 82866
URL: http://llvm.org/viewvc/llvm-project?rev=82866&view=rev
Log:
Added test case for <rdar://problem/7152418>.
Modified:
cfe/trunk/test/Analysis/misc-ps.m
Modified: cfe/trunk/test/Analysis/misc-ps.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps.m?rev=82866&r1=82865&r2=82866&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps.m (original)
+++ cfe/trunk/test/Analysis/misc-ps.m Sat Sep 26 12:18:44 2009
@@ -657,3 +657,27 @@
pr_4988; // expected-warning{{expression result unused}}
}
+// <rdar://problem/7152418> - A 'signed char' is used as a flag, which is
+// implicitly converted to an int.
+void *rdar7152418_bar();
+ at interface RDar7152418 {
+ signed char x;
+}
+-(char)foo;
+ at end;
+ at implementation RDar7152418
+-(char)foo {
+ char *p = 0;
+ void *result = 0;
+ if (x) {
+ result = rdar7152418_bar();
+ p = "hello";
+ }
+ if (!result) {
+ result = rdar7152418_bar();
+ if (result && x)
+ return *p; // no-warning
+ }
+ return 1;
+}
+
More information about the cfe-commits
mailing list