[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
Thu Oct 10 23:53:05 PDT 2019
plotfi created this revision.
plotfi added a reviewer: compnerd.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D68859
Files:
lib/Frontend/InterfaceStubFunctionsConsumer.cpp
test/InterfaceStubs/noninstancetypes.c
Index: test/InterfaceStubs/noninstancetypes.c
===================================================================
--- test/InterfaceStubs/noninstancetypes.c
+++ 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: lib/Frontend/InterfaceStubFunctionsConsumer.cpp
===================================================================
--- lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ 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.224547.patch
Type: text/x-patch
Size: 1056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191011/606ef594/attachment.bin>
More information about the cfe-commits
mailing list