[LLVMbugs] [Bug 18674] New: Assertion failed: ParseAssignmentExpression went over the default arg tokens
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Thu Jan 30 08:41:58 PST 2014
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=18674
            Bug ID: 18674
           Summary: Assertion failed: ParseAssignmentExpression went over
                    the default arg tokens
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pipping at exherbo.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified
The following piece of code is invalid in two ways: It tries to access [0] for
an int, and it lacks the ';' after return in a lambda.
This combination yields
  clang: ParseCXXInlineMethods.cpp:368: void
clang::Parser::ParseLexedMethodDeclaration(clang::Parser::LateParsedMethodDeclaration&):
Assertion `!PP.getSourceManager().isBeforeInTranslationUnit(origLoc,
Tok.getLocation()) && "ParseAssignmentExpression went over the default arg
tokens!"' failed.
for me. Here's the code:
<< SNIP
struct A {
  using T = int;
  void f(int (*f)(T) = [](T x) { return -x[0] });
};
<< SNAP
-- 
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/20140130/cbb66548/attachment.html>
    
    
More information about the llvm-bugs
mailing list