summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-07-05 03:08:06 +0000
committerAlp Toker <alp@nuanti.com>2014-07-05 03:08:06 +0000
commitf994cef83693dcd0eb2c0e1c552fbc2a285488cf (patch)
tree1eefedea93e6ee9c4d5f5779e075854710164969
parentedc902f3bb89f7d630cd7527656f96ae224c49ef (diff)
downloadbcm5719-llvm-f994cef83693dcd0eb2c0e1c552fbc2a285488cf.tar.gz
bcm5719-llvm-f994cef83693dcd0eb2c0e1c552fbc2a285488cf.zip
Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212369
-rw-r--r--clang/include/clang/AST/ASTContext.h2
-rw-r--r--clang/include/clang/ASTMatchers/ASTMatchersInternal.h2
-rw-r--r--clang/include/clang/Frontend/CompilerInstance.h8
-rw-r--r--clang/include/clang/Frontend/CompilerInvocation.h8
-rw-r--r--clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h6
-rw-r--r--clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h2
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp14
-rw-r--r--clang/lib/Frontend/ChainedIncludesSource.cpp2
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp2
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
-rw-r--r--clang/lib/Frontend/CreateInvocationFromCommandLine.cpp2
-rw-r--r--clang/lib/Frontend/TextDiagnostic.cpp2
-rw-r--r--clang/lib/Index/SimpleFormatContext.h2
-rw-r--r--clang/lib/Serialization/ASTReader.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp8
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporter.cpp18
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp8
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp8
-rw-r--r--clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp2
-rw-r--r--clang/lib/Tooling/Tooling.cpp4
-rw-r--r--clang/tools/libclang/CIndex.cpp4
-rw-r--r--clang/tools/libclang/Indexing.cpp8
-rw-r--r--clang/unittests/Basic/VirtualFileSystemTest.cpp72
-rw-r--r--clang/unittests/Lex/LexerTest.cpp2
-rw-r--r--clang/unittests/Lex/PPCallbacksTest.cpp6
-rw-r--r--clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp2
-rw-r--r--clang/unittests/Tooling/ToolingTest.cpp4
29 files changed, 103 insertions, 103 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index b0de90c5f69..40ccf8484e0 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -816,7 +816,7 @@ public:
/// \brief Retrieve a pointer to the external AST source associated
/// with this AST context, if any.
ExternalASTSource *getExternalSource() const {
- return ExternalSource.getPtr();
+ return ExternalSource.get();
}
/// \brief Attach an AST mutation listener to the AST context.
diff --git a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
index 7e634e2d63f..12680cfe2cd 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
@@ -250,7 +250,7 @@ public:
uint64_t getID() const {
/// FIXME: Document the requirements this imposes on matcher
/// implementations (no new() implementation_ during a Matches()).
- return reinterpret_cast<uint64_t>(Implementation.getPtr());
+ return reinterpret_cast<uint64_t>(Implementation.get());
}
/// \brief Allows the conversion of a \c Matcher<Type> to a \c
diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h
index e0897265251..44e91026acb 100644
--- a/clang/include/clang/Frontend/CompilerInstance.h
+++ b/clang/include/clang/Frontend/CompilerInstance.h
@@ -360,7 +360,7 @@ public:
}
void resetAndLeakFileManager() {
- BuryPointer(FileMgr.getPtr());
+ BuryPointer(FileMgr.get());
FileMgr.resetWithoutRelease();
}
@@ -380,7 +380,7 @@ public:
}
void resetAndLeakSourceManager() {
- BuryPointer(SourceMgr.getPtr());
+ BuryPointer(SourceMgr.get());
SourceMgr.resetWithoutRelease();
}
@@ -400,7 +400,7 @@ public:
}
void resetAndLeakPreprocessor() {
- BuryPointer(PP.getPtr());
+ BuryPointer(PP.get());
PP.resetWithoutRelease();
}
@@ -419,7 +419,7 @@ public:
}
void resetAndLeakASTContext() {
- BuryPointer(Context.getPtr());
+ BuryPointer(Context.get());
Context.resetWithoutRelease();
}
diff --git a/clang/include/clang/Frontend/CompilerInvocation.h b/clang/include/clang/Frontend/CompilerInvocation.h
index 3d7467cb148..4b3b9be55f5 100644
--- a/clang/include/clang/Frontend/CompilerInvocation.h
+++ b/clang/include/clang/Frontend/CompilerInvocation.h
@@ -74,12 +74,12 @@ public:
CompilerInvocationBase(const CompilerInvocationBase &X);
- LangOptions *getLangOpts() { return LangOpts.getPtr(); }
- const LangOptions *getLangOpts() const { return LangOpts.getPtr(); }
+ LangOptions *getLangOpts() { return LangOpts.get(); }
+ const LangOptions *getLangOpts() const { return LangOpts.get(); }
- TargetOptions &getTargetOpts() { return *TargetOpts.getPtr(); }
+ TargetOptions &getTargetOpts() { return *TargetOpts.get(); }
const TargetOptions &getTargetOpts() const {
- return *TargetOpts.getPtr();
+ return *TargetOpts.get();
}
DiagnosticOptions &getDiagnosticOpts() const { return *DiagnosticOpts; }
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
index 028875d3278..4a5426b2747 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
@@ -56,14 +56,14 @@ public:
CallEventRef(const CallEventRef &Orig) : IntrusiveRefCntPtr<const T>(Orig) {}
CallEventRef<T> cloneWithState(ProgramStateRef State) const {
- return this->getPtr()->template cloneWithState<T>(State);
+ return this->get()->template cloneWithState<T>(State);
}
// Allow implicit conversions to a superclass type, since CallEventRef
// behaves like a pointer-to-const.
template <typename SuperT>
operator CallEventRef<SuperT> () const {
- return this->getPtr();
+ return this->get();
}
};
@@ -1024,7 +1024,7 @@ namespace llvm {
static SimpleType
getSimplifiedValue(clang::ento::CallEventRef<T> Val) {
- return Val.getPtr();
+ return Val.get();
}
};
}
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
index d0a2780d254..98092ef00db 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
@@ -164,7 +164,7 @@ public:
const ProgramStateRef &state,
bool IsSink) {
ID.Add(Loc);
- ID.AddPointer(state.getPtr());
+ ID.AddPointer(state.get());
ID.AddBoolean(IsSink);
}
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 3c2b4235018..055537b46fd 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -247,7 +247,7 @@ ASTUnit::~ASTUnit() {
// perform this operation here because we explicitly request that the
// compiler instance *not* free these buffers for each invocation of the
// parser.
- if (Invocation.getPtr() && OwnsRemappedFileBuffers) {
+ if (Invocation.get() && OwnsRemappedFileBuffers) {
PreprocessorOptions &PPOpts = Invocation->getPreprocessorOpts();
for (PreprocessorOptions::remapped_file_buffer_iterator
FB = PPOpts.remapped_file_buffer_begin(),
@@ -656,7 +656,7 @@ llvm::MemoryBuffer *ASTUnit::getBufferForFile(StringRef Filename,
void ASTUnit::ConfigureDiags(IntrusiveRefCntPtr<DiagnosticsEngine> &Diags,
const char **ArgBegin, const char **ArgEnd,
ASTUnit &AST, bool CaptureDiagnostics) {
- if (!Diags.getPtr()) {
+ if (!Diags.get()) {
// No diagnostics engine was provided, so create our own diagnostics object
// with the default options.
DiagnosticConsumer *Client = nullptr;
@@ -685,7 +685,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
ASTUnitCleanup(AST.get());
llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,
llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >
- DiagCleanup(Diags.getPtr());
+ DiagCleanup(Diags.get());
ConfigureDiags(Diags, nullptr, nullptr, *AST, CaptureDiagnostics);
@@ -1058,7 +1058,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
IntrusiveRefCntPtr<CompilerInvocation>
CCInvocation(new CompilerInvocation(*Invocation));
- Clang->setInvocation(CCInvocation.getPtr());
+ Clang->setInvocation(CCInvocation.get());
OriginalSourceFile = Clang->getFrontendOpts().Inputs[0].getFile();
// Set up diagnostics, capturing any diagnostics that would
@@ -1810,7 +1810,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocationAction(
ASTUnitCleanup(OwnAST.get());
llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,
llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >
- DiagCleanup(Diags.getPtr());
+ DiagCleanup(Diags.get());
// We'll manage file buffers ourselves.
CI->getPreprocessorOpts().RetainRemappedFileBuffers = true;
@@ -1966,7 +1966,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromCompilerInvocation(
ASTUnitCleanup(AST.get());
llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,
llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >
- DiagCleanup(Diags.getPtr());
+ DiagCleanup(Diags.get());
if (AST->LoadFromCompilerInvocation(PrecompilePreamble))
return nullptr;
@@ -1983,7 +1983,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine(
bool AllowPCHWithCompilerErrors, bool SkipFunctionBodies,
bool UserFilesAreVolatile, bool ForSerialization,
std::unique_ptr<ASTUnit> *ErrAST) {
- if (!Diags.getPtr()) {
+ if (!Diags.get()) {
// No diagnostics engine was provided, so create our own diagnostics object
// with the default options.
Diags = CompilerInstance::createDiagnostics(new DiagnosticOptions());
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp
index 6dc3fd450fd..45851a0d60f 100644
--- a/clang/lib/Frontend/ChainedIncludesSource.cpp
+++ b/clang/lib/Frontend/ChainedIncludesSource.cpp
@@ -99,7 +99,7 @@ ChainedIncludesSource::create(CompilerInstance &CI) {
std::unique_ptr<CompilerInstance> Clang(new CompilerInstance());
Clang->setInvocation(CInvok.release());
- Clang->setDiagnostics(Diags.getPtr());
+ Clang->setDiagnostics(Diags.get());
Clang->setTarget(TargetInfo::CreateTargetInfo(Clang->getDiagnostics(),
&Clang->getTargetOpts()));
Clang->createFileManager();
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 60f8ae8fdf0..3b69fa27912 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -336,7 +336,7 @@ void CompilerInstance::createPCHExternalASTSource(
AllowPCHWithCompilerErrors, getPreprocessor(), getASTContext(),
DeserializationListener, OwnDeserializationListener, Preamble,
getFrontendOpts().UseGlobalModuleIndex);
- ModuleManager = static_cast<ASTReader*>(Source.getPtr());
+ ModuleManager = static_cast<ASTReader*>(Source.get());
getASTContext().setExternalSource(Source);
}
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index a5cdb8caae7..d04d8291a48 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2039,7 +2039,7 @@ createVFSFromCompilerInvocation(const CompilerInvocation &CI,
IntrusiveRefCntPtr<vfs::FileSystem> FS =
vfs::getVFSFromYAML(Buffer.release(), /*DiagHandler*/nullptr);
- if (!FS.getPtr()) {
+ if (!FS.get()) {
Diags.Report(diag::err_invalid_vfs_overlay) << File;
return IntrusiveRefCntPtr<vfs::FileSystem>();
}
diff --git a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
index 45f7aa3acde..f2f36e4cacb 100644
--- a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
+++ b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
@@ -32,7 +32,7 @@ using namespace llvm::opt;
CompilerInvocation *
clang::createInvocationFromCommandLine(ArrayRef<const char *> ArgList,
IntrusiveRefCntPtr<DiagnosticsEngine> Diags) {
- if (!Diags.getPtr()) {
+ if (!Diags.get()) {
// No diagnostics engine was provided, so create our own diagnostics object
// with the default options.
Diags = CompilerInstance::createDiagnostics(new DiagnosticOptions);
diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp
index 847acf114e1..dc67d6809eb 100644
--- a/clang/lib/Frontend/TextDiagnostic.cpp
+++ b/clang/lib/Frontend/TextDiagnostic.cpp
@@ -1130,7 +1130,7 @@ void TextDiagnostic::emitSnippetAndCaret(
std::string FixItInsertionLine = buildFixItInsertionLine(LineNo,
sourceColMap,
Hints, SM,
- DiagOpts.getPtr());
+ DiagOpts.get());
// If the source line is too long for our terminal, select only the
// "interesting" source region within that line.
diff --git a/clang/lib/Index/SimpleFormatContext.h b/clang/lib/Index/SimpleFormatContext.h
index de1665f3b63..a460863f803 100644
--- a/clang/lib/Index/SimpleFormatContext.h
+++ b/clang/lib/Index/SimpleFormatContext.h
@@ -37,7 +37,7 @@ public:
SimpleFormatContext(LangOptions Options)
: DiagOpts(new DiagnosticOptions()),
Diagnostics(new DiagnosticsEngine(new DiagnosticIDs,
- DiagOpts.getPtr())),
+ DiagOpts.get())),
Files((FileSystemOptions())),
Sources(*Diagnostics, Files),
Rewrite(Sources, Options) {
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 7f7fc1ce997..f18122dd941 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -378,7 +378,7 @@ bool PCHValidator::ReadDiagnosticOptions(
DiagnosticsEngine &ExistingDiags = PP.getDiagnostics();
IntrusiveRefCntPtr<DiagnosticIDs> DiagIDs(ExistingDiags.getDiagnosticIDs());
IntrusiveRefCntPtr<DiagnosticsEngine> Diags(
- new DiagnosticsEngine(DiagIDs, DiagOpts.getPtr()));
+ new DiagnosticsEngine(DiagIDs, DiagOpts.get()));
// This should never fail, because we would have processed these options
// before writing them to an ASTFile.
ProcessWarningOptions(*Diags, *DiagOpts, /*Report*/false);
diff --git a/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
index efdc213ac82..4ee02230649 100644
--- a/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
@@ -126,7 +126,7 @@ void DereferenceChecker::reportBug(ProgramStateRef State, const Stmt *S,
os << "Array access";
const ArraySubscriptExpr *AE = cast<ArraySubscriptExpr>(S);
AddDerefSource(os, Ranges, AE->getBase()->IgnoreParenCasts(),
- State.getPtr(), N->getLocationContext());
+ State.get(), N->getLocationContext());
os << " results in a null pointer dereference";
break;
}
@@ -134,7 +134,7 @@ void DereferenceChecker::reportBug(ProgramStateRef State, const Stmt *S,
os << "Dereference of null pointer";
const UnaryOperator *U = cast<UnaryOperator>(S);
AddDerefSource(os, Ranges, U->getSubExpr()->IgnoreParens(),
- State.getPtr(), N->getLocationContext(), true);
+ State.get(), N->getLocationContext(), true);
break;
}
case Stmt::MemberExprClass: {
@@ -143,7 +143,7 @@ void DereferenceChecker::reportBug(ProgramStateRef State, const Stmt *S,
os << "Access to field '" << M->getMemberNameInfo()
<< "' results in a dereference of a null pointer";
AddDerefSource(os, Ranges, M->getBase()->IgnoreParenCasts(),
- State.getPtr(), N->getLocationContext(), true);
+ State.get(), N->getLocationContext(), true);
}
break;
}
@@ -152,7 +152,7 @@ void DereferenceChecker::reportBug(ProgramStateRef State, const Stmt *S,
os << "Access to instance variable '" << *IV->getDecl()
<< "' results in a dereference of a null pointer";
AddDerefSource(os, Ranges, IV->getBase()->IgnoreParenCasts(),
- State.getPtr(), N->getLocationContext(), true);
+ State.get(), N->getLocationContext(), true);
break;
}
default:
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index 6c7cb23cf56..141a48ba10b 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -125,7 +125,7 @@ static void removeRedundantMsgs(PathPieces &path) {
break;
if (PathDiagnosticEventPiece *nextEvent =
- dyn_cast<PathDiagnosticEventPiece>(path.front().getPtr())) {
+ dyn_cast<PathDiagnosticEventPiece>(path.front().get())) {
PathDiagnosticEventPiece *event =
cast<PathDiagnosticEventPiece>(piece);
// Check to see if we should keep one of the two pieces. If we
@@ -1412,7 +1412,7 @@ static bool GenerateExtensivePathDiagnostic(PathDiagnostic& PD,
if (Optional<PostStmt> PS = P.getAs<PostStmt>()) {
if (const Expr *Ex = PS->getStmtAs<Expr>())
reversePropagateIntererstingSymbols(*PDB.getBugReport(), IE,
- N->getState().getPtr(), Ex,
+ N->getState().get(), Ex,
N->getLocationContext());
}
@@ -1420,7 +1420,7 @@ static bool GenerateExtensivePathDiagnostic(PathDiagnostic& PD,
const Stmt *S = CE->getCalleeContext()->getCallSite();
if (const Expr *Ex = dyn_cast_or_null<Expr>(S)) {
reversePropagateIntererstingSymbols(*PDB.getBugReport(), IE,
- N->getState().getPtr(), Ex,
+ N->getState().get(), Ex,
N->getLocationContext());
}
@@ -1491,7 +1491,7 @@ static bool GenerateExtensivePathDiagnostic(PathDiagnostic& PD,
const LocationContext *CalleeCtx = PDB.LC;
if (CallerCtx != CalleeCtx) {
reversePropagateInterestingSymbols(*PDB.getBugReport(), IE,
- N->getState().getPtr(),
+ N->getState().get(),
CalleeCtx, CallerCtx);
}
}
@@ -1674,7 +1674,7 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD,
PathDiagnosticCallPiece *C;
if (VisitedEntireCall) {
- PathDiagnosticPiece *P = PD.getActivePath().front().getPtr();
+ PathDiagnosticPiece *P = PD.getActivePath().front().get();
C = cast<PathDiagnosticCallPiece>(P);
} else {
const Decl *Caller = CE->getLocationContext()->getDecl();
@@ -1728,7 +1728,7 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD,
// Propagate the interesting symbols accordingly.
if (const Expr *Ex = dyn_cast_or_null<Expr>(S)) {
reversePropagateIntererstingSymbols(*PDB.getBugReport(), IE,
- N->getState().getPtr(), Ex,
+ N->getState().get(), Ex,
N->getLocationContext());
}
@@ -1756,7 +1756,7 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD,
// interesting symbols correctly.
if (const Expr *Ex = PS->getStmtAs<Expr>())
reversePropagateIntererstingSymbols(*PDB.getBugReport(), IE,
- N->getState().getPtr(), Ex,
+ N->getState().get(), Ex,
N->getLocationContext());
// Add an edge. If this is an ObjCForCollectionStmt do
@@ -1779,7 +1779,7 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD,
const LocationContext *CalleeCtx = PDB.LC;
if (CallerCtx != CalleeCtx) {
reversePropagateInterestingSymbols(*PDB.getBugReport(), IE,
- N->getState().getPtr(),
+ N->getState().get(),
CalleeCtx, CallerCtx);
}
}
@@ -2995,7 +2995,7 @@ static void CompactPathDiagnostic(PathPieces &path, const SourceManager& SM) {
for (PathPieces::const_iterator I = path.begin(), E = path.end();
I!=E; ++I) {
- PathDiagnosticPiece *piece = I->getPtr();
+ PathDiagnosticPiece *piece = I->get();
// Recursively compact calls.
if (PathDiagnosticCallPiece *call=dyn_cast<PathDiagnosticCallPiece>(piece)){
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
index 1fdcdbaf6a5..0503acec051 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
@@ -1285,13 +1285,13 @@ bool ConditionBRVisitor::patternMatch(const Expr *Ex, raw_ostream &Out,
if (quotes) {
Out << '\'';
const LocationContext *LCtx = N->getLocationContext();
- const ProgramState *state = N->getState().getPtr();
+ const ProgramState *state = N->getState().get();
if (const MemRegion *R = state->getLValue(cast<VarDecl>(DR->getDecl()),
LCtx).getAsRegion()) {
if (report.isInteresting(R))
prunable = false;
else {
- const ProgramState *state = N->getState().getPtr();
+ const ProgramState *state = N->getState().get();
SVal V = state->getSVal(R);
if (report.isInteresting(V))
prunable = false;
@@ -1446,7 +1446,7 @@ ConditionBRVisitor::VisitConditionVariable(StringRef LhsString,
if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(CondVarExpr)) {
if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) {
- const ProgramState *state = N->getState().getPtr();
+ const ProgramState *state = N->getState().get();
if (const MemRegion *R = state->getLValue(VD, LCtx).getAsRegion()) {
if (report.isInteresting(R))
event->setPrunable(false);
@@ -1490,7 +1490,7 @@ ConditionBRVisitor::VisitTrueTest(const Expr *Cond,
PathDiagnosticEventPiece *event =
new PathDiagnosticEventPiece(Loc, Out.str());
- const ProgramState *state = N->getState().getPtr();
+ const ProgramState *state = N->getState().get();
if (const MemRegion *R = state->getLValue(VD, LCtx).getAsRegion()) {
if (report.isInteresting(R))
event->setPrunable(false);
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index ba30c5c3601..999507aedb3 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -2517,7 +2517,7 @@ struct DOTGraphTraits<ExplodedNode*> :
}
ProgramStateRef state = N->getState();
- Out << "\\|StateID: " << (const void*) state.getPtr()
+ Out << "\\|StateID: " << (const void*) state.get()
<< " NodeID: " << (const void*) N << "\\|";
state->printDOT(Out);
diff --git a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
index a9527debc2d..fd25bd8e3af 100644
--- a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
+++ b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
@@ -67,7 +67,7 @@ PathPieces::~PathPieces() {}
void PathPieces::flattenTo(PathPieces &Primary, PathPieces &Current,
bool ShouldFlattenMacros) const {
for (PathPieces::const_iterator I = begin(), E = end(); I != E; ++I) {
- PathDiagnosticPiece *Piece = I->getPtr();
+ PathDiagnosticPiece *Piece = I->get();
switch (Piece->getKind()) {
case PathDiagnosticPiece::Call: {
@@ -157,7 +157,7 @@ void PathDiagnostic::resetDiagnosticLocationToMainFile() {
if (path.empty())
return;
- PathDiagnosticPiece *LastP = path.back().getPtr();
+ PathDiagnosticPiece *LastP = path.back().get();
assert(LastP);
const SourceManager &SMgr = LastP->getLocation().getManager();
@@ -222,7 +222,7 @@ void PathDiagnosticConsumer::HandlePathDiagnostic(PathDiagnostic *D) {
for (PathPieces::const_iterator I = path.begin(), E = path.end(); I != E;
++I) {
- const PathDiagnosticPiece *piece = I->getPtr();
+ const PathDiagnosticPiece *piece = I->get();
FullSourceLoc L = piece->getLocation().asLocation().getExpansionLoc();
if (FID.isInvalid()) {
@@ -1037,7 +1037,7 @@ PathDiagnosticCallPiece::getCallExitEvent() const {
static void compute_path_size(const PathPieces &pieces, unsigned &size) {
for (PathPieces::const_iterator it = pieces.begin(),
et = pieces.end(); it != et; ++it) {
- const PathDiagnosticPiece *piece = it->getPtr();
+ const PathDiagnosticPiece *piece = it->get();
if (const PathDiagnosticCallPiece *cp =
dyn_cast<PathDiagnosticCallPiece>(piece)) {
compute_path_size(cp->path, size);
diff --git a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
index 2585e543f7a..538a750c201 100644
--- a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
@@ -311,7 +311,7 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
for (PathPieces::const_iterator I = path.begin(), E = path.end(); I != E;
++I) {
- const PathDiagnosticPiece *piece = I->getPtr();
+ const PathDiagnosticPiece *piece = I->get();
AddFID(FM, Fids, *SM, piece->getLocation().asLocation());
ArrayRef<SourceRange> Ranges = piece->getRanges();
for (ArrayRef<SourceRange>::iterator I = Ranges.begin(),
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index ccaa8b6168e..12e514b322b 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -214,7 +214,7 @@ public:
default:
#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN) \
case PD_##NAME: \
- CREATEFN(*Opts.getPtr(), PathConsumers, OutDir, PP); \
+ CREATEFN(*Opts.get(), PathConsumers, OutDir, PP); \
break;
#include "clang/StaticAnalyzer/Core/Analyses.def"
}
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp
index 5d3de8aa56b..0db38db3c91 100644
--- a/clang/lib/Tooling/Tooling.cpp
+++ b/clang/lib/Tooling/Tooling.cpp
@@ -129,7 +129,7 @@ bool runToolOnCodeWithArgs(clang::FrontendAction *ToolAction, const Twine &Code,
llvm::IntrusiveRefCntPtr<FileManager> Files(
new FileManager(FileSystemOptions()));
ToolInvocation Invocation(getSyntaxOnlyToolArgs(Args, FileNameRef), ToolAction,
- Files.getPtr());
+ Files.get());
SmallString<1024> CodeStorage;
Invocation.mapVirtualFile(FileNameRef,
@@ -352,7 +352,7 @@ int ClangTool::run(ToolAction *Action) {
DEBUG({
llvm::dbgs() << "Processing: " << Command.first << ".\n";
});
- ToolInvocation Invocation(std::move(CommandLine), Action, Files.getPtr());
+ ToolInvocation Invocation(std::move(CommandLine), Action, Files.get());
Invocation.setDiagnosticConsumer(DiagConsumer);
for (const auto &MappedFile : MappedFileContents) {
Invocation.mapVirtualFile(MappedFile.first, MappedFile.second);
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 8683ae62b07..57ebb8a1e74 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2776,7 +2776,7 @@ static void clang_parseTranslationUnit_Impl(void *UserData) {
// Recover resources if we crash before exiting this function.
llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,
llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >
- DiagCleanup(Diags.getPtr());
+ DiagCleanup(Diags.get());
std::unique_ptr<std::vector<ASTUnit::RemappedFile>> RemappedFiles(
new std::vector<ASTUnit::RemappedFile>());
@@ -6640,7 +6640,7 @@ CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU) {
// How much memory is used for caching global code completion results?
unsigned long completionBytes = 0;
if (GlobalCodeCompletionAllocator *completionAllocator =
- astUnit->getCachedCompletionAllocator().getPtr()) {
+ astUnit->getCachedCompletionAllocator().get()) {
completionBytes = completionAllocator->getTotalMemory();
}
createCXTUResourceUsageEntry(*entries,
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp
index 24ab7b206c1..e4f886b269d 100644
--- a/clang/tools/libclang/Indexing.cpp
+++ b/clang/tools/libclang/Indexing.cpp
@@ -550,7 +550,7 @@ static void clang_indexSourceFile_Impl(void *UserData) {
// Recover resources if we crash before exiting this function.
llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,
llvm::CrashRecoveryContextReleaseRefCleanup<DiagnosticsEngine> >
- DiagCleanup(Diags.getPtr());
+ DiagCleanup(Diags.get());
std::unique_ptr<std::vector<const char *>> Args(
new std::vector<const char *>());
@@ -579,7 +579,7 @@ static void clang_indexSourceFile_Impl(void *UserData) {
// Recover resources if we crash before exiting this function.
llvm::CrashRecoveryContextCleanupRegistrar<CompilerInvocation,
llvm::CrashRecoveryContextReleaseRefCleanup<CompilerInvocation> >
- CInvokCleanup(CInvok.getPtr());
+ CInvokCleanup(CInvok.get());
if (CInvok->getFrontendOpts().Inputs.empty())
return;
@@ -607,7 +607,7 @@ static void clang_indexSourceFile_Impl(void *UserData) {
if (index_options & CXIndexOpt_SuppressWarnings)
CInvok->getDiagnosticOpts().IgnoreWarnings = true;
- ASTUnit *Unit = ASTUnit::create(CInvok.getPtr(), Diags,
+ ASTUnit *Unit = ASTUnit::create(CInvok.get(), Diags,
CaptureDiagnostics,
/*UserFilesAreVolatile=*/true);
if (!Unit) {
@@ -661,7 +661,7 @@ static void clang_indexSourceFile_Impl(void *UserData) {
PPOpts.DetailedRecord = false;
DiagnosticErrorTrap DiagTrap(*Diags);
- bool Success = ASTUnit::LoadFromCompilerInvocationAction(CInvok.getPtr(), Diags,
+ bool Success = ASTUnit::LoadFromCompilerInvocationAction(CInvok.get(), Diags,
IndexAction.get(),
Unit,
Persistent,
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp
index 9289b22f8e3..e7d361e252b 100644
--- a/clang/unittests/Basic/VirtualFileSystemTest.cpp
+++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp
@@ -555,11 +555,11 @@ public:
TEST_F(VFSFromYAMLTest, BasicVFSFromYAML) {
IntrusiveRefCntPtr<vfs::FileSystem> FS;
FS = getFromYAMLString("");
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString("[]");
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString("'string'");
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
EXPECT_EQ(3, NumDiagnostics);
}
@@ -586,7 +586,7 @@ TEST_F(VFSFromYAMLTest, MappedFiles) {
"]\n"
"}",
Lower);
- ASSERT_TRUE(FS.getPtr() != nullptr);
+ ASSERT_TRUE(FS.get() != nullptr);
IntrusiveRefCntPtr<vfs::OverlayFileSystem> O(
new vfs::OverlayFileSystem(Lower));
@@ -630,7 +630,7 @@ TEST_F(VFSFromYAMLTest, CaseInsensitive) {
" ]\n"
"}]}",
Lower);
- ASSERT_TRUE(FS.getPtr() != nullptr);
+ ASSERT_TRUE(FS.get() != nullptr);
IntrusiveRefCntPtr<vfs::OverlayFileSystem> O(
new vfs::OverlayFileSystem(Lower));
@@ -666,7 +666,7 @@ TEST_F(VFSFromYAMLTest, CaseSensitive) {
" ]\n"
"}]}",
Lower);
- ASSERT_TRUE(FS.getPtr() != nullptr);
+ ASSERT_TRUE(FS.get() != nullptr);
IntrusiveRefCntPtr<vfs::OverlayFileSystem> O(
new vfs::OverlayFileSystem(Lower));
@@ -686,89 +686,89 @@ TEST_F(VFSFromYAMLTest, IllegalVFSFile) {
// invalid YAML at top-level
IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLString("{]", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// invalid YAML in roots
FS = getFromYAMLString("{ 'roots':[}", Lower);
// invalid YAML in directory
FS = getFromYAMLString(
"{ 'roots':[ { 'name': 'foo', 'type': 'directory', 'contents': [}",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// invalid configuration
FS = getFromYAMLString("{ 'knobular': 'true', 'roots':[] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString("{ 'case-sensitive': 'maybe', 'roots':[] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// invalid roots
FS = getFromYAMLString("{ 'roots':'' }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString("{ 'roots':{} }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// invalid entries
FS = getFromYAMLString(
"{ 'roots':[ { 'type': 'other', 'name': 'me', 'contents': '' }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString("{ 'roots':[ { 'type': 'file', 'name': [], "
"'external-contents': 'other' }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString(
"{ 'roots':[ { 'type': 'file', 'name': 'me', 'external-contents': [] }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString(
"{ 'roots':[ { 'type': 'file', 'name': 'me', 'external-contents': {} }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString(
"{ 'roots':[ { 'type': 'directory', 'name': 'me', 'contents': {} }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString(
"{ 'roots':[ { 'type': 'directory', 'name': 'me', 'contents': '' }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString(
"{ 'roots':[ { 'thingy': 'directory', 'name': 'me', 'contents': [] }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// missing mandatory fields
FS = getFromYAMLString("{ 'roots':[ { 'type': 'file', 'name': 'me' }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString(
"{ 'roots':[ { 'type': 'file', 'external-contents': 'other' }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString("{ 'roots':[ { 'name': 'me', 'contents': [] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// duplicate keys
FS = getFromYAMLString("{ 'roots':[], 'roots':[] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLString(
"{ 'case-sensitive':'true', 'case-sensitive':'true', 'roots':[] }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS =
getFromYAMLString("{ 'roots':[{'name':'me', 'name':'you', 'type':'file', "
"'external-contents':'blah' } ] }",
Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// missing version
FS = getFromYAMLRawString("{ 'roots':[] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
// bad version number
FS = getFromYAMLRawString("{ 'version':'foo', 'roots':[] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLRawString("{ 'version':-1, 'roots':[] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
FS = getFromYAMLRawString("{ 'version':100000, 'roots':[] }", Lower);
- EXPECT_EQ(nullptr, FS.getPtr());
+ EXPECT_EQ(nullptr, FS.get());
EXPECT_EQ(24, NumDiagnostics);
}
@@ -790,7 +790,7 @@ TEST_F(VFSFromYAMLTest, UseExternalName) {
" 'external-contents': '//root/external/file'\n"
" }\n"
"] }", Lower);
- ASSERT_TRUE(nullptr != FS.getPtr());
+ ASSERT_TRUE(nullptr != FS.get());
// default true
EXPECT_EQ("//root/external/file", FS->status("//root/A")->getName());
@@ -814,7 +814,7 @@ TEST_F(VFSFromYAMLTest, UseExternalName) {
" 'external-contents': '//root/external/file'\n"
" }\n"
"] }", Lower);
- ASSERT_TRUE(nullptr != FS.getPtr());
+ ASSERT_TRUE(nullptr != FS.get());
// default
EXPECT_EQ("//root/A", FS->status("//root/A")->getName());
@@ -833,7 +833,7 @@ TEST_F(VFSFromYAMLTest, MultiComponentPath) {
" { 'type': 'file', 'name': '//root/path/to/file',\n"
" 'external-contents': '//root/other' }]\n"
"}", Lower);
- ASSERT_TRUE(nullptr != FS.getPtr());
+ ASSERT_TRUE(nullptr != FS.get());
EXPECT_FALSE(FS->status("//root/path/to/file").getError());
EXPECT_FALSE(FS->status("//root/path/to").getError());
EXPECT_FALSE(FS->status("//root/path").getError());
@@ -846,7 +846,7 @@ TEST_F(VFSFromYAMLTest, MultiComponentPath) {
" 'contents': [ { 'type': 'file', 'name': 'file',\n"
" 'external-contents': '//root/other' }]}]\n"
"}", Lower);
- ASSERT_TRUE(nullptr != FS.getPtr());
+ ASSERT_TRUE(nullptr != FS.get());
EXPECT_FALSE(FS->status("//root/path/to/file").getError());
EXPECT_FALSE(FS->status("//root/path/to").getError());
EXPECT_FALSE(FS->status("//root/path").getError());
@@ -859,7 +859,7 @@ TEST_F(VFSFromYAMLTest, MultiComponentPath) {
" 'contents': [ { 'type': 'file', 'name': 'path/to/file',\n"
" 'external-contents': '//root/other' }]}]\n"
"}", Lower);
- ASSERT_TRUE(nullptr != FS.getPtr());
+ ASSERT_TRUE(nullptr != FS.get());
EXPECT_FALSE(FS->status("//root/path/to/file").getError());
EXPECT_FALSE(FS->status("//root/path/to").getError());
EXPECT_FALSE(FS->status("//root/path").getError());
@@ -877,7 +877,7 @@ TEST_F(VFSFromYAMLTest, TrailingSlashes) {
" 'contents': [ { 'type': 'file', 'name': 'file',\n"
" 'external-contents': '//root/other' }]}]\n"
"}", Lower);
- ASSERT_TRUE(nullptr != FS.getPtr());
+ ASSERT_TRUE(nullptr != FS.get());
EXPECT_FALSE(FS->status("//root/path/to/file").getError());
EXPECT_FALSE(FS->status("//root/path/to").getError());
EXPECT_FALSE(FS->status("//root/path").getError());
@@ -913,7 +913,7 @@ TEST_F(VFSFromYAMLTest, DirectoryIteration) {
"]\n"
"}",
Lower);
- ASSERT_TRUE(FS.getPtr() != NULL);
+ ASSERT_TRUE(FS.get() != NULL);
IntrusiveRefCntPtr<vfs::OverlayFileSystem> O(
new vfs::OverlayFileSystem(Lower));
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp
index 2981de7e255..938ad4d26e9 100644
--- a/clang/unittests/Lex/LexerTest.cpp
+++ b/clang/unittests/Lex/LexerTest.cpp
@@ -67,7 +67,7 @@ protected:
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
- Target.getPtr());
+ Target.get());
Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
HeaderInfo, ModLoader, /*IILookup =*/nullptr,
/*OwnsHeaderSearch =*/false);
diff --git a/clang/unittests/Lex/PPCallbacksTest.cpp b/clang/unittests/Lex/PPCallbacksTest.cpp
index 5ca2013cd6e..c5fd5702ea9 100644
--- a/clang/unittests/Lex/PPCallbacksTest.cpp
+++ b/clang/unittests/Lex/PPCallbacksTest.cpp
@@ -119,7 +119,7 @@ protected:
: FileMgr(FileMgrOpts),
DiagID(new DiagnosticIDs()),
DiagOpts(new DiagnosticOptions()),
- Diags(DiagID, DiagOpts.getPtr(), new IgnoringDiagConsumer()),
+ Diags(DiagID, DiagOpts.get(), new IgnoringDiagConsumer()),
SourceMgr(Diags, FileMgr) {
TargetOpts = new TargetOptions();
TargetOpts->Triple = "x86_64-apple-darwin11.1.0";
@@ -169,7 +169,7 @@ protected:
IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts = new HeaderSearchOptions();
HeaderSearch HeaderInfo(HSOpts, SourceMgr, Diags, LangOpts,
- Target.getPtr());
+ Target.get());
AddFakeHeader(HeaderInfo, HeaderPath, SystemHeader);
IntrusiveRefCntPtr<PreprocessorOptions> PPOpts = new PreprocessorOptions();
@@ -204,7 +204,7 @@ protected:
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags,
- OpenCLLangOpts, Target.getPtr());
+ OpenCLLangOpts, Target.get());
Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, SourceMgr,
HeaderInfo, ModLoader, /*IILookup =*/nullptr,
diff --git a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
index 49f9d1c1326..8659f0fc934 100644
--- a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
+++ b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
@@ -95,7 +95,7 @@ TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
- Target.getPtr());
+ Target.get());
Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
HeaderInfo, ModLoader,
/*IILookup =*/nullptr,
diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp
index 2b57c16ac52..9aede044f69 100644
--- a/clang/unittests/Tooling/ToolingTest.cpp
+++ b/clang/unittests/Tooling/ToolingTest.cpp
@@ -147,7 +147,7 @@ TEST(ToolInvocation, TestMapVirtualFile) {
Args.push_back("-fsyntax-only");
Args.push_back("test.cpp");
clang::tooling::ToolInvocation Invocation(Args, new SyntaxOnlyAction,
- Files.getPtr());
+ Files.get());
Invocation.mapVirtualFile("test.cpp", "#include <abc>\n");
Invocation.mapVirtualFile("def/abc", "\n");
EXPECT_TRUE(Invocation.run());
@@ -166,7 +166,7 @@ TEST(ToolInvocation, TestVirtualModulesCompilation) {
Args.push_back("-fsyntax-only");
Args.push_back("test.cpp");
clang::tooling::ToolInvocation Invocation(Args, new SyntaxOnlyAction,
- Files.getPtr());
+ Files.get());
Invocation.mapVirtualFile("test.cpp", "#include <abc>\n");
Invocation.mapVirtualFile("def/abc", "\n");
// Add a module.map file in the include directory of our header, so we trigger
OpenPOWER on IntegriCloud