[LLVMbugs] [Bug 19629] New: failing to substitute into lambda-expression in initializer of a variable template

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 1 16:18:19 PDT 2014


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

            Bug ID: 19629
           Summary: failing to substitute into lambda-expression in
                    initializer of a variable template
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++1y
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This code:

  template<typename T> int var = [] {
    struct S { int f() { return T(); } };
    return S().f();
  } ();
  int k = var<int>;

crashes in IR gen, because we reused the LambdaExpr from the template
definition in the initializer of the template specialization.

Not clear whether we're not transforming it at all, or whether TreeTransform
somehow believes it can reuse the LambdaExpr.

-- 
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/20140501/6fc0ef1b/attachment.html>


More information about the llvm-bugs mailing list