[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
Wed Dec 4 16:13:43 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG07e445103e36: [clang][IFS] Adding support for new clang interface stubs decl types. (authored by plotfi).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70728/new/
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.232232.patch
Type: text/x-patch
Size: 2985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191205/c77f238a/attachment.bin>
More information about the cfe-commits
mailing list