diff options
Diffstat (limited to 'lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r-- | lib/Sema/SemaExceptionSpec.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp index d08e84dacd..5d7993b1af 100644 --- a/lib/Sema/SemaExceptionSpec.cpp +++ b/lib/Sema/SemaExceptionSpec.cpp @@ -81,7 +81,6 @@ bool Sema::CheckSpecifiedExceptionType(QualType T, const SourceRange &Range) { /// to member to a function with an exception specification. This means that /// it is invalid to add another level of indirection. bool Sema::CheckDistantExceptionSpec(QualType T) { - T = T.IgnoreParens(); if (const PointerType *PT = T->getAs<PointerType>()) T = PT->getPointeeType(); else if (const MemberPointerType *PT = T->getAs<MemberPointerType>()) @@ -89,7 +88,6 @@ bool Sema::CheckDistantExceptionSpec(QualType T) { else return false; - T = T.IgnoreParens(); const FunctionProtoType *FnT = T->getAs<FunctionProtoType>(); if (!FnT) return false; @@ -198,7 +196,7 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) { SourceLocation AfterParenLoc; if (TypeSourceInfo *TSInfo = New->getTypeSourceInfo()) { - TypeLoc TL = TSInfo->getTypeLoc(); + TypeLoc TL = TSInfo->getTypeLoc().IgnoreParens(); if (const FunctionTypeLoc *FTLoc = dyn_cast<FunctionTypeLoc>(&TL)) AfterParenLoc = PP.getLocForEndOfToken(FTLoc->getRParenLoc()); } |