Hi Mike, Not sure if this has been reviewed but it looks good to me. I can't comment on how the Decayed enum is supposed to be handled but I don't see any harm in what you have done.
Thanks, Matt On 2013-07-31, at 2:51 PM, Michael Sartain <[email protected]> wrote: > This patch cleans up ~22 warnings that have recently crept in. > > I think it's all pretty straightforward except perhaps the > clang::Type::Decayed ones. Is this something that the functions in > ClangASTType.cpp should handle instead of bailing like they're currently > doing? > > In any case, please let me know if this is ok to submit. Thanks. > -Mike > > diff -r 9b6cc65368fe source/DataFormatters/FormatManager.cpp > --- a/source/DataFormatters/FormatManager.cpp Tue Jul 30 16:39:10 2013 -0700 > +++ b/source/DataFormatters/FormatManager.cpp Wed Jul 31 11:47:06 2013 -0700 > @@ -351,7 +351,7 @@ > { > log->Printf("[FormatManager::GetSummaryFormat] Cache search > success. Returning."); > if (log->GetDebug()) > - log->Printf("[FormatManager::GetSummaryFormat] Cache > hits: %llu - Cache Misses: %llu", m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > + log->Printf("[FormatManager::GetSummaryFormat] Cache > hits: %" PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > } > return retval; > } > @@ -366,7 +366,7 @@ > m_format_cache.SetSummary(valobj_type,retval); > } > if (log && log->GetDebug()) > - log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %llu - > Cache Misses: %llu", m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > + log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %" PRIu64 > " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > return retval; > } > > @@ -388,7 +388,7 @@ > { > log->Printf("[FormatManager::GetSyntheticChildren] Cache > search success. Returning."); > if (log->GetDebug()) > - log->Printf("[FormatManager::GetSyntheticChildren] Cache > hits: %llu - Cache Misses: %llu", m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > + log->Printf("[FormatManager::GetSyntheticChildren] Cache > hits: %" PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > } > return retval; > } > @@ -403,7 +403,7 @@ > m_format_cache.SetSynthetic(valobj_type,retval); > } > if (log && log->GetDebug()) > - log->Printf("[FormatManager::GetSyntheticChildren] Cache hits: %llu > - Cache Misses: %llu", m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > + log->Printf("[FormatManager::GetSyntheticChildren] Cache hits: %" > PRIu64 " - Cache Misses: %" PRIu64, m_format_cache.GetCacheHits(), > m_format_cache.GetCacheMisses()); > return retval; > } > #endif > diff -r 9b6cc65368fe source/Expression/ClangExpressionDeclMap.cpp > --- a/source/Expression/ClangExpressionDeclMap.cpp Tue Jul 30 16:39:10 > 2013 -0700 > +++ b/source/Expression/ClangExpressionDeclMap.cpp Wed Jul 31 11:47:06 > 2013 -0700 > @@ -1482,7 +1482,7 @@ > var->CalculateSymbolContext(&var_sc); > > if (!var_sc.module_sp) > - return NULL; > + return false; > > Address so_addr(var_location.GetScalar().ULongLong(), > var_sc.module_sp->GetSectionList()); > > diff -r 9b6cc65368fe source/Expression/IRExecutionUnit.cpp > --- a/source/Expression/IRExecutionUnit.cpp Tue Jul 30 16:39:10 2013 -0700 > +++ b/source/Expression/IRExecutionUnit.cpp Wed Jul 31 11:47:06 2013 -0700 > @@ -580,8 +580,8 @@ > { > log->Printf("IRExecutionUnit::GetRemoteAddressForLocal() > found 0x%" PRIx64 " in [0x%" PRIx64 "..0x%" PRIx64 "], and returned 0x%" > PRIx64 " from [0x%" PRIx64 "..0x%" PRIx64 "].", > local_address, > - (unsigned long long)record.m_host_address, > - (unsigned long long)record.m_host_address + > (unsigned long long)record.m_size, > + (uint64_t)record.m_host_address, > + (uint64_t)record.m_host_address + > (uint64_t)record.m_size, > ret, > record.m_process_address, > record.m_process_address + record.m_size); > diff -r 9b6cc65368fe source/Symbol/ClangASTType.cpp > --- a/source/Symbol/ClangASTType.cpp Tue Jul 30 16:39:10 2013 -0700 > +++ b/source/Symbol/ClangASTType.cpp Wed Jul 31 11:47:06 2013 -0700 > @@ -1428,6 +1428,9 @@ > case clang::Type::Decltype: break; > case clang::Type::TemplateSpecialization: break; > case clang::Type::Atomic: break; > + > + // pointer type decayed from an array or function type. > + case clang::Type::Decayed: break; > } > // We don't know hot to display this type... > return lldb::eTypeClassOther; > @@ -1865,7 +1868,10 @@ > case clang::Type::TemplateSpecialization: > case clang::Type::Atomic: > break; > - > + > + // pointer type decayed from an array or function type. > + case clang::Type::Decayed: > + break; > } > count = 0; > return lldb::eEncodingInvalid; > @@ -1994,6 +2000,10 @@ > case clang::Type::TemplateSpecialization: > case clang::Type::Atomic: > break; > + > + // pointer type decayed from an array or function type. > + case clang::Type::Decayed: > + break; > } > // We don't know hot to display this type... > return lldb::eFormatBytes; > @@ -5161,6 +5171,9 @@ > case clang::Type::InjectedClassName: break; > case clang::Type::DependentName: break; > case clang::Type::Atomic: break; > + > + // pointer type decayed from an array or function type. > + case clang::Type::Decayed: break; > } > // No DeclContext in this type... > return NULL; > diff -r 9b6cc65368fe source/Target/ThreadPlan.cpp > --- a/source/Target/ThreadPlan.cpp Tue Jul 30 16:39:10 2013 -0700 > +++ b/source/Target/ThreadPlan.cpp Wed Jul 31 11:47:06 2013 -0700 > @@ -239,14 +239,14 @@ > ThreadPlanNull::ValidatePlan (Stream *error) > { > #ifdef LLDB_CONFIGURATION_DEBUG > - fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%llx, ptid = 0x%llx)", > + fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > #else > Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); > if (log) > - log->Error("%s called on thread that has been destroyed (tid = > 0x%llx, ptid = 0x%llx)", > + log->Error("%s called on thread that has been destroyed (tid = 0x%" > PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > @@ -258,14 +258,14 @@ > ThreadPlanNull::ShouldStop (Event *event_ptr) > { > #ifdef LLDB_CONFIGURATION_DEBUG > - fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%llx, ptid = 0x%llx)", > + fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > #else > Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); > if (log) > - log->Error("%s called on thread that has been destroyed (tid = > 0x%llx, ptid = 0x%llx)", > + log->Error("%s called on thread that has been destroyed (tid = 0x%" > PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > @@ -277,14 +277,14 @@ > ThreadPlanNull::WillStop () > { > #ifdef LLDB_CONFIGURATION_DEBUG > - fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%llx, ptid = 0x%llx)", > + fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > #else > Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); > if (log) > - log->Error("%s called on thread that has been destroyed (tid = > 0x%llx, ptid = 0x%llx)", > + log->Error("%s called on thread that has been destroyed (tid = 0x%" > PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > @@ -296,14 +296,14 @@ > ThreadPlanNull::DoPlanExplainsStop (Event *event_ptr) > { > #ifdef LLDB_CONFIGURATION_DEBUG > - fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%llx, ptid = 0x%llx)", > + fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > #else > Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); > if (log) > - log->Error("%s called on thread that has been destroyed (tid = > 0x%llx, ptid = 0x%llx)", > + log->Error("%s called on thread that has been destroyed (tid = 0x%" > PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > @@ -317,14 +317,14 @@ > { > // The null plan is never done. > #ifdef LLDB_CONFIGURATION_DEBUG > - fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%llx, ptid = 0x%llx)", > + fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > #else > Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); > if (log) > - log->Error("%s called on thread that has been destroyed (tid = > 0x%llx, ptid = 0x%llx)", > + log->Error("%s called on thread that has been destroyed (tid = 0x%" > PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > @@ -337,14 +337,14 @@ > { > // Not sure what to return here. This is a dead thread. > #ifdef LLDB_CONFIGURATION_DEBUG > - fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%llx, ptid = 0x%llx)", > + fprintf(stderr, "error: %s called on thread that has been destroyed (tid > = 0x%" PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > #else > Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); > if (log) > - log->Error("%s called on thread that has been destroyed (tid = > 0x%llx, ptid = 0x%llx)", > + log->Error("%s called on thread that has been destroyed (tid = 0x%" > PRIx64 ", ptid = 0x%" PRIx64 ")", > __PRETTY_FUNCTION__, > m_thread.GetID(), > m_thread.GetProtocolID()); > > _______________________________________________ > lldb-dev mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev _______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
