On Fri, Apr 22, 2016 at 1:58 PM, Richard Smith <[email protected]>
wrote:
>
> This seems like a fragile thing to rely on. What about template
> instantiation performed at end of TU? (I /think/ that case is currently
> fine because all the kinds of template we instantiate ultimately do result
> in a call to HandleTopLevelDecl or some other ASTConsumer callback, but I
> don't really like relying on that.)
>
> Could we trigger processing of any remaining deferred declarations in
> HandleTranslationUnit?
>
We could, but we already have this assert in the destructor:
// There should normally not be any leftover inline method
definitions.
assert(DeferredInlineMethodDefinitions.empty() ||
Diags.hasErrorOccurred());
If we ever break the invariant that HandleTopLevelDecl will be called some
time after deferring a decl, we will find out about it eventually.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits