diff options
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index c82aeaadd4..10c1adc875 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1546,6 +1546,13 @@ FunctionProtoType::FunctionProtoType(QualType result, const QualType *args, else if (epi.NoexceptExpr->isInstantiationDependent()) setInstantiationDependent(); } + } else if (getExceptionSpecType() == EST_Uninstantiated) { + // Store the function decl from which we will resolve our + // exception specification. + FunctionDecl **slot = reinterpret_cast<FunctionDecl**>(argSlot + numArgs); + *slot = epi.ExceptionSpecDecl; + // This exception specification doesn't make the type dependent, because + // it's not instantiated as part of instantiating the type. } if (epi.ConsumedArguments) { @@ -1629,6 +1636,8 @@ void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID, QualType Result, ID.AddPointer(epi.Exceptions[i].getAsOpaquePtr()); } else if (epi.ExceptionSpecType == EST_ComputedNoexcept && epi.NoexceptExpr){ epi.NoexceptExpr->Profile(ID, Context, false); + } else if (epi.ExceptionSpecType == EST_Uninstantiated) { + ID.AddPointer(epi.ExceptionSpecDecl->getCanonicalDecl()); } if (epi.ConsumedArguments) { for (unsigned i = 0; i != NumArgs; ++i) |