forked from OSchip/llvm-project
				
			Sema: address post-commit review comment
Hoist the IgnoreParens so that we ignore it around attributes as well in order to future-proof the code. Addresses Richard's comments for SVN r219974. llvm-svn: 220053
This commit is contained in:
		
							parent
							
								
									1a27e04af9
								
							
						
					
					
						commit
						e8aab7480c
					
				| 
						 | 
					@ -2756,10 +2756,10 @@ bool LocalTypedefNameReferencer::VisitRecordType(const RecordType *RT) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TypeLoc Sema::getReturnTypeLoc(FunctionDecl *FD) const {
 | 
					TypeLoc Sema::getReturnTypeLoc(FunctionDecl *FD) const {
 | 
				
			||||||
  TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc();
 | 
					  TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc().IgnoreParens();
 | 
				
			||||||
  while (auto ATL = TL.getAs<AttributedTypeLoc>())
 | 
					  while (auto ATL = TL.getAs<AttributedTypeLoc>())
 | 
				
			||||||
    TL = ATL.getModifiedLoc().IgnoreParens();
 | 
					    TL = ATL.getModifiedLoc().IgnoreParens();
 | 
				
			||||||
  return TL.IgnoreParens().castAs<FunctionProtoTypeLoc>().getReturnLoc();
 | 
					  return TL.castAs<FunctionProtoTypeLoc>().getReturnLoc();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Deduce the return type for a function from a returned expression, per
 | 
					/// Deduce the return type for a function from a returned expression, per
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue