explicit instantiation. Also, tighten up reference-count checking to
help catch these issues earlier. Fixes PR5069.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83225
91177308-0d34-0410-b5e6-
96231b3b80d8
return this;
}
- StmtClass getStmtClass() const { return (StmtClass)sClass; }
+ StmtClass getStmtClass() const {
+ assert(RefCount >= 1 && "Referencing already-destroyed statement!");
+ return (StmtClass)sClass;
+ }
const char *getStmtClassName() const;
/// SourceLocation tokens are not useful in isolation - they are low level
TemplateId->getTemplateArgLocations(),
TemplateArgs);
HasExplicitTemplateArgs = true;
+ TemplateArgsPtr.release();
}
// C++ [temp.explicit]p1:
void print_type(double*);
template void print_type<double>(double*);
+
+// PR5069
+template<int I> void foo0 (int (&)[I + 1]) { }
+template void foo0<2> (int (&)[3]);