Fix ICE with constexpr and friend functions
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 12 Feb 2016 12:34:44 +0000 (12:34 +0000)
committerOlivier Goffart <ogoffart@woboq.com>
Fri, 12 Feb 2016 12:34:44 +0000 (12:34 +0000)
commit8bc0caa2e9494524860f35f37fbfc875ac0c329b
treea4d396d1fc5469ea1b3e4d164a1bca323926fad2
parent867aa20b1ec9833fd510e7990aa7894a995cb414
Fix ICE with constexpr and friend functions

Fix a crash while parsing this code:

  struct X  {
    friend constexpr int foo(X*) { return 12; }
    static constexpr int j = foo(static_cast<X*>(nullptr));
  };

Differential Revision: http://reviews.llvm.org/D16973

llvm-svn: 260675
clang/lib/AST/ExprConstant.cpp
clang/test/SemaCXX/constant-expression-cxx11.cpp