[PATCH] D68859: Fixing crash in clang IFS for enum, record, and typedef decls.
Puyan Lotfi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 11 10:24:14 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe3388c42f39b: [clang][IFS] Fixing assert in clang interface stubs for enums, records, typedefs (authored by plotfi).
Changed prior to commit:
https://reviews.llvm.org/D68859?vs=224547&id=224629#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68859/new/
https://reviews.llvm.org/D68859
Files:
clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
clang/test/InterfaceStubs/noninstancetypes.c
Index: clang/test/InterfaceStubs/noninstancetypes.c
===================================================================
--- /dev/null
+++ clang/test/InterfaceStubs/noninstancetypes.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -o - -emit-interface-stubs %s | FileCheck %s
+// TODO: Change clang_cc1 to clang when llvm-ifs can accept empty symbol lists.
+
+// CHECK: Symbols:
+// CHECK-NEXT: ...
+
+struct a;
+enum { b };
+typedef int c;
+
Index: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
===================================================================
--- clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -177,6 +177,10 @@
HandleTemplateSpecializations(*cast<FunctionTemplateDecl>(ND), Symbols,
RDO);
return true;
+ case Decl::Kind::Record:
+ case Decl::Kind::Typedef:
+ case Decl::Kind::Enum:
+ case Decl::Kind::EnumConstant:
case Decl::Kind::TemplateTypeParm:
return true;
case Decl::Kind::Var:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68859.224629.patch
Type: text/x-patch
Size: 1057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191011/4dff83b1/attachment.bin>
More information about the cfe-commits
mailing list