summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
-rw-r--r--clang/tools/libclang/IndexingContext.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index a6879379a21..4977b4f30ae 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/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/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp
index 07c3b4dfb27..b5da6461bce 100644
--- a/clang/tools/libclang/IndexingContext.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud