summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-03-22 23:33:22 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-03-22 23:33:22 +0000
commitd28ac5b9981993a6ae527c155e4385b8afad6ac7 (patch)
treebad015f1f91016bb4d218e8e4512230a009b0ac3 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parent62e5f4de3d968e8f1c6b620a0dc6324562720c9d (diff)
downloadbcm5719-llvm-d28ac5b9981993a6ae527c155e4385b8afad6ac7.tar.gz
bcm5719-llvm-d28ac5b9981993a6ae527c155e4385b8afad6ac7.zip
Emit an update record if we instantiate the definition of a function template
specialization from a module. (This can also happen for function template specializations in PCHs if they're instantiated eagerly, because they're constexpr or have a deduced return type.) llvm-svn: 204547
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 376f6f79f4c..0982f442573 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -12,6 +12,7 @@
#include "clang/Sema/SemaInternal.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
+#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/DependentDiagnostic.h"
@@ -3439,7 +3440,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
PerformDependentDiagnostics(PatternDecl, TemplateArgs);
- // FIXME: Notify the ASTMutationListener that we did this.
+ if (auto *Listener = getASTMutationListener())
+ Listener->FunctionDefinitionInstantiated(Function);
savedContext.pop();
}
OpenPOWER on IntegriCloud