]> granicus.if.org Git - clang/commitdiff
Fix one last gotcha with typeid.
authorMike Stump <mrs@apple.com>
Wed, 18 Nov 2009 00:40:12 +0000 (00:40 +0000)
committerMike Stump <mrs@apple.com>
Wed, 18 Nov 2009 00:40:12 +0000 (00:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89172 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprAgg.cpp
test/CodeGenCXX/rtti.cpp

index 901f867a5913f2d5585a8e5aca4644718b9c93c5..0e10368ab04e7720996ef5e3a1967263a6c839ee 100644 (file)
@@ -114,6 +114,7 @@ public:
   void VisitCXXConstructExpr(const CXXConstructExpr *E);
   void VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E);
   void VisitCXXZeroInitValueExpr(CXXZeroInitValueExpr *E);
+  void VisitCXXTypeidExpr(CXXTypeidExpr *E) { EmitAggLoadOfLValue(E); }
 
   void VisitVAArgExpr(VAArgExpr *E);
 
index aea85a33b48995c43623d8c7a58e460df53e892d..b64071c65f72ec7bf991d0ba71647bc0572b631a 100644 (file)
@@ -193,3 +193,7 @@ int test3() {
   if (typeid(int[5]) == typeid(enum a))
     return 0;
 }
+
+bool test4(std::type_info* __pointee) {
+  return *__pointee == typeid (void);
+}