[cfe-commits] [libcxxabi] r164833 - /libcxxabi/trunk/src/private_typeinfo.cpp

Howard Hinnant hhinnant at apple.com
Fri Sep 28 10:58:48 PDT 2012


Author: hhinnant
Date: Fri Sep 28 12:58:48 2012
New Revision: 164833

URL: http://llvm.org/viewvc/llvm-project?rev=164833&view=rev
Log:
Improve the diagnostic messages on dynamic_cast.

Modified:
    libcxxabi/trunk/src/private_typeinfo.cpp

Modified: libcxxabi/trunk/src/private_typeinfo.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/private_typeinfo.cpp?rev=164833&r1=164832&r2=164833&view=diff
==============================================================================
--- libcxxabi/trunk/src/private_typeinfo.cpp (original)
+++ libcxxabi/trunk/src/private_typeinfo.cpp Fri Sep 28 12:58:48 2012
@@ -448,9 +448,9 @@
         {
             // We get here only if there is some kind of visibility problem
             //   in client code.
-            syslog(LOG_ERR, "dynamic_cast error 1: There is a hidden visibility "
-                    "problem associated with the type_info's of %s" 
-                    " and/or %s.\n", static_type->name(), dynamic_type->name());
+            syslog(LOG_ERR, "dynamic_cast error 1: Both of the following type_info's "
+                    "should have public visibility.  At least of of them is hidden. %s" 
+                    ", %s.\n", static_type->name(), dynamic_type->name());
             info.path_dst_ptr_to_static_ptr = public_path;
         }
 #endif  // __APPLE__
@@ -468,9 +468,9 @@
        if (info.path_dst_ptr_to_static_ptr == unknown &&
             info.path_dynamic_ptr_to_static_ptr == unknown)
         {
-            syslog(LOG_ERR, "dynamic_cast error 2: There is a hidden visibility "
-                    "problem associated with the type_info's of %s" 
-                    " and/or %s and/or %s.\n", static_type->name(), dynamic_type->name(),
+            syslog(LOG_ERR, "dynamic_cast error 2: One or more of the following type_info's "
+                            " has hidden visibility.  They should all have public visibility.  "
+                            " %s, %s, %s.\n", static_type->name(), dynamic_type->name(),
                     dst_type->name());
         }
 #endif  // __APPLE__





More information about the cfe-commits mailing list