forked from OSchip/llvm-project
[clangd] Handle the missing injectedClassNameType in targetDecl.
Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73102
This commit is contained in:
parent
3593b5b3e9
commit
5d4e899757
|
@ -374,6 +374,11 @@ public:
|
|||
void VisitTagType(const TagType *TT) {
|
||||
Outer.add(TT->getAsTagDecl(), Flags);
|
||||
}
|
||||
|
||||
void VisitInjectedClassNameType(const InjectedClassNameType *ICNT) {
|
||||
Outer.add(ICNT->getDecl(), Flags);
|
||||
}
|
||||
|
||||
void VisitDecltypeType(const DecltypeType *DTT) {
|
||||
Outer.add(DTT->getUnderlyingType(), Flags | Rel::Underlying);
|
||||
}
|
||||
|
|
|
@ -286,6 +286,14 @@ TEST_F(TargetDeclTest, Types) {
|
|||
)cpp";
|
||||
// FIXME: We don't do a good job printing TemplateTypeParmDecls, apparently!
|
||||
EXPECT_DECLS("SizeOfPackExpr", "");
|
||||
|
||||
Code = R"cpp(
|
||||
template <typename T>
|
||||
class Foo {
|
||||
void f([[Foo]] x);
|
||||
};
|
||||
)cpp";
|
||||
EXPECT_DECLS("InjectedClassNameTypeLoc", "class Foo");
|
||||
}
|
||||
|
||||
TEST_F(TargetDeclTest, ClassTemplate) {
|
||||
|
|
Loading…
Reference in New Issue