[LLVMbugs] [Bug 22508] New: Tilde and decltype-specifier cause ICEs and parser failings

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 8 10:26:24 PST 2015


            Bug ID: 22508
           Summary: Tilde and decltype-specifier cause ICEs and parser
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: r.hl at gmx.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

If the id-expression following the tilde inside a class declaration is a valid
decltype-specifier the parser bails out completely: 

struct A 
    ~decltype(auto) void void void { 
        AnyNonsenseInhereIsValid BUAAAHAAHHHHH 
        void return nothing look-a-penny<<@Üü

Moreover, consider what happens if the same thing appears in another valid
context such as

A().~decltype(auto); // ICE, and A can be an empty struct

It seems the parser delegates to the semantic analyzer which fails in

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/20150208/1776eabd/attachment.html>

More information about the llvm-bugs mailing list