[PATCH] D73271: [clang][CodeComplete] Support for designated initializers
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 23 07:07:16 PST 2020
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Nit: maybe mention "top-level" in the patch?
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:4731
+static RecordDecl *getAsRecordDecl(const QualType BaseType) {
+ if (const RecordType *Record = BaseType->getAs<RecordType>())
----------------
this needs a name and/or comment to describe how it falls back to the primary template if the decl for the specialization isn't known.
(From the name, you can't tel how it's different from Type::getRecordDecl)
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:4735
+
+ if (const auto *ICNT = BaseType->getAs<InjectedClassNameType>())
+ return ICNT->getDecl();
----------------
this is handled by BaseType->getAsRecordDecl()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73271/new/
https://reviews.llvm.org/D73271
More information about the cfe-commits
mailing list