summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-08-01 01:57:49 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-08-01 01:57:49 +0000
commitc4581f4e92797db5fb8d15520ecbc3fa938f8b79 (patch)
treeff7774fe5ec5fc6ae03232b399b282caddf292ea /clang/lib/Sema/SemaDecl.cpp
parentb0386a515b60c2f43eaaef986bd5b1cdc4448244 (diff)
downloadbcm5719-llvm-c4581f4e92797db5fb8d15520ecbc3fa938f8b79.tar.gz
bcm5719-llvm-c4581f4e92797db5fb8d15520ecbc3fa938f8b79.zip
Speculative fix for buildbot failures after r338464.
llvm-svn: 338473
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 50ea98e7f60..eb76b949af8 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud