[LLVMbugs] [Bug 12810] New: Error recovery can trigger Assertion `Chunk.Kind == DeclaratorChunk::Function'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 13 18:54:39 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12810

             Bug #: 12810
           Summary: Error recovery can trigger Assertion `Chunk.Kind ==
                    DeclaratorChunk::Function'
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hfinkel at anl.gov
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8543
  --> http://llvm.org/bugs/attachment.cgi?id=8543
reduced test case (provided by Craig Schroeder)

Running clang trunk on:

template<typename T> struct s{}; template<typename T> s<T> f(T (x)() const) {}

results in:

t5.cpp:1:70: error: non-member function cannot have 'const' qualifier
template<typename T> struct s{}; template<typename T> s<T> f(T (x)() const) {}
                                                                     ^~~~~
clang: /src/llvm-trunk-writable/tools/clang/lib/Sema/SemaType.cpp:3119:
void<unnamed>::DeclaratorLocFiller::VisitFunctionTypeLoc(clang::FunctionTypeLoc):
Assertion `Chunk.Kind == DeclaratorChunk::Function' failed.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list