<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Typo correction crash with pch file"
href="https://llvm.org/bugs/show_bug.cgi?id=31326">31326</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Typo correction crash with pch file
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Formatter
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>$ cat foo.h
#define __STDC_HOSTED__ "hi"
$ cat foo.c
const char* s = __STDC_HOSTED__;
const char* s = FOO;
$ bin/clang -cc1 -emit-pch -o foo.h.pch foo.h
foo.h:1:9: warning: '__STDC_HOSTED__' macro redefined
#define __STDC_HOSTED__ "hi"
^
<built-in>:307:9: note: previous definition is here
#define __STDC_HOSTED__ 1
^
1 warning generated.
$ bin/clang -cc1 -include-pch foo.h.pch foo.c -emit-llvm -o -
foo.c:2:13: error: redefinition of 's'
const char* s = FOO;
^
foo.c:1:13: note: previous definition is here
const char* s = __STDC_HOSTED__;
^
Assertion failed: (DelayedTypos.empty() && "Uncorrected typos!"), function
~Sema, file /Users/thakis/src/llvm-rw/tools/clang/lib/Sema/Sema.cpp, line 286.
0 clang 0x00000001025587f6 SignalHandler(int) + 406
1 libsystem_platform.dylib 0x00007fff97f7ef1a _sigtramp + 26
Stack dump:
0. Program arguments: bin/clang -cc1 -include-pch foo.h.pch foo.c -emit-llvm
-o -
Abort trap: 6</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>