r338473 - Speculative fix for buildbot failures after r338464.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 31 18:57:49 PDT 2018
Author: rsmith
Date: Tue Jul 31 18:57:49 2018
New Revision: 338473
URL: http://llvm.org/viewvc/llvm-project?rev=338473&view=rev
Log:
Speculative fix for buildbot failures after r338464.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=338473&r1=338472&r2=338473&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue Jul 31 18:57:49 2018
@@ -6012,7 +6012,8 @@ static void checkAttributesAfterMerging(
// 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)
More information about the cfe-commits
mailing list