]> granicus.if.org Git - clang/commit
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)
commit26f6c2fd8a9d945be7d8f14e26ca0092abcc5ac3
tree5aaf6d05c0e808fed831ec3c33c2fa6d72e73792
parent87f6500b32c60af0cd0df453ead0ad8a884ece09
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260675 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
test/SemaCXX/constant-expression-cxx11.cpp