<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 --- - Clang crash with -Wdocumentation during delayed typo correction"
   href="https://llvm.org/bugs/show_bug.cgi?id=23101">23101</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang crash with -Wdocumentation during delayed typo correction
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Yunzhong_Gao@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,
The following buggy test causes clang to crash with -Wdocumentation. could
someone take a look?

// bug.c
//typedef long long __v2di __attribute__ ((__vector_size__ (16))); // missing
typedef typedef long long __m128i __attribute__((__vector_size__(16)));

/// \param __xx
///    yes, this is a typo
int test(__m128i __x)
{
  return foo((__v2di)__x);
}
// end bug.c

$ build/Debug+Asserts/bin/clang -cc1 -Wdocumentation -S -o /dev/null bug.c
bug.c:4:12: warning: parameter '__xx' not found in the function declaration ///
\param __xx
           ^~~~
bug.c:4:12: note: did you mean '__x'?
/// \param __xx
           ^~~~
           __x
bug.c:8:10: warning: implicit declaration of function 'foo' is invalid in C99
  return foo((__v2di)__x);
         ^
bug.c:8:22: error: expected ')'
  return foo((__v2di)__x);
                     ^
bug.c:8:13: note: to match this '('
  return foo((__v2di)__x);
            ^
clang: llvm/tools/clang/lib/Sema/Sema.cpp:273: clang::Sema::~Sema(): Assertion
`DelayedTypos.empty() && "Uncorrected typos!"' failed.
0  clang           0x000000000443ef80
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 44
1  clang           0x000000000443f295
2  clang           0x000000000443dd95
3  libpthread.so.0 0x00007f90c2781340
4  libc.so.6       0x00007f90c19bdf79 gsignal + 57
5  libc.so.6       0x00007f90c19c1388 abort + 328
6  libc.so.6       0x00007f90c19b6e36
7  libc.so.6       0x00007f90c19b6ee2
8  clang           0x00000000019e05d2 clang::Sema::~Sema() + 500
9  clang           0x00000000012e5f84
std::default_delete<clang::Sema>::operator()(clang::Sema*) const + 34
10 clang           0x00000000012ddf2c std::unique_ptr<clang::Sema,
std::default_delete<clang::Sema> >::reset(clang::Sema*) + 80
11 clang           0x00000000012fdb8f
clang::CompilerInstance::setSema(clang::Sema*) + 39
12 clang           0x000000000133c4a3 clang::FrontendAction::EndSourceFile() +
283
13 clang           0x000000000130172c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 784
14 clang           0x00000000012c31eb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 993
15 clang           0x00000000012af2a8 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 770
16 clang           0x00000000012bcab8
17 clang           0x00000000012bd09a main + 1069
18 libc.so.6       0x00007f90c19a8ec5 __libc_start_main + 245
19 clang           0x00000000012ada09
Stack dump:
0.    Program arguments: build/Debug+Asserts/bin/clang -cc1 -Wdocumentation -S
-o /dev/null bug.c 
Aborted (core dumped)

$ build/Debug+Asserts/bin/clang --version clang version 3.7.0 (trunk 233464)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>