[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 02:18:49 PST 2018


ilya-biryukov added inline comments.


================
Comment at: lib/Parse/ParseExprCXX.cpp:248
       // seen a leading '::' or part of a nested-name-specifier.
+      ParsedType ObjectTypeForCompletion = ObjectType;
       ObjectType = nullptr;
----------------
kadircet wrote:
> What about first checking for whether we are on code completion point and then assigning nullptr to objecttype?
> 
> Also it is not in the scope of this patch but I was wondering why we only trigger completion if we've seen a scope specifier, do you have any idea?
Done. This got me thinking that we probably won't pass the object type on more than 1 qualifiers, e.g. `X().Foo::Bar::baz().`  I'll test and address this in a separate patch, though.

> Also it is not in the scope of this patch but I was wondering why we only trigger completion if we've seen a scope specifier, do you have any idea?
I haven't looked closely into the code, but I suspect other cases are handled elsewhere, e.g. the case with no qualifiers is handled when parsing member expressions, etc.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55124/new/

https://reviews.llvm.org/D55124





More information about the cfe-commits mailing list