|
59 | 59 | #include "clang/Sema/TypoCorrection.h"
|
60 | 60 | #include "clang/Sema/Weak.h"
|
61 | 61 | #include "llvm/ADT/ArrayRef.h"
|
| 62 | +#include "llvm/ADT/DenseMap.h" |
62 | 63 | #include "llvm/ADT/SetVector.h"
|
63 | 64 | #include "llvm/ADT/SmallBitVector.h"
|
64 | 65 | #include "llvm/ADT/SmallPtrSet.h"
|
@@ -10087,6 +10088,12 @@ class Sema final {
|
10087 | 10088 | /// but have not yet been performed.
|
10088 | 10089 | std::deque<PendingImplicitInstantiation> PendingInstantiations;
|
10089 | 10090 |
|
| 10091 | + /// Track constexpr functions referenced before they are (lexically) defined. |
| 10092 | + /// The key is the pattern, associated with a list of specialisations that |
| 10093 | + /// need to be instantiated when the pattern is defined. |
| 10094 | + llvm::DenseMap<NamedDecl *, SmallVector<NamedDecl *>> |
| 10095 | + PendingInstantiationsOfConstexprEntities; |
| 10096 | + |
10090 | 10097 | /// Queue of implicit template instantiations that cannot be performed
|
10091 | 10098 | /// eagerly.
|
10092 | 10099 | SmallVector<PendingImplicitInstantiation, 1> LateParsedInstantiations;
|
@@ -10405,6 +10412,9 @@ class Sema final {
|
10405 | 10412 | bool Recursive = false,
|
10406 | 10413 | bool DefinitionRequired = false,
|
10407 | 10414 | bool AtEndOfTU = false);
|
| 10415 | + |
| 10416 | + void PerformPendingInstantiationsOfConstexprFunctions(FunctionDecl *Template); |
| 10417 | + |
10408 | 10418 | VarTemplateSpecializationDecl *BuildVarTemplateInstantiation(
|
10409 | 10419 | VarTemplateDecl *VarTemplate, VarDecl *FromVar,
|
10410 | 10420 | const TemplateArgumentList &TemplateArgList,
|
|
0 commit comments