Nathan Ridge

Results 1499 comments of Nathan Ridge

> > clang --version > > Apple clang version 11.0.3 (clang-1103.0.32.59) > > I tried Xcode and VSCode to run this code, with clang -std=c++17, and it worked correctly. and...

> > In this case container[i].size() is dependent because (for example) std::vector could be specialized for some T and the specialization could have a completely different declaration of operator[] (which...

(My apologies, I accidentally edited your last comment when I meant to reply to it... I wish GitHub didn't make that so easy to do accidentally. Anyways, I've restored your...

For completeness, I'll mention what I think is a more principled solution to the problem of code completion inside C++ templates: leveraging C++20 Concepts. If a template parameter is constrained...

(Updating title of issue to reflect the second topic (code completion inside templates), as the first topic (related to friend functions) has been addressed and there is nothing to fix...

> Rather, the issue is knowing that the return type of `vector::operator[]` is `T` (or more precisely, `T&`). > > Let's have a look at [libstdc++'s `vector` implementation](https://github.com/gcc-mirror/gcc/blob/e362a897655e3b92949b65a2b53e00fb3ab8ded0/libstdc%2B%2B-v3/include/bits/stl_vector.h), and see...

@fgelm01 code completion for the case you mention is not currently implemented in clangd. We have #451 open for it. > Notice how clangd thinks `front()` returns `C&`. It has...

I glossed over this when I wrote the previous comment, but #451 tracks the equivalent of this for features that use `HeuristicResolver` (mostly go-to-definition), and leveraging this in other features...

Yes, this is definitely doable with some work. The recursive "simplification" logic in your code example is similar to the recursive logic in `HeuristicResolver` which I think we'd want to...

Note that there isn't any problem with modifying SemaCodeComplete.cpp; we've done it before to make code completion enhancement to clangd. (Such modifications also have the side effect of improving code...