[LLVMbugs] [Bug 9918] New: exception specification for defaulted constructor misses default arguments

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 14 11:38:06 PDT 2011


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

           Summary: exception specification for defaulted constructor
                    misses default arguments
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


clang ToT fails this test:

  struct S {
    S(int a = (throw "eep", 0)) noexcept;
  };
  struct T : S {
    T() = default;
  };
  static_assert(!noexcept(T()), "noexcept(T()) but T() throws");

The implicitly-generated default constructor for T() uses S::S's default
argument, which is not noexcept, but clang doesn't notice that.

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