diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-08-01 01:57:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-08-01 01:57:49 +0000 |
commit | 0c285b370c0599a9665201ad3195410c190566d9 (patch) | |
tree | fb9dd85ac8a4aca560b7ec1755b3c0eca56edd94 | |
parent | fb3df3d18df6c52cec09acecd8301ad8dd529034 (diff) |
Speculative fix for buildbot failures after r338464.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338473 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<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) |