[LLVMbugs] [Bug 23101] New: Clang crash with -Wdocumentation during delayed typo correction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 1 13:05:59 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23101

            Bug ID: 23101
           Summary: Clang crash with -Wdocumentation during delayed typo
                    correction
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Yunzhong_Gao at playstation.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150401/fe30e655/attachment.html>


More information about the llvm-bugs mailing list