[PATCH] D70728: [clang][IFS] Adding support for new clang interface stubs decl types.
Puyan Lotfi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 26 10:12:38 PST 2019
plotfi created this revision.
plotfi added a reviewer: compnerd.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Adding support for NamespaceAliasDecl UnresolvedUsingTypenameDecl CXXDeductionGuideDecl ConstructorUsingShadowDecl
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70728
Files:
clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
clang/test/InterfaceStubs/constructor-using-shadow.cpp
clang/test/InterfaceStubs/cxxdeduction-guide.cpp
clang/test/InterfaceStubs/namespace-alias.cpp
clang/test/InterfaceStubs/unresolved-using-typename.cpp
Index: clang/test/InterfaceStubs/unresolved-using-typename.cpp
===================================================================
--- /dev/null
+++ clang/test/InterfaceStubs/unresolved-using-typename.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -o - -emit-interface-stubs %s | FileCheck %s
+
+// CHECK: --- !experimental-ifs-v1
+// CHECK-NEXT: IfsVersion: 1.0
+// CHECK-NEXT: Triple:
+// CHECK-NEXT: ObjectFileFormat: ELF
+// CHECK-NEXT: Symbols:
+// CHECK-NEXT: ...
+
+// UnresolvedUsingTypenameDecl
+template<typename T> class C1 { using ReprType = unsigned; };
+template<typename T> class C2 : public C1<T> { using typename C1<T>::Repr; };
Index: clang/test/InterfaceStubs/namespace-alias.cpp
===================================================================
--- /dev/null
+++ clang/test/InterfaceStubs/namespace-alias.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -o - -emit-interface-stubs %s | FileCheck %s
+
+// CHECK: --- !experimental-ifs-v1
+// CHECK-NEXT: IfsVersion: 1.0
+// CHECK-NEXT: Triple:
+// CHECK-NEXT: ObjectFileFormat: ELF
+// CHECK-NEXT: Symbols:
+// CHECK-NEXT: ...
+
+// NamespaceAliasDecl
+namespace NS { }
+namespace B = NS;
Index: clang/test/InterfaceStubs/cxxdeduction-guide.cpp
===================================================================
--- /dev/null
+++ clang/test/InterfaceStubs/cxxdeduction-guide.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -o - -emit-interface-stubs -std=c++17 %s | FileCheck %s
+
+// CHECK: --- !experimental-ifs-v1
+// CHECK-NEXT: IfsVersion: 1.0
+// CHECK-NEXT: Triple:
+// CHECK-NEXT: ObjectFileFormat: ELF
+// CHECK-NEXT: Symbols:
+// CHECK-NEXT: ...
+
+// CXXDeductionGuideDecl
+template<typename T> struct A { A(); A(T); };
+A() -> A<int>;
Index: clang/test/InterfaceStubs/constructor-using-shadow.cpp
===================================================================
--- /dev/null
+++ clang/test/InterfaceStubs/constructor-using-shadow.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -o - -emit-interface-stubs %s | FileCheck %s
+
+// CHECK: --- !experimental-ifs-v1
+// CHECK-NEXT: IfsVersion: 1.0
+// CHECK-NEXT: Triple:
+// CHECK-NEXT: ObjectFileFormat: ELF
+// CHECK-NEXT: Symbols:
+// CHECK-NEXT: ...
+
+ // ConstructorUsingShadowDecl
+struct Base { Base(int); };
+struct Derived : public Base { using Base::Base; };
Index: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
===================================================================
--- clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -195,6 +195,10 @@
case Decl::Kind::TemplateTemplateParm:
case Decl::Kind::ClassTemplatePartialSpecialization:
case Decl::Kind::IndirectField:
+ case Decl::Kind::ConstructorUsingShadow:
+ case Decl::Kind::CXXDeductionGuide:
+ case Decl::Kind::NamespaceAlias:
+ case Decl::Kind::UnresolvedUsingTypename:
return true;
case Decl::Kind::Var: {
// Bail on any VarDecl that either has no named symbol.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70728.231096.patch
Type: text/x-patch
Size: 2985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191126/70450a4e/attachment-0001.bin>
More information about the cfe-commits
mailing list