Speculative fix for buildbot failures after r338464.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 1 Aug 2018 01:57:49 +0000 (01:57 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 1 Aug 2018 01:57:49 +0000 (01:57 +0000)
llvm-svn: 338473

clang/lib/Sema/SemaDecl.cpp

index 50ea98e..eb76b94 100644 (file)
@@ -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<FunctionDecl>(&ND)) {
     for (TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc();
-         auto ATL = TL.getAsAdjusted<AttributedTypeLoc>();
+         auto ATL = TL ? TL.getAsAdjusted<AttributedTypeLoc>()
+                       : 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)