[llvm-branch-commits] [cfe-branch] r167776 - in /cfe/branches/release_32: ./ lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp test/Analysis/retain-release-inline.m test/SemaCXX/warn-unreachable.cpp
Ted Kremenek
kremenek at apple.com
Mon Nov 12 15:03:24 PST 2012
Author: kremenek
Date: Mon Nov 12 17:03:24 2012
New Revision: 167776
URL: http://llvm.org/viewvc/llvm-project?rev=167776&view=rev
Log:
Merge in analyzer fix r167762, which was a recent regression.
Modified:
cfe/branches/release_32/ (props changed)
cfe/branches/release_32/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
cfe/branches/release_32/test/Analysis/retain-release-inline.m
cfe/branches/release_32/test/SemaCXX/warn-unreachable.cpp (props changed)
Propchange: cfe/branches/release_32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 12 17:03:24 2012
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:167749
+/cfe/trunk:167749,167762
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_32/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp?rev=167776&r1=167775&r2=167776&view=diff
==============================================================================
--- cfe/branches/release_32/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp (original)
+++ cfe/branches/release_32/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp Mon Nov 12 17:03:24 2012
@@ -137,6 +137,8 @@
return V;
// If the types already match, don't do any unnecessary work.
+ ExpectedTy = ExpectedTy.getCanonicalType();
+ ActualTy = ActualTy.getCanonicalType();
if (ExpectedTy == ActualTy)
return V;
Modified: cfe/branches/release_32/test/Analysis/retain-release-inline.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/test/Analysis/retain-release-inline.m?rev=167776&r1=167775&r2=167776&view=diff
==============================================================================
--- cfe/branches/release_32/test/Analysis/retain-release-inline.m (original)
+++ cfe/branches/release_32/test/Analysis/retain-release-inline.m Mon Nov 12 17:03:24 2012
@@ -343,5 +343,21 @@
CFRelease(str);
}
+extern CFStringRef getString(void);
+CFStringRef testCovariantReturnType(void) __attribute__((cf_returns_retained));
+void usetestCovariantReturnType() {
+ CFStringRef S = ((void*)0);
+ S = testCovariantReturnType();
+ if (S)
+ CFRelease(S);
+}
+CFStringRef testCovariantReturnType() {
+ CFStringRef Str = ((void*)0);
+ Str = getString();
+ if (Str) {
+ CFRetain(Str);
+ }
+ return Str;
+}
Propchange: cfe/branches/release_32/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 12 17:03:24 2012
@@ -1,2 +1,2 @@
/cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,167749
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,167749,167762
More information about the llvm-branch-commits
mailing list