[Lldb-commits] [lldb] r219865 - Give user_id a default invalid value so we don't

Jason Molenda jmolenda at apple.com
Wed Oct 15 16:27:12 PDT 2014


Author: jmolenda
Date: Wed Oct 15 18:27:12 2014
New Revision: 219865

URL: http://llvm.org/viewvc/llvm-project?rev=219865&view=rev
Log:
Give user_id a default invalid value so we don't
possibly use it uninitialized in a log message later.
clang static analyzer fixit.

Modified:
    lldb/trunk/source/Symbol/ClangASTImporter.cpp

Modified: lldb/trunk/source/Symbol/ClangASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTImporter.cpp?rev=219865&r1=219864&r2=219865&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTImporter.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTImporter.cpp Wed Oct 15 18:27:12 2014
@@ -86,7 +86,7 @@ ClangASTImporter::CopyDecl (clang::ASTCo
 
             if (log)
             {
-                lldb::user_id_t user_id;
+                lldb::user_id_t user_id = LLDB_INVALID_UID;
                 ClangASTMetadata *metadata = GetDeclMetadata(decl);
                 if (metadata)
                     user_id = metadata->GetUserID();





More information about the lldb-commits mailing list