[LLVMbugs] [Bug 10785] New: crash on invalid use of variable of type "const T&" where T = an unbound method

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 26 17:00:12 PDT 2011


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

           Summary: crash on invalid use of variable of type "const T&"
                    where T = an unbound method
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


clang++ -fsyntax-only test.cc crashes on this invalid code:

  struct Class {
    void method();
  };
  template<typename T> struct Helper {
    virtual void helper(T x) {
      x;
    }
  };
  struct FunctionLike {
    template<typename T> void operator()(const T&) {
      Helper<const T&> helper;
    }
  };
  void TestBody() {
    Class cls;
    FunctionLike fl;
    fl(cls.method);
  }

with this assertion:

clang: SemaExpr.cpp:9968: clang::ExprResult
clang::Sema::CheckPlaceholderExpr(clang::Expr*): Assertion
`!type->isPlaceholderType()' failed.

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