[LLVMbugs] [Bug 21332] New: failing to instantiate all of a local class (DR1484) when instantiating the surrounding function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 21 16:17:42 PDT 2014


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

            Bug ID: 21332
           Summary: failing to instantiate all of a local class (DR1484)
                    when instantiating the surrounding function
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Consider:

template<typename T> void f() {
  struct S { void g(int n = T::error) noexcept(T::error); };
}
template void f<int>();

We should reject this, because instantiating a function is supposed to
instantiate everything within the function, even pieces of a local class.

(Incidentally, failing to do this can lead to the "decl not instantiated in
this scope" assertion.)

-- 
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/20141021/0da6dfab/attachment.html>


More information about the llvm-bugs mailing list