[Lldb-commits] [lldb] r219768 - Ensure that m_syntax is initialized in all the FileSpec

Jason Molenda jmolenda at apple.com
Tue Oct 14 20:04:33 PDT 2014


Author: jmolenda
Date: Tue Oct 14 22:04:33 2014
New Revision: 219768

URL: http://llvm.org/viewvc/llvm-project?rev=219768&view=rev
Log:
Ensure that m_syntax is initialized in all the FileSpec
constructors.
clang static analyzer fixit.

Modified:
    lldb/trunk/source/Host/common/FileSpec.cpp

Modified: lldb/trunk/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSpec.cpp?rev=219768&r1=219767&r2=219768&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileSpec.cpp (original)
+++ lldb/trunk/source/Host/common/FileSpec.cpp Tue Oct 14 22:04:33 2014
@@ -167,10 +167,10 @@ FileSpec::Resolve (llvm::SmallVectorImpl
     llvm::sys::fs::make_absolute(path);
 }
 
-FileSpec::FileSpec()
-    : m_directory()
-    , m_filename()
-    , m_syntax(FileSystem::GetNativePathSyntax())
+FileSpec::FileSpec() : 
+    m_directory(), 
+    m_filename(), 
+    m_syntax(FileSystem::GetNativePathSyntax())
 {
 }
 
@@ -181,7 +181,8 @@ FileSpec::FileSpec()
 FileSpec::FileSpec(const char *pathname, bool resolve_path, PathSyntax syntax) :
     m_directory(),
     m_filename(),
-    m_is_resolved(false)
+    m_is_resolved(false),
+    m_syntax(syntax)
 {
     if (pathname && pathname[0])
         SetFile(pathname, resolve_path, syntax);





More information about the lldb-commits mailing list