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)); };
I also added a test for the static function case because i don't think this was tested before.
Differential D16973
Fix ICE with constexpr and friend functions
ogoffart on Feb 7 2016, 11:39 AM. Authored by
Details 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)); }; I also added a test for the static function case because i don't think this was tested before.
Diff Detail Event Timeline |