From: Richard Smith Date: Wed, 1 Aug 2018 01:57:49 +0000 (+0000) Subject: Speculative fix for buildbot failures after r338464. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c285b370c0599a9665201ad3195410c190566d9;p=clang Speculative fix for buildbot failures after r338464. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338473 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 50ea98e7f6..eb76b949af 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -6012,7 +6012,8 @@ static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) { // Check the attributes on the function type, if any. if (const auto *FD = dyn_cast(&ND)) { for (TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc(); - auto ATL = TL.getAsAdjusted(); + auto ATL = TL ? TL.getAsAdjusted() + : AttributedTypeLoc(); TL = ATL.getModifiedLoc()) { // The [[lifetimebound]] attribute can be applied to the implicit object // parameter of a non-static member function (other than a ctor or dtor)