mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-02 07:16:29 +00:00
[analyzer] Fix a regression in ObjCUnusedIVars checker.
We can no longer rely on children iterator to visit all the AST tree children of an expression (OpaqueValueExpr has no children). llvm-svn: 156870
This commit is contained in:
parent
a1626369b6
commit
58d986c866
@ -47,6 +47,15 @@ static void Scan(IvarUsageMap& M, const Stmt *S) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (const PseudoObjectExpr *POE = dyn_cast<PseudoObjectExpr>(S))
|
||||
for (PseudoObjectExpr::const_semantics_iterator
|
||||
i = POE->semantics_begin(), e = POE->semantics_end(); i != e; ++i) {
|
||||
const Expr *sub = *i;
|
||||
if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(sub))
|
||||
sub = OVE->getSourceExpr();
|
||||
Scan(M, sub);
|
||||
}
|
||||
|
||||
for (Stmt::const_child_iterator I=S->child_begin(),E=S->child_end(); I!=E;++I)
|
||||
Scan(M, *I);
|
||||
}
|
||||
|
@ -108,3 +108,24 @@ int radar_7254495(RDar7254495 *a) {
|
||||
|
||||
@implementation RDar8481311
|
||||
@end
|
||||
|
||||
@class NSString;
|
||||
@interface Radar11059352_1 {
|
||||
@private
|
||||
NSString *_pathString;
|
||||
}
|
||||
@property (readonly, strong) NSString *pathString;
|
||||
@end
|
||||
|
||||
@interface Radar11059352 {
|
||||
@private
|
||||
Radar11059352_1 *_workspacePath;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation Radar11059352
|
||||
|
||||
- (void)useWorkspace {
|
||||
NSString *workspacePathString = _workspacePath.pathString;
|
||||
}
|
||||
@end
|
Loading…
x
Reference in New Issue
Block a user