[www] r353005 - [GSoC] Re-add GSoC project. Last year we had no candidate
Vassil Vassilev via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 3 11:46:20 PST 2019
Author: vvassilev
Date: Sun Feb 3 11:46:19 2019
New Revision: 353005
URL: http://llvm.org/viewvc/llvm-project?rev=353005&view=rev
Log:
[GSoC] Re-add GSoC project. Last year we had no candidate
Modified:
www/trunk/OpenProjects.html
Modified: www/trunk/OpenProjects.html
URL: http://llvm.org/viewvc/llvm-project/www/trunk/OpenProjects.html?rev=353005&r1=353004&r2=353005&view=diff
==============================================================================
--- www/trunk/OpenProjects.html (original)
+++ www/trunk/OpenProjects.html Sun Feb 3 11:46:19 2019
@@ -8,8 +8,12 @@
<li>
<b>LLVM Core</b>
</li>
- <li><a href="http://clang.llvm.org/"><b>Clang</b></a>
- </li>
+ <a href="http://clang.llvm.org/"><b>Clang</b></a><ul>
+ <li><a href="#clang-template-instantiation-sugar">Extend clang AST to
+ provide information for the type as written in template
+ instantiations</a>
+ </li>
+ </ul>
<li>
<a href="http://lldb.llvm.org/"><b>LLDB</b></a>
</li>
@@ -88,6 +92,74 @@ different and look forward to hearing yo
submit a proposal, please visit the Google Summer of Code
main <a href="https://developers.google.com/open-source/gsoc/">website.</a></p>
+<!-- *********************************************************************** -->
+<div class="www_subsection">
+ <a>LLVM</a>
+</div>
+<!-- *********************************************************************** -->
+
+
+<!-- *********************************************************************** -->
+<div class="www_subsection">
+ <a>Clang</a>
+</div>
+<!-- *********************************************************************** -->
+
+<!-- *********************************************************************** -->
+<div class="www_subsubsection">
+ <a name="clang-template-instantiation-sugar">Extend clang AST to provide
+ information for the type as written in template instantiations.</a>
+</div>
+<!-- *********************************************************************** -->
+
+<div class="www_text">
+ <p><b>Description of the project: </b>
+ When instantiating a template, the template arguments are canonicalized
+ before being substituted into the template pattern. Clang does not preserve
+ type sugar when subsequently accessing members of the instantiation.
+
+ <pre>
+ std::vector<std::string> vs;
+ int n = vs.front(); // bad diagnostic: [...] aka 'std::basic_string<char>' [...]
+
+ template<typename T> struct Id { typedef T type; };
+ Id<size_t>::type // just 'unsigned long', 'size_t' sugar has been lost
+ </pre>
+
+ Clang should "re-sugar" the type when performing member access on a class
+ template specialization, based on the type sugar of the accessed
+ specialization. The type of vs.front() should be std::string, not
+ std::basic_string<char, [...]>.
+ <br /> <br />
+ Suggested design approach: add a new type node to represent template
+ argument sugar, and implicitly create an instance of this node whenever a
+ member of a class template specialization is accessed. When performing a
+ single-step desugar of this node, lazily create the desugared representation
+ by propagating the sugared template arguments onto inner type nodes (and in
+ particular, replacing Subst*Parm nodes with the corresponding sugar). When
+ printing the type for diagnostic purposes, use the annotated type sugar to
+ print the type as originally written.
+ <br /> <br />
+ For good results, template argument deduction will also need to be able to
+ deduce type sugar (and reconcile cases where the same type is deduced twice
+ with different sugar).
+ </p>
+
+ <p><b>Expected results: </b>
+ Diagnostics preserve type sugar even when accessing members of a template
+ specialization. T<unsigned long> and T<size_t> are still the
+ same type and the same template instantiation, but
+ T<unsigned long>::type single-step desugars to 'unsigned long' and
+ T<size_t>::type single-step desugars to 'size_t'.
+
+ <p><b>Confirmed Mentor:</b> Vassil Vassilev, Richard Smith</p>
+
+ <p><b>Desirable skills:</b>
+ Good knowledge of clang API, clang's AST, intermediate knowledge of C++.
+ </p>
+</div>
+
+
<!-- *********************************************************************** -->
<div class="www_sectiontitle">
More information about the llvm-commits
mailing list