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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits