[PATCH] D39224: Moved QualTypeNames.h from Tooling to AST.
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 25 10:08:58 PDT 2017
rnk added a comment.
In https://reviews.llvm.org/D39224#906225, @ilya-biryukov wrote:
> In https://reviews.llvm.org/D39224#905431, @rnk wrote:
>
> > Can you remind me why `NamedDecl::printQualifiedName` is not appropriate for your needs?
>
>
> The use-case in code completion (see https://reviews.llvm.org/D38538, the interesting bit is in `SemaCodeComplete.cpp`) creates a `QualType` that is being pretty-printed later on.
> There does not seem to be a way to rewrite it to use `printQualifiedName`for that particular case without messing up the code. I was initially planning to simply create `ElaborateType` with proper `NestedNameSpecifier`, but that's essentially what the code in `QualTypeNames` does already (it has logic to create both the `NestedNameSpecifier` and `ElaboratedType` out of it), so we should definitely reuse it.
Got it, thanks. If we're moving this into AST, I suspect ASTContext would be a better home for it. That's where the rest of our random type manipulation code lives, anyway. :)
https://reviews.llvm.org/D39224
More information about the cfe-commits
mailing list