[PATCH] D47260: Testcase for dwarf 5 crash/assert when calculating a checksum for an expansion

Tom Rix via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 07:38:11 PDT 2018


trixirt created this revision.
trixirt added a reviewer: probinson.
Herald added subscribers: cfe-commits, JDevlieghere, aprantl.

Test is a reduction from running csmith with -gdwarf-5
The checksums are required for all 'files'.
The clang source manager does not provide them for expansions.


Repository:
  rC Clang

https://reviews.llvm.org/D47260

Files:
  test/CodeGen/2018-05-20-ExpansionChecksum.c


Index: test/CodeGen/2018-05-20-ExpansionChecksum.c
===================================================================
--- /dev/null
+++ test/CodeGen/2018-05-20-ExpansionChecksum.c
@@ -0,0 +1,10 @@
+// RUN: %clang -c -gdwarf-5 %s  -o /dev/null
+// Don't crash calculating the checksum of string.h
+#if __has_include("/usr/include/string.h")
+#define __NTH fct
+void fn1() {}
+# 7 "/usr/include/string.h"
+#if 8
+void __NTH() {}
+#endif
+#endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47260.148212.patch
Type: text/x-patch
Size: 444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180523/2f9541c6/attachment-0001.bin>


More information about the cfe-commits mailing list