[llvm-bugs] [Bug 21849] [fuzz] Assertion `!PP.getSourceManager().isBeforeInTranslationUnit(origLoc, Tok.getLocation()) && "ParseFunctionTryBlock went over the cached tokens!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 21 16:03:37 PDT 2016


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

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rnk at google.com
         Resolution|---                         |FIXED

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
Doesn't crash:

$ clang -cc1 -std=c++11 -emit-llvm-only
~/Downloads/parse-function-try-block.cpp
C:/Users/rnk/Downloads/parse-function-try-block.cpp:2:3: error: C++ requires a
type specifier for all declarations
  x() try {
  ^
C:/Users/rnk/Downloads/parse-function-try-block.cpp:3:14: error: unknown type
name 'x'
    } catch (x x x
             ^
C:/Users/rnk/Downloads/parse-function-try-block.cpp:3:18: error: expected ')'
    } catch (x x x
                 ^
C:/Users/rnk/Downloads/parse-function-try-block.cpp:3:13: note: to match this
'('
    } catch (x x x
            ^
C:/Users/rnk/Downloads/parse-function-try-block.cpp:5:6: error: expected ';'
after struct
    }
     ^
     ;
C:/Users/rnk/Downloads/parse-function-try-block.cpp:2:3: error: functions
cannot be declared in an anonymous struct
  x() try {
  ^
C:/Users/rnk/Downloads/parse-function-try-block.cpp:1:1: error: anonymous
structs and classes must be class members
struct {
^
C:/Users/rnk/Downloads/parse-function-try-block.cpp:6:8: error: expected
unqualified-id
    int
       ^
7 errors generated.

-- 
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/20161021/cd6b135e/attachment.html>


More information about the llvm-bugs mailing list