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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to