[LLVMbugs] [Bug 14457] New: Vararg operator, crashes clang

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 29 13:44:46 PST 2012


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

             Bug #: 14457
           Summary: Vararg operator, crashes clang
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


struct StaticAsserter {
  friend void operator,(StaticAsserter, void*);
private:
  friend void operator,(StaticAsserter, ...);
};

const char *static_assert_failed = (StaticAsserter(), 1 == 1, "hello");

... triggers this:

clang-3.2: src/tools/clang/include/clang/AST/Decl.h:1814: clang::ParmVarDecl
*clang::FunctionDecl::getParamDecl(unsigned int): Assertion `i < getNumParams()
&& "Illegal param #"' failed.

We should have rejected the declaration of that operator,.

-- 
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