]> granicus.if.org Git - clang/commit
Don't crash when passing &@selector to a _Nonnull parameter. Fixes PR24774.
authorNico Weber <nicolasweber@gmx.de>
Tue, 15 Sep 2015 23:17:17 +0000 (23:17 +0000)
committerNico Weber <nicolasweber@gmx.de>
Tue, 15 Sep 2015 23:17:17 +0000 (23:17 +0000)
commit777282e377d14a83068d349ee60a60f91e5956e5
tree250d77936e8592647b22c75525d63a8999b2bc44
parent456f4accdf36f689b7faed5c7a1c40f8d4931037
Don't crash when passing &@selector to a _Nonnull parameter. Fixes PR24774.

The root cause here is that ObjCSelectorExpr is an rvalue, yet it can have its
address taken.  That's kind of awkward, but fixing this is awkward in other
ways, see https://llvm.org/bugs/show_bug.cgi?id=24774#c16 .  For now, just
fix the crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247740 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
test/SemaObjCXX/sel-address.mm