Emit template backtrace in libtool diagnostics?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Emit template backtrace in libtool diagnostics?

Sumner, Brian via cfe-dev
Hi All,

If I have a libtool processing code like this

template <typename T>
struct C {
  T *ptr; // error: cannot have a pointer to a reference
  bool func() { } // error: must return a value
};

C<int &>;

there are two kinds of errors: one which results from a dependent template type substitution during template specialization, and one which is independent of the template context. Ideally, the tool's diagnostics would emit a template backtrace in the former case, but not the latter.

How can this be done? I'm using the DiagnosticBuilder API, but it doesn't provide any special functionality for dealing with templates.

Thanks in advance,

Scott Constable

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...