[Lldb-commits] [lldb] r220017 - Put #if 0 blocks around three sections of code that are intentionally

Jason Molenda jmolenda at apple.com
Thu Oct 16 18:36:20 PDT 2014


Author: jmolenda
Date: Thu Oct 16 20:36:20 2014
New Revision: 220017

URL: http://llvm.org/viewvc/llvm-project?rev=220017&view=rev
Log:
Put #if 0 blocks around three sections of code that are intentionally
unreachable so we don't get warnings about them.

Completely initialize a structure instead of leaving some of its fields
potentially indeterminate (although in reality they would all be set 
before use -- but the compiler warning doesn't know that).

clang warning.

Modified:
    lldb/trunk/source/Core/FastDemangle.cpp

Modified: lldb/trunk/source/Core/FastDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FastDemangle.cpp?rev=220017&r1=220016&r2=220017&view=diff
==============================================================================
--- lldb/trunk/source/Core/FastDemangle.cpp (original)
+++ lldb/trunk/source/Core/FastDemangle.cpp Thu Oct 16 20:36:20 2014
@@ -1010,6 +1010,7 @@ private:
         // This makes substitution et al ... interesting.
         return false;
 
+#if 0 // TODO
         if (*m_read_ptr == 'Y')
             ++m_read_ptr;
 
@@ -1071,6 +1072,7 @@ private:
             ReorderRange (EndRange (qualifier_start_cookie), insert_cookie);
         }
         return true;
+#endif // TODO 
     }
 
     // <array-type> ::= A <positive dimension number> _ <element type>
@@ -1091,6 +1093,7 @@ private:
 
         return false;
 
+#if 0 // TODO
         if (*m_read_ptr == '_')
         {
             ++m_read_ptr;
@@ -1137,6 +1140,7 @@ private:
             Write(']');
             return true;
         }
+#endif // TODO
     }
 
     // <pointer-to-member-type> ::= M <class type> <member type>
@@ -1721,11 +1725,13 @@ private:
         //TODO: grammar for all of this seems unclear...
         return false;
 
+#if 0  // TODO
         if (*m_read_ptr == 'g' && *(m_read_ptr + 1) == 's')
         {
             m_read_ptr += 2;
             WriteNamespaceSeparator();
         }
+#endif // TODO
     }
 
     // <expression> ::= <unary operator-name> <expression>
@@ -2063,7 +2069,7 @@ private:
     ParseName(bool parse_function_params = false,
                    bool parse_discriminator = false)
     {
-        NameState name_state = { parse_function_params };
+        NameState name_state = { parse_function_params, false, false, {0, 0}};
         int name_start_cookie = GetStartCookie();
 
         switch (*m_read_ptr)





More information about the lldb-commits mailing list