[PATCH] D39730: Enabling constructor code completion
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 10 10:33:18 PST 2017
arphaman added a comment.
It doesn't look like this works in the body of the class (at least there's no test for it). For that you might have to inject these kind results by performing another lookup when completing inside the body of the class.
================
Comment at: lib/Sema/SemaCodeComplete.cpp:980
+ if (isa<CXXConstructorDecl>(R.Declaration)
+ && dyn_cast<NamespaceDecl>(CurContext) == nullptr
+ && dyn_cast<TranslationUnitDecl>(CurContext) == nullptr
----------------
You can use `!isa<T>`
https://reviews.llvm.org/D39730
More information about the cfe-commits
mailing list