summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-10-17 17:20:33 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-10-17 17:20:33 +0000
commite8aab7480c2550b51fd60d6eb102b361e70931d7 (patch)
tree9004494b60ec6d480046f130a0ebee548eb2ccd1
parent1a27e04af9a1e0301546953f9e9fcb101e7d0f1b (diff)
downloadbcm5719-llvm-e8aab7480c2550b51fd60d6eb102b361e70931d7.tar.gz
bcm5719-llvm-e8aab7480c2550b51fd60d6eb102b361e70931d7.zip
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
-rw-r--r--clang/lib/Sema/SemaStmt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 8a28b29a1ca..0c2d9e3e7a0 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -2756,10 +2756,10 @@ bool LocalTypedefNameReferencer::VisitRecordType(const RecordType *RT) {
}
TypeLoc Sema::getReturnTypeLoc(FunctionDecl *FD) const {
- TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc();
+ TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc().IgnoreParens();
while (auto ATL = TL.getAs<AttributedTypeLoc>())
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
OpenPOWER on IntegriCloud