dblaikie added inline comments.

================
Comment at: include/clang/AST/TemplateBase.h:109-111
+    // This is the type that most closely resembles what is in the source.
+    // At the moment it is retaining typedefs, but not decltype or typeof.
+    uintptr_t DisplayType;
----------------
I'd like Richard Smith (currently on vacation) to take a look at the changes to 
the AST like this.

(maybe it should be preserving the type as written, including decltype, typeof, 
etc - and those can be stripped out later by debug info emission? Maybe there's 
a way this is useful for clang diagnostics as well - or could leverage/reuse 
techniques already used there)


================
Comment at: include/clang/Basic/LangOptions.def:266
+LANGOPT(EmitTypedefNamesInTemplateTypes, 1, 0,
+        "emit typedef names in template types (DWARF)")
+
----------------
aprantl wrote:
> Perhaps PreserveSugarInTemplateTypes since it appears to also affect 
> qualifiers?
Which qualifiers did you have in mind? (normally qualifiers would have to be 
preserved, right? (eg: a template type parameter of 'const int' is distinct 
from a template type parameter of 'int', etc))

Though I tend to agree Sugar's probably a better/broader/more general term here 
- but would love to have concrete examples of what does end up being preserved 
here.

(also having 'debug' or similar (dwarf, etc) in the name of this option might 
be useful - not sure if there's prior art to draw from in terms of other debug 
related langopts)


https://reviews.llvm.org/D35715



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to