forked from OSchip/llvm-project
Explicitly access the first Decl* referenced by a DeclStmt instead of using "getDecl()." Added a FIXME indicating that the call to RewriteObjCQualifiedInterfaceTypes() is meant to modifying the type-specifier; hopefully this will be a little more clean once DeclGroups contain type specifiers.
llvm-svn: 57216
This commit is contained in:
parent
5b6f8ee7b9
commit
db7f2a74db
|
@ -1026,9 +1026,15 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) {
|
|||
dyn_cast<ContinueStmt>(S))
|
||||
return RewriteContinueStmt(StmtContinueStmt);
|
||||
|
||||
// Need to check for protocol refs (id <P>, Foo <P> *) in variable decls and cast exprs.
|
||||
if (DeclStmt *DS = dyn_cast<DeclStmt>(S))
|
||||
RewriteObjCQualifiedInterfaceTypes(DS->getDecl());
|
||||
// Need to check for protocol refs (id <P>, Foo <P> *) in variable decls
|
||||
// and cast exprs.
|
||||
if (DeclStmt *DS = dyn_cast<DeclStmt>(S)) {
|
||||
// FIXME: What we're doing here is modifying the type-specifier that
|
||||
// precedes the first Decl. In the future the DeclGroup should have
|
||||
// a separate type-specifier that we can rewrite.
|
||||
RewriteObjCQualifiedInterfaceTypes(*DS->decl_begin());
|
||||
}
|
||||
|
||||
if (ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(S))
|
||||
RewriteObjCQualifiedInterfaceTypes(CE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue