[cfe-commits] r145396 - in /cfe/trunk: lib/Frontend/CompilerInvocation.cpp tools/libclang/IndexingContext.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Nov 29 03:31:35 PST 2011


Author: d0k
Date: Tue Nov 29 05:31:35 2011
New Revision: 145396

URL: http://llvm.org/viewvc/llvm-project?rev=145396&view=rev
Log:
Silence GCC warnings, RefCountedBase is meant to be default-initialized here.

Modified:
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/tools/libclang/IndexingContext.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=145396&r1=145395&r2=145396&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Nov 29 05:31:35 2011
@@ -38,7 +38,8 @@
   : LangOpts(new LangOptions()) {}
 
 CompilerInvocationBase::CompilerInvocationBase(const CompilerInvocationBase &X)
-  : LangOpts(new LangOptions(*X.getLangOpts())) {}
+  : llvm::RefCountedBase<CompilerInvocation>(),
+    LangOpts(new LangOptions(*X.getLangOpts())) {}
 
 //===----------------------------------------------------------------------===//
 // Utility functions.

Modified: cfe/trunk/tools/libclang/IndexingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/IndexingContext.cpp?rev=145396&r1=145395&r2=145396&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/IndexingContext.cpp (original)
+++ cfe/trunk/tools/libclang/IndexingContext.cpp Tue Nov 29 05:31:35 2011
@@ -545,7 +545,6 @@
 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);





More information about the cfe-commits mailing list