CodeGen: Properly null-check typeid expressions
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 18 Jul 2014 19:53:17 +0000 (19:53 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 18 Jul 2014 19:53:17 +0000 (19:53 +0000)
commit5999ae2dc251999e11401e79d062c9962d2869ef
tree3d7e531633497d4aa7323296ce66335dc1efcd3e
parentf123d90865ba7ce63af433cfe932d4a5dda0cb26
CodeGen: Properly null-check typeid expressions

Summary:
Thoroughly check for a pointer dereference which yields a glvalue.  Look
through casts, comma operators, conditional operators, paren
expressions, etc.

Reviewers: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213401 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprCXX.cpp
test/CodeGenCXX/typeid-should-throw.cpp [new file with mode: 0644]