<div dir="ltr">Hello Ray,<div><br></div><div>Thanks for the report. Yeah, it is an issue of "SkipFunctionBody" when building the AST (in your "fooc" case, we need to see the function body before using it), I have sent out a fix <a href="https://reviews.llvm.org/D46684">https://reviews.llvm.org/D46684</a>.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 10, 2018 at 12:25 AM, Raymond Glover via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hello,<br><br></div>I have recently started clangd and had immediate success. However my project has a dependency which makes good use of c++14 return type deduction for functions, which when used create errors that prevent me from using the "go to definition" feature in my IDE. Here is a minimal example containing two files:<br><br></div>-- main.cpp --<br><br>#include "util.h"<br><br>template <typename T><br>auto fooa(T a) { return a; }<br><br>int main() {<br> fooa(0); // ok<br> foob(0); // ok<br> fooc(0); // error: function 'fooc<int>' with deduced<br> // return type cannot be used before<br> // it is defined<br> return 0;<br>}<br><br>-- util.h -- <br><br>template <typename T><br>auto foob(T a) -> decltype(a) { return a; }<br><br>template <typename T><br>auto fooc(T a) { return a; }<br><br></div>--<br><br></div>Is this a known limitation, or a bad configuration on my part? I'm using a packaged version of clang-tools referencing svn331828.<br><br></div>Ray<br></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>