aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-11-29 11:31:35 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-11-29 11:31:35 +0000
commit85224ae68ab9c9df5dd8410a1b7188b4d64f889e (patch)
treedcc06cb35e82510b07bb710f018b635eab89e473
parent6e1fd33116c2977174f2df17ac8bad2a32659db8 (diff)
Silence GCC warnings, RefCountedBase is meant to be default-initialized here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145396 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Frontend/CompilerInvocation.cpp3
-rw-r--r--tools/libclang/IndexingContext.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index a6879379a2..4977b4f30a 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -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.
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp
index 07c3b4dfb2..b5da6461bc 100644
--- a/tools/libclang/IndexingContext.cpp
+++ b/tools/libclang/IndexingContext.cpp
@@ -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);