]> granicus.if.org Git - clang/commitdiff
Silence GCC warnings, RefCountedBase is meant to be default-initialized here.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 29 Nov 2011 11:31:35 +0000 (11:31 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 29 Nov 2011 11:31:35 +0000 (11:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145396 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/CompilerInvocation.cpp
tools/libclang/IndexingContext.cpp

index a6879379a219b2965297e8986564923f8e5ebc70..4977b4f30aece23673353e046eeb98c941db6733 100644 (file)
@@ -38,7 +38,8 @@ CompilerInvocationBase::CompilerInvocationBase()
   : LangOpts(new LangOptions()) {}
 
 CompilerInvocationBase::CompilerInvocationBase(const CompilerInvocationBase &X)
-  : LangOpts(new LangOptions(*X.getLangOpts())) {}
+  : llvm::RefCountedBase<CompilerInvocation>(),
+    LangOpts(new LangOptions(*X.getLangOpts())) {}
 
 //===----------------------------------------------------------------------===//
 // Utility functions.
index 07c3b4dfb27570a49fb1bb0192a39578eb688c7e..b5da6461bce3d455049af5810d2a2132e393f210 100644 (file)
@@ -545,7 +545,6 @@ bool IndexingContext::handleCXXRecordDecl(const CXXRecordDecl *RD,
 bool IndexingContext::markEntityOccurrenceInFile(const NamedDecl *D,
                                                  SourceLocation Loc) {
   SourceManager &SM = Ctx->getSourceManager();
-  SourceLocation FileLoc = SM.getFileLoc(Loc);
   D = getEntityDecl(D);
   
   std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(Loc);