Author: zaks
Date: Thu Jan 10 21:52:44 2013
New Revision: 172170
URL: http://llvm.org/viewvc/llvm-project?rev=172170&view=rev
Log:
[analyzer] Rename the warning: state the issue before the hint of how it
can be fixed
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
cfe/trunk/test/Analysis/objc_invalidation.m
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp?rev=172170&r1=172169&r2=172170&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp Thu Jan
10 21:52:44 2013
@@ -408,11 +408,10 @@
if (!Info.needsInvalidation()) {
SmallString<128> sbuf;
llvm::raw_svector_ostream os(sbuf);
- os << "No invalidation method declared in the @interface for "
- << InterfaceD->getName() << "; ";
assert(FirstIvarDecl);
printIvar(os, FirstIvarDecl, IvarToPopertyMap);
- os << "needs to be invalidated";
+ os << "needs to be invalidated; ";
+ os << "No invalidation method is declared for " << InterfaceD->getName();
PathDiagnosticLocation IvarDecLocation =
PathDiagnosticLocation::createBegin(FirstIvarDecl,
BR.getSourceManager());
@@ -473,11 +472,11 @@
if (!AtImplementationContainsAtLeastOneInvalidationMethod) {
SmallString<128> sbuf;
llvm::raw_svector_ostream os(sbuf);
- os << "No invalidation method defined in the @implementation for "
- << InterfaceD->getName() << "; ";
assert(FirstIvarDecl);
printIvar(os, FirstIvarDecl, IvarToPopertyMap);
- os << "needs to be invalidated";
+ os << "needs to be invalidated; ";
+ os << "No invalidation method is defined in the @implementation for "
+ << InterfaceD->getName();
PathDiagnosticLocation IvarDecLocation =
PathDiagnosticLocation::createBegin(FirstIvarDecl,
Modified: cfe/trunk/test/Analysis/objc_invalidation.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/objc_invalidation.m?rev=172170&r1=172169&r2=172170&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/objc_invalidation.m (original)
+++ cfe/trunk/test/Analysis/objc_invalidation.m Thu Jan 10 21:52:44 2013
@@ -225,20 +225,20 @@
@end
@interface MissingInvalidationMethod : Foo <FooBar_Protocol>
-@property (assign) MissingInvalidationMethod *foobar15_warn; //
expected-warning {{No invalidation method defined in the @implementation for
MissingInvalidationMethod; Property foobar15_warn needs to be invalidated}}
+@property (assign) MissingInvalidationMethod *foobar15_warn; //
expected-warning {{Property foobar15_warn needs to be invalidated; No
invalidation method is defined in the @implementation for
MissingInvalidationMethod}}
@end
@implementation MissingInvalidationMethod
@end
@interface MissingInvalidationMethod2 : Foo <FooBar_Protocol> {
- Foo *Ivar1;// expected-warning {{No invalidation method defined in the
@implementation for MissingInvalidationMethod2; Instance variable Ivar1 needs
to be invalidated}}
+ Foo *Ivar1;// expected-warning {{Instance variable Ivar1 needs to be
invalidated; No invalidation method is defined in the @implementation for
MissingInvalidationMethod2}}
}
@end
@implementation MissingInvalidationMethod2
@end
@interface MissingInvalidationMethodDecl : NSObject {
- Foo *Ivar1;// expected-warning {{No invalidation method declared in the
@interface for MissingInvalidationMethodDecl; Instance variable Ivar1 needs to
be invalidated}}
+ Foo *Ivar1;// expected-warning {{Instance variable Ivar1 needs to be
invalidated; No invalidation method is declared for
MissingInvalidationMethodDecl}}
}
@end
@implementation MissingInvalidationMethodDecl
@@ -246,7 +246,7 @@
@interface MissingInvalidationMethodDecl2 : NSObject {
@private
- Foo *_foo1; // expected-warning {{No invalidation method declared in the
@interface for MissingInvalidationMethodDecl2; Instance variable _foo1 needs to
be invalidated}}
+ Foo *_foo1; // expected-warning {{Instance variable _foo1 needs to be
invalidated; No invalidation method is declared for
MissingInvalidationMethodDecl2}}
}
@property (strong) Foo *bar1;
@end
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits