arphaman added a comment.

Also,



================
Comment at: lib/Sema/SemaCodeComplete.cpp:980
+  if (isa<CXXConstructorDecl>(R.Declaration)
+      && dyn_cast<NamespaceDecl>(CurContext) == nullptr
+      && dyn_cast<TranslationUnitDecl>(CurContext) == nullptr
----------------
arphaman wrote:
> You can use `!isa<T>`
Have you checked if this check works correctly in cases like this:

```
// main tu
int x = foo::<code-complete>
foo bar;
int x = bar.<code-complete>
```

I suspect the scope will be `TranslationUnitDecl` there as well.



https://reviews.llvm.org/D39730



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

Reply via email to