r368942 - [Clang] Migrate llvm::make_unique to std::make_unique
Jonas Devlieghere via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 16:04:19 PDT 2019
Author: jdevlieghere
Date: Wed Aug 14 16:04:18 2019
New Revision: 368942
URL: http://llvm.org/viewvc/llvm-project?rev=368942&view=rev
Log:
[Clang] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
Modified:
cfe/trunk/examples/AnnotateFunctions/AnnotateFunctions.cpp
cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp
cfe/trunk/examples/clang-interpreter/main.cpp
cfe/trunk/include/clang/AST/ASTImporterSharedState.h
cfe/trunk/include/clang/Basic/SyncScope.h
cfe/trunk/include/clang/Frontend/ASTUnit.h
cfe/trunk/include/clang/Lex/Preprocessor.h
cfe/trunk/include/clang/Sema/SemaInternal.h
cfe/trunk/include/clang/Sema/TypoCorrection.h
cfe/trunk/include/clang/Serialization/ASTReader.h
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
cfe/trunk/include/clang/Tooling/ASTDiff/ASTDiff.h
cfe/trunk/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/lib/AST/ASTContext.cpp
cfe/trunk/lib/AST/CXXInheritance.cpp
cfe/trunk/lib/AST/ExternalASTMerger.cpp
cfe/trunk/lib/AST/ItaniumCXXABI.cpp
cfe/trunk/lib/AST/Mangle.cpp
cfe/trunk/lib/AST/MicrosoftCXXABI.cpp
cfe/trunk/lib/AST/VTableBuilder.cpp
cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp
cfe/trunk/lib/ASTMatchers/Dynamic/Marshallers.h
cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp
cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp
cfe/trunk/lib/Analysis/CallGraph.cpp
cfe/trunk/lib/Analysis/Consumed.cpp
cfe/trunk/lib/Analysis/ThreadSafety.cpp
cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp
cfe/trunk/lib/Basic/FileManager.cpp
cfe/trunk/lib/Basic/SourceManager.cpp
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
cfe/trunk/lib/CodeGen/CodeGenAction.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/CodeGenPGO.cpp
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
cfe/trunk/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/DriverOptions.cpp
cfe/trunk/lib/Driver/ToolChains/AMDGPU.cpp
cfe/trunk/lib/Driver/ToolChains/AVR.cpp
cfe/trunk/lib/Driver/ToolChains/Ananas.cpp
cfe/trunk/lib/Driver/ToolChains/BareMetal.cpp
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/lib/Driver/ToolChains/CloudABI.cpp
cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
cfe/trunk/lib/Driver/ToolChains/CrossWindows.cpp
cfe/trunk/lib/Driver/ToolChains/Cuda.cpp
cfe/trunk/lib/Driver/ToolChains/Darwin.cpp
cfe/trunk/lib/Driver/ToolChains/DragonFly.cpp
cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp
cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp
cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
cfe/trunk/lib/Driver/ToolChains/HIP.cpp
cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
cfe/trunk/lib/Driver/ToolChains/MSP430.cpp
cfe/trunk/lib/Driver/ToolChains/MSVC.cpp
cfe/trunk/lib/Driver/ToolChains/MinGW.cpp
cfe/trunk/lib/Driver/ToolChains/Minix.cpp
cfe/trunk/lib/Driver/ToolChains/Myriad.cpp
cfe/trunk/lib/Driver/ToolChains/NaCl.cpp
cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp
cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp
cfe/trunk/lib/Driver/ToolChains/PS4CPU.cpp
cfe/trunk/lib/Driver/ToolChains/RISCVToolchain.cpp
cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp
cfe/trunk/lib/Driver/ToolChains/XCore.cpp
cfe/trunk/lib/Format/ContinuationIndenter.cpp
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/lib/Format/UnwrappedLineParser.cpp
cfe/trunk/lib/Frontend/ASTConsumers.cpp
cfe/trunk/lib/Frontend/ASTUnit.cpp
cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp
cfe/trunk/lib/Frontend/CompilerInstance.cpp
cfe/trunk/lib/Frontend/CreateInvocationFromCommandLine.cpp
cfe/trunk/lib/Frontend/DependencyFile.cpp
cfe/trunk/lib/Frontend/DependencyGraph.cpp
cfe/trunk/lib/Frontend/FrontendAction.cpp
cfe/trunk/lib/Frontend/FrontendActions.cpp
cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp
cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp
cfe/trunk/lib/Frontend/MultiplexConsumer.cpp
cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp
cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp
cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp
cfe/trunk/lib/Frontend/Rewrite/HTMLPrint.cpp
cfe/trunk/lib/Frontend/Rewrite/RewriteModernObjC.cpp
cfe/trunk/lib/Frontend/Rewrite/RewriteObjC.cpp
cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
cfe/trunk/lib/Frontend/VerifyDiagnosticConsumer.cpp
cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
cfe/trunk/lib/Index/IndexingAction.cpp
cfe/trunk/lib/Lex/PPDirectives.cpp
cfe/trunk/lib/Lex/PPLexerChange.cpp
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
cfe/trunk/lib/Lex/Pragma.cpp
cfe/trunk/lib/Lex/Preprocessor.cpp
cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
cfe/trunk/lib/Parse/ParseExpr.cpp
cfe/trunk/lib/Parse/ParsePragma.cpp
cfe/trunk/lib/Parse/ParseStmt.cpp
cfe/trunk/lib/Parse/ParseTentative.cpp
cfe/trunk/lib/Sema/Sema.cpp
cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaExprMember.cpp
cfe/trunk/lib/Sema/SemaExprObjC.cpp
cfe/trunk/lib/Sema/SemaInit.cpp
cfe/trunk/lib/Sema/SemaLookup.cpp
cfe/trunk/lib/Sema/SemaOpenMP.cpp
cfe/trunk/lib/Sema/SemaTemplate.cpp
cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp
cfe/trunk/lib/Serialization/ASTReader.cpp
cfe/trunk/lib/Serialization/ModuleManager.cpp
cfe/trunk/lib/Serialization/PCHContainerOperations.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MIGChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/ValistChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
cfe/trunk/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp
cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp
cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
cfe/trunk/lib/StaticAnalyzer/Frontend/FrontendActions.cpp
cfe/trunk/lib/Tooling/ASTDiff/ASTDiff.cpp
cfe/trunk/lib/Tooling/AllTUsExecution.cpp
cfe/trunk/lib/Tooling/CommonOptionsParser.cpp
cfe/trunk/lib/Tooling/CompilationDatabase.cpp
cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
cfe/trunk/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp
cfe/trunk/lib/Tooling/InterpolatingCompilationDatabase.cpp
cfe/trunk/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp
cfe/trunk/lib/Tooling/Refactoring/RefactoringActions.cpp
cfe/trunk/lib/Tooling/Refactoring/Rename/RenamingAction.cpp
cfe/trunk/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp
cfe/trunk/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp
cfe/trunk/lib/Tooling/StandaloneExecution.cpp
cfe/trunk/lib/Tooling/Syntax/Tokens.cpp
cfe/trunk/tools/c-index-test/core_main.cpp
cfe/trunk/tools/clang-check/ClangCheck.cpp
cfe/trunk/tools/clang-diff/ClangDiff.cpp
cfe/trunk/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp
cfe/trunk/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
cfe/trunk/tools/clang-import-test/clang-import-test.cpp
cfe/trunk/tools/clang-refactor/ClangRefactor.cpp
cfe/trunk/tools/clang-refactor/TestSupport.cpp
cfe/trunk/tools/clang-scan-deps/ClangScanDeps.cpp
cfe/trunk/tools/driver/cc1_main.cpp
cfe/trunk/tools/driver/cc1as_main.cpp
cfe/trunk/tools/libclang/CIndex.cpp
cfe/trunk/tools/libclang/CIndexDiagnostic.cpp
cfe/trunk/tools/libclang/CIndexer.cpp
cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp
cfe/trunk/tools/libclang/Indexing.cpp
cfe/trunk/unittests/AST/EvaluateAsRValueTest.cpp
cfe/trunk/unittests/AST/ExternalASTSourceTest.cpp
cfe/trunk/unittests/AST/RecursiveASTVisitorTest.cpp
cfe/trunk/unittests/ASTMatchers/ASTMatchersInternalTest.cpp
cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
cfe/trunk/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
cfe/trunk/unittests/ASTMatchers/Dynamic/ParserTest.cpp
cfe/trunk/unittests/Basic/FileManagerTest.cpp
cfe/trunk/unittests/Basic/SourceManagerTest.cpp
cfe/trunk/unittests/CrossTU/CrossTranslationUnitTest.cpp
cfe/trunk/unittests/Frontend/ASTUnitTest.cpp
cfe/trunk/unittests/Frontend/CompilerInstanceTest.cpp
cfe/trunk/unittests/Frontend/FrontendActionTest.cpp
cfe/trunk/unittests/Index/IndexTests.cpp
cfe/trunk/unittests/Lex/LexerTest.cpp
cfe/trunk/unittests/Sema/CodeCompleteTest.cpp
cfe/trunk/unittests/Sema/ExternalSemaSourceTest.cpp
cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cpp
cfe/trunk/unittests/StaticAnalyzer/StoreTest.cpp
cfe/trunk/unittests/StaticAnalyzer/SymbolReaperTest.cpp
cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp
cfe/trunk/unittests/Tooling/ExecutionTest.cpp
cfe/trunk/unittests/Tooling/RefactoringTest.cpp
cfe/trunk/unittests/Tooling/Syntax/TokensTest.cpp
cfe/trunk/unittests/Tooling/Syntax/TreeTest.cpp
cfe/trunk/unittests/Tooling/TestVisitor.h
cfe/trunk/unittests/Tooling/ToolingTest.cpp
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
cfe/trunk/utils/TableGen/NeonEmitter.cpp
Modified: cfe/trunk/examples/AnnotateFunctions/AnnotateFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/AnnotateFunctions/AnnotateFunctions.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/examples/AnnotateFunctions/AnnotateFunctions.cpp (original)
+++ cfe/trunk/examples/AnnotateFunctions/AnnotateFunctions.cpp Wed Aug 14 16:04:18 2019
@@ -41,7 +41,7 @@ class AnnotateFunctionsAction : public P
public:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
llvm::StringRef) override {
- return llvm::make_unique<AnnotateFunctionsConsumer>();
+ return std::make_unique<AnnotateFunctionsConsumer>();
}
bool ParseArgs(const CompilerInstance &CI,
Modified: cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp (original)
+++ cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp Wed Aug 14 16:04:18 2019
@@ -81,7 +81,7 @@ class PrintFunctionNamesAction : public
protected:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
llvm::StringRef) override {
- return llvm::make_unique<PrintFunctionsConsumer>(CI, ParsedTemplates);
+ return std::make_unique<PrintFunctionsConsumer>(CI, ParsedTemplates);
}
bool ParseArgs(const CompilerInstance &CI,
Modified: cfe/trunk/examples/clang-interpreter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/main.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/main.cpp Wed Aug 14 16:04:18 2019
@@ -58,7 +58,7 @@ private:
IRCompileLayer CompileLayer{ES, ObjectLayer, SimpleCompiler(*TM)};
static std::unique_ptr<SectionMemoryManager> createMemMgr() {
- return llvm::make_unique<SectionMemoryManager>();
+ return std::make_unique<SectionMemoryManager>();
}
SimpleJIT(
Modified: cfe/trunk/include/clang/AST/ASTImporterSharedState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTImporterSharedState.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTImporterSharedState.h (original)
+++ cfe/trunk/include/clang/AST/ASTImporterSharedState.h Wed Aug 14 16:04:18 2019
@@ -47,7 +47,7 @@ public:
ASTImporterSharedState() = default;
ASTImporterSharedState(TranslationUnitDecl &ToTU) {
- LookupTable = llvm::make_unique<ASTImporterLookupTable>(ToTU);
+ LookupTable = std::make_unique<ASTImporterLookupTable>(ToTU);
}
ASTImporterLookupTable *getLookupTable() { return LookupTable.get(); }
Modified: cfe/trunk/include/clang/Basic/SyncScope.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SyncScope.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SyncScope.h (original)
+++ cfe/trunk/include/clang/Basic/SyncScope.h Wed Aug 14 16:04:18 2019
@@ -144,7 +144,7 @@ AtomicScopeModel::create(AtomicScopeMode
case AtomicScopeModelKind::None:
return std::unique_ptr<AtomicScopeModel>{};
case AtomicScopeModelKind::OpenCL:
- return llvm::make_unique<AtomicScopeOpenCLModel>();
+ return std::make_unique<AtomicScopeOpenCLModel>();
}
llvm_unreachable("Invalid atomic scope model kind");
}
Modified: cfe/trunk/include/clang/Frontend/ASTUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/ASTUnit.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/ASTUnit.h (original)
+++ cfe/trunk/include/clang/Frontend/ASTUnit.h Wed Aug 14 16:04:18 2019
@@ -315,7 +315,7 @@ public:
CodeCompletionTUInfo &getCodeCompletionTUInfo() {
if (!CCTUInfo)
- CCTUInfo = llvm::make_unique<CodeCompletionTUInfo>(
+ CCTUInfo = std::make_unique<CodeCompletionTUInfo>(
std::make_shared<GlobalCodeCompletionAllocator>());
return *CCTUInfo;
}
Modified: cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/trunk/include/clang/Lex/Preprocessor.h Wed Aug 14 16:04:18 2019
@@ -994,7 +994,7 @@ public:
PPCallbacks *getPPCallbacks() const { return Callbacks.get(); }
void addPPCallbacks(std::unique_ptr<PPCallbacks> C) {
if (Callbacks)
- C = llvm::make_unique<PPChainedCallbacks>(std::move(C),
+ C = std::make_unique<PPChainedCallbacks>(std::move(C),
std::move(Callbacks));
Callbacks = std::move(C);
}
@@ -1471,7 +1471,7 @@ public:
if (LexLevel) {
// It's not correct in general to enter caching lex mode while in the
// middle of a nested lexing action.
- auto TokCopy = llvm::make_unique<Token[]>(1);
+ auto TokCopy = std::make_unique<Token[]>(1);
TokCopy[0] = Tok;
EnterTokenStream(std::move(TokCopy), 1, true, IsReinject);
} else {
Modified: cfe/trunk/include/clang/Sema/SemaInternal.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/SemaInternal.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/SemaInternal.h (original)
+++ cfe/trunk/include/clang/Sema/SemaInternal.h Wed Aug 14 16:04:18 2019
@@ -97,7 +97,7 @@ public:
bool EnteringContext)
: Typo(TypoName.getName().getAsIdentifierInfo()), CurrentTCIndex(0),
SavedTCIndex(0), SemaRef(SemaRef), S(S),
- SS(SS ? llvm::make_unique<CXXScopeSpec>(*SS) : nullptr),
+ SS(SS ? std::make_unique<CXXScopeSpec>(*SS) : nullptr),
CorrectionValidator(std::move(CCC)), MemberContext(MemberContext),
Result(SemaRef, TypoName, LookupKind),
Namespaces(SemaRef.Context, SemaRef.CurContext, SS),
Modified: cfe/trunk/include/clang/Sema/TypoCorrection.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/TypoCorrection.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/TypoCorrection.h (original)
+++ cfe/trunk/include/clang/Sema/TypoCorrection.h Wed Aug 14 16:04:18 2019
@@ -356,7 +356,7 @@ public:
: CorrectionCandidateCallback(Typo, TypoNNS) {}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<DefaultFilterCCC>(*this);
+ return std::make_unique<DefaultFilterCCC>(*this);
}
};
@@ -369,7 +369,7 @@ public:
return candidate.getCorrectionDeclAs<C>();
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<DeclFilterCCC>(*this);
+ return std::make_unique<DeclFilterCCC>(*this);
}
};
@@ -384,7 +384,7 @@ public:
bool ValidateCandidate(const TypoCorrection &candidate) override;
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<FunctionCallFilterCCC>(*this);
+ return std::make_unique<FunctionCallFilterCCC>(*this);
}
private:
@@ -409,7 +409,7 @@ public:
return false;
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<NoTypoCorrectionCCC>(*this);
+ return std::make_unique<NoTypoCorrectionCCC>(*this);
}
};
Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTReader.h Wed Aug 14 16:04:18 2019
@@ -1578,7 +1578,7 @@ public:
/// Takes ownership of \p L.
void addListener(std::unique_ptr<ASTReaderListener> L) {
if (Listener)
- L = llvm::make_unique<ChainedASTReaderListener>(std::move(L),
+ L = std::make_unique<ChainedASTReaderListener>(std::move(L),
std::move(Listener));
Listener = std::move(L);
}
@@ -1594,7 +1594,7 @@ public:
auto Old = Reader.takeListener();
if (Old) {
Chained = true;
- L = llvm::make_unique<ChainedASTReaderListener>(std::move(L),
+ L = std::make_unique<ChainedASTReaderListener>(std::move(L),
std::move(Old));
}
Reader.setListener(std::move(L));
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h Wed Aug 14 16:04:18 2019
@@ -646,7 +646,7 @@ public:
public:
const NoteTag *makeNoteTag(Callback &&Cb, bool IsPrunable = false) {
- // We cannot use make_unique because we cannot access the private
+ // We cannot use std::make_unique because we cannot access the private
// constructor from inside it.
std::unique_ptr<NoteTag> T(new NoteTag(std::move(Cb), IsPrunable));
Tags.push_back(std::move(T));
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h Wed Aug 14 16:04:18 2019
@@ -337,7 +337,7 @@ public:
bool IsSink = false);
std::unique_ptr<ExplodedGraph> MakeEmptyGraph() const {
- return llvm::make_unique<ExplodedGraph>();
+ return std::make_unique<ExplodedGraph>();
}
/// addRoot - Add an untyped node to the set of roots.
Modified: cfe/trunk/include/clang/Tooling/ASTDiff/ASTDiff.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/ASTDiff/ASTDiff.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Tooling/ASTDiff/ASTDiff.h (original)
+++ cfe/trunk/include/clang/Tooling/ASTDiff/ASTDiff.h Wed Aug 14 16:04:18 2019
@@ -71,7 +71,7 @@ public:
/// Constructs a tree from any AST node.
template <class T>
SyntaxTree(T *Node, ASTContext &AST)
- : TreeImpl(llvm::make_unique<Impl>(this, Node, AST)) {}
+ : TreeImpl(std::make_unique<Impl>(this, Node, AST)) {}
SyntaxTree(SyntaxTree &&Other) = default;
~SyntaxTree();
Modified: cfe/trunk/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h (original)
+++ cfe/trunk/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h Wed Aug 14 16:04:18 2019
@@ -148,7 +148,7 @@ createRefactoringActionRule(const Requir
std::tuple<RequirementTypes...> Requirements;
};
- return llvm::make_unique<Rule>(std::make_tuple(Requirements...));
+ return std::make_unique<Rule>(std::make_tuple(Requirements...));
}
} // end namespace tooling
Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Wed Aug 14 16:04:18 2019
@@ -453,8 +453,8 @@ public:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) override {
CI.getPreprocessor().addPPCallbacks(
- llvm::make_unique<ARCMTMacroTrackerPPCallbacks>(ARCMTMacroLocs));
- return llvm::make_unique<ASTConsumer>();
+ std::make_unique<ARCMTMacroTrackerPPCallbacks>(ARCMTMacroLocs));
+ return std::make_unique<ASTConsumer>();
}
};
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Wed Aug 14 16:04:18 2019
@@ -208,10 +208,10 @@ ObjCMigrateAction::CreateASTConsumer(Com
CI.getPreprocessor().addPPCallbacks(std::unique_ptr<PPCallbacks>(PPRec));
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
Consumers.push_back(WrapperFrontendAction::CreateASTConsumer(CI, InFile));
- Consumers.push_back(llvm::make_unique<ObjCMigrateASTConsumer>(
+ Consumers.push_back(std::make_unique<ObjCMigrateASTConsumer>(
MigrateDir, ObjCMigAction, Remapper, CompInst->getFileManager(), PPRec,
CompInst->getPreprocessor(), false, None));
- return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
+ return std::make_unique<MultiplexConsumer>(std::move(Consumers));
}
bool ObjCMigrateAction::BeginInvocation(CompilerInstance &CI) {
@@ -2034,7 +2034,7 @@ MigrateSourceAction::CreateASTConsumer(C
CI.getPreprocessor().addPPCallbacks(std::unique_ptr<PPCallbacks>(PPRec));
std::vector<std::string> WhiteList =
getWhiteListFilenames(CI.getFrontendOpts().ObjCMTWhiteListPath);
- return llvm::make_unique<ObjCMigrateASTConsumer>(
+ return std::make_unique<ObjCMigrateASTConsumer>(
CI.getFrontendOpts().OutputFile, ObjCMTAction, Remapper,
CI.getFileManager(), PPRec, CI.getPreprocessor(),
/*isOutputFile=*/true, WhiteList);
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Wed Aug 14 16:04:18 2019
@@ -10472,7 +10472,7 @@ ASTContext::getParents(const ast_type_tr
if (!Parents)
// We build the parent map for the traversal scope (usually whole TU), as
// hasAncestor can escape any subtree.
- Parents = llvm::make_unique<ParentMap>(*this);
+ Parents = std::make_unique<ParentMap>(*this);
return Parents->getParents(Node);
}
Modified: cfe/trunk/lib/AST/CXXInheritance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CXXInheritance.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CXXInheritance.cpp (original)
+++ cfe/trunk/lib/AST/CXXInheritance.cpp Wed Aug 14 16:04:18 2019
@@ -44,7 +44,7 @@ void CXXBasePaths::ComputeDeclsFound() {
Decls.insert(Path->Decls.front());
NumDeclsFound = Decls.size();
- DeclsFound = llvm::make_unique<NamedDecl *[]>(NumDeclsFound);
+ DeclsFound = std::make_unique<NamedDecl *[]>(NumDeclsFound);
std::copy(Decls.begin(), Decls.end(), DeclsFound.get());
}
Modified: cfe/trunk/lib/AST/ExternalASTMerger.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExternalASTMerger.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExternalASTMerger.cpp (original)
+++ cfe/trunk/lib/AST/ExternalASTMerger.cpp Wed Aug 14 16:04:18 2019
@@ -320,7 +320,7 @@ ExternalASTMerger::ExternalASTMerger(con
void ExternalASTMerger::AddSources(llvm::ArrayRef<ImporterSource> Sources) {
for (const ImporterSource &S : Sources) {
assert(&S.AST != &Target.AST);
- Importers.push_back(llvm::make_unique<LazyASTImporter>(
+ Importers.push_back(std::make_unique<LazyASTImporter>(
*this, Target.AST, Target.FM, S.AST, S.FM, S.OM));
}
}
Modified: cfe/trunk/lib/AST/ItaniumCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumCXXABI.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumCXXABI.cpp Wed Aug 14 16:04:18 2019
@@ -218,7 +218,7 @@ public:
std::unique_ptr<MangleNumberingContext>
createMangleNumberingContext() const override {
- return llvm::make_unique<ItaniumNumberingContext>();
+ return std::make_unique<ItaniumNumberingContext>();
}
};
}
Modified: cfe/trunk/lib/AST/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Mangle.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Mangle.cpp (original)
+++ cfe/trunk/lib/AST/Mangle.cpp Wed Aug 14 16:04:18 2019
@@ -470,7 +470,7 @@ private:
};
ASTNameGenerator::ASTNameGenerator(ASTContext &Ctx)
- : Impl(llvm::make_unique<Implementation>(Ctx)) {}
+ : Impl(std::make_unique<Implementation>(Ctx)) {}
ASTNameGenerator::~ASTNameGenerator() {}
Modified: cfe/trunk/lib/AST/MicrosoftCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftCXXABI.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftCXXABI.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftCXXABI.cpp Wed Aug 14 16:04:18 2019
@@ -132,7 +132,7 @@ public:
std::unique_ptr<MangleNumberingContext>
createMangleNumberingContext() const override {
- return llvm::make_unique<MicrosoftNumberingContext>();
+ return std::make_unique<MicrosoftNumberingContext>();
}
};
}
Modified: cfe/trunk/lib/AST/VTableBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/VTableBuilder.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/AST/VTableBuilder.cpp (original)
+++ cfe/trunk/lib/AST/VTableBuilder.cpp Wed Aug 14 16:04:18 2019
@@ -2268,7 +2268,7 @@ CreateVTableLayout(const ItaniumVTableBu
SmallVector<VTableLayout::VTableThunkTy, 1>
VTableThunks(Builder.vtable_thunks_begin(), Builder.vtable_thunks_end());
- return llvm::make_unique<VTableLayout>(
+ return std::make_unique<VTableLayout>(
Builder.VTableIndices, Builder.vtable_components(), VTableThunks,
Builder.getAddressPoints());
}
@@ -3253,7 +3253,7 @@ void MicrosoftVTableContext::computeVTab
// Base case: this subobject has its own vptr.
if (ForVBTables ? Layout.hasOwnVBPtr() : Layout.hasOwnVFPtr())
- Paths.push_back(llvm::make_unique<VPtrInfo>(RD));
+ Paths.push_back(std::make_unique<VPtrInfo>(RD));
// Recursive case: get all the vbtables from our bases and remove anything
// that shares a virtual base.
@@ -3276,7 +3276,7 @@ void MicrosoftVTableContext::computeVTab
continue;
// Copy the path and adjust it as necessary.
- auto P = llvm::make_unique<VPtrInfo>(*BaseInfo);
+ auto P = std::make_unique<VPtrInfo>(*BaseInfo);
// We mangle Base into the path if the path would've been ambiguous and it
// wasn't already extended with Base.
@@ -3562,7 +3562,7 @@ void MicrosoftVTableContext::computeVTab
const VTableLayout::AddressPointsMapTy EmptyAddressPointsMap;
{
- auto VFPtrs = llvm::make_unique<VPtrInfoVector>();
+ auto VFPtrs = std::make_unique<VPtrInfoVector>();
computeVTablePaths(/*ForVBTables=*/false, RD, *VFPtrs);
computeFullPathsForVFTables(Context, RD, *VFPtrs);
VFPtrLocations[RD] = std::move(VFPtrs);
@@ -3576,7 +3576,7 @@ void MicrosoftVTableContext::computeVTab
assert(VFTableLayouts.count(id) == 0);
SmallVector<VTableLayout::VTableThunkTy, 1> VTableThunks(
Builder.vtable_thunks_begin(), Builder.vtable_thunks_end());
- VFTableLayouts[id] = llvm::make_unique<VTableLayout>(
+ VFTableLayouts[id] = std::make_unique<VTableLayout>(
ArrayRef<size_t>{0}, Builder.vtable_components(), VTableThunks,
EmptyAddressPointsMap);
Thunks.insert(Builder.thunks_begin(), Builder.thunks_end());
@@ -3668,7 +3668,7 @@ const VirtualBaseInfo &MicrosoftVTableCo
std::unique_ptr<VirtualBaseInfo> &Entry = VBaseInfo[RD];
if (Entry)
return *Entry;
- Entry = llvm::make_unique<VirtualBaseInfo>();
+ Entry = std::make_unique<VirtualBaseInfo>();
VBI = Entry.get();
}
Modified: cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp (original)
+++ cfe/trunk/lib/ASTMatchers/ASTMatchFinder.cpp Wed Aug 14 16:04:18 2019
@@ -1078,7 +1078,7 @@ bool MatchFinder::addDynamicMatcher(cons
}
std::unique_ptr<ASTConsumer> MatchFinder::newASTConsumer() {
- return llvm::make_unique<internal::MatchASTConsumer>(this, ParsingDone);
+ return std::make_unique<internal::MatchASTConsumer>(this, ParsingDone);
}
void MatchFinder::match(const clang::ast_type_traits::DynTypedNode &Node,
Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Marshallers.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/Dynamic/Marshallers.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/Dynamic/Marshallers.h (original)
+++ cfe/trunk/lib/ASTMatchers/Dynamic/Marshallers.h Wed Aug 14 16:04:18 2019
@@ -729,7 +729,7 @@ std::unique_ptr<MatcherDescriptor>
makeMatcherAutoMarshall(ReturnType (*Func)(), StringRef MatcherName) {
std::vector<ast_type_traits::ASTNodeKind> RetTypes;
BuildReturnTypeVector<ReturnType>::build(RetTypes);
- return llvm::make_unique<FixedArgCountMatcherDescriptor>(
+ return std::make_unique<FixedArgCountMatcherDescriptor>(
matcherMarshall0<ReturnType>, reinterpret_cast<void (*)()>(Func),
MatcherName, RetTypes, None);
}
@@ -741,7 +741,7 @@ makeMatcherAutoMarshall(ReturnType (*Fun
std::vector<ast_type_traits::ASTNodeKind> RetTypes;
BuildReturnTypeVector<ReturnType>::build(RetTypes);
ArgKind AK = ArgTypeTraits<ArgType1>::getKind();
- return llvm::make_unique<FixedArgCountMatcherDescriptor>(
+ return std::make_unique<FixedArgCountMatcherDescriptor>(
matcherMarshall1<ReturnType, ArgType1>,
reinterpret_cast<void (*)()>(Func), MatcherName, RetTypes, AK);
}
@@ -755,7 +755,7 @@ makeMatcherAutoMarshall(ReturnType (*Fun
BuildReturnTypeVector<ReturnType>::build(RetTypes);
ArgKind AKs[] = { ArgTypeTraits<ArgType1>::getKind(),
ArgTypeTraits<ArgType2>::getKind() };
- return llvm::make_unique<FixedArgCountMatcherDescriptor>(
+ return std::make_unique<FixedArgCountMatcherDescriptor>(
matcherMarshall2<ReturnType, ArgType1, ArgType2>,
reinterpret_cast<void (*)()>(Func), MatcherName, RetTypes, AKs);
}
@@ -766,7 +766,7 @@ template <typename ResultT, typename Arg
std::unique_ptr<MatcherDescriptor> makeMatcherAutoMarshall(
ast_matchers::internal::VariadicFunction<ResultT, ArgT, Func> VarFunc,
StringRef MatcherName) {
- return llvm::make_unique<VariadicFuncMatcherDescriptor>(VarFunc, MatcherName);
+ return std::make_unique<VariadicFuncMatcherDescriptor>(VarFunc, MatcherName);
}
/// Overload for VariadicDynCastAllOfMatchers.
@@ -778,7 +778,7 @@ std::unique_ptr<MatcherDescriptor> makeM
ast_matchers::internal::VariadicDynCastAllOfMatcher<BaseT, DerivedT>
VarFunc,
StringRef MatcherName) {
- return llvm::make_unique<DynCastAllOfMatcherDescriptor>(VarFunc, MatcherName);
+ return std::make_unique<DynCastAllOfMatcherDescriptor>(VarFunc, MatcherName);
}
/// Argument adaptative overload.
@@ -791,7 +791,7 @@ std::unique_ptr<MatcherDescriptor> makeM
std::vector<std::unique_ptr<MatcherDescriptor>> Overloads;
AdaptativeOverloadCollector<ArgumentAdapterT, FromTypes, ToTypes>(MatcherName,
Overloads);
- return llvm::make_unique<OverloadedMatcherDescriptor>(Overloads);
+ return std::make_unique<OverloadedMatcherDescriptor>(Overloads);
}
template <template <typename ToArg, typename FromArg> class ArgumentAdapterT,
@@ -810,7 +810,7 @@ std::unique_ptr<MatcherDescriptor> makeM
ast_matchers::internal::VariadicOperatorMatcherFunc<MinCount, MaxCount>
Func,
StringRef MatcherName) {
- return llvm::make_unique<VariadicOperatorMatcherDescriptor>(
+ return std::make_unique<VariadicOperatorMatcherDescriptor>(
MinCount, MaxCount, Func.Op, MatcherName);
}
Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp (original)
+++ cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp Wed Aug 14 16:04:18 2019
@@ -71,7 +71,7 @@ void RegistryMaps::registerMatcher(
#define REGISTER_MATCHER_OVERLOAD(name) \
registerMatcher(#name, \
- llvm::make_unique<internal::OverloadedMatcherDescriptor>(name##Callbacks))
+ std::make_unique<internal::OverloadedMatcherDescriptor>(name##Callbacks))
#define SPECIFIC_MATCHER_OVERLOAD(name, Id) \
static_cast<::clang::ast_matchers::name##_Type##Id>( \
Modified: cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp (original)
+++ cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp Wed Aug 14 16:04:18 2019
@@ -302,7 +302,7 @@ AnalysisDeclContext *AnalysisDeclContext
std::unique_ptr<AnalysisDeclContext> &AC = Contexts[D];
if (!AC)
- AC = llvm::make_unique<AnalysisDeclContext>(this, D, cfgBuildOptions);
+ AC = std::make_unique<AnalysisDeclContext>(this, D, cfgBuildOptions);
return AC.get();
}
Modified: cfe/trunk/lib/Analysis/CallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CallGraph.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CallGraph.cpp (original)
+++ cfe/trunk/lib/Analysis/CallGraph.cpp Wed Aug 14 16:04:18 2019
@@ -166,7 +166,7 @@ CallGraphNode *CallGraph::getOrInsertNod
if (Node)
return Node.get();
- Node = llvm::make_unique<CallGraphNode>(F);
+ Node = std::make_unique<CallGraphNode>(F);
// Make Root node a parent of all functions to make sure all are reachable.
if (F)
Root->addCallee(Node.get());
Modified: cfe/trunk/lib/Analysis/Consumed.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Consumed.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/Consumed.cpp (original)
+++ cfe/trunk/lib/Analysis/Consumed.cpp Wed Aug 14 16:04:18 2019
@@ -1026,7 +1026,7 @@ void ConsumedBlockInfo::addInfo(
} else if (OwnedStateMap)
Entry = std::move(OwnedStateMap);
else
- Entry = llvm::make_unique<ConsumedStateMap>(*StateMap);
+ Entry = std::make_unique<ConsumedStateMap>(*StateMap);
}
void ConsumedBlockInfo::addInfo(const CFGBlock *Block,
@@ -1058,7 +1058,7 @@ ConsumedBlockInfo::getInfo(const CFGBloc
assert(Block && "Block pointer must not be NULL");
auto &Entry = StateMapsArray[Block->getBlockID()];
- return isBackEdgeTarget(Block) ? llvm::make_unique<ConsumedStateMap>(*Entry)
+ return isBackEdgeTarget(Block) ? std::make_unique<ConsumedStateMap>(*Entry)
: std::move(Entry);
}
@@ -1317,7 +1317,7 @@ void ConsumedAnalyzer::run(AnalysisDeclC
BlockInfo = ConsumedBlockInfo(CFGraph->getNumBlockIDs(), SortedGraph);
- CurrStates = llvm::make_unique<ConsumedStateMap>();
+ CurrStates = std::make_unique<ConsumedStateMap>();
ConsumedStmtVisitor Visitor(*this, CurrStates.get());
// Add all trackable parameters to the state map.
Modified: cfe/trunk/lib/Analysis/ThreadSafety.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ThreadSafety.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/ThreadSafety.cpp (original)
+++ cfe/trunk/lib/Analysis/ThreadSafety.cpp Wed Aug 14 16:04:18 2019
@@ -882,7 +882,7 @@ public:
StringRef DiagKind) const override {
FSet.removeLock(FactMan, Cp);
if (!Cp.negative()) {
- FSet.addLock(FactMan, llvm::make_unique<LockableFactEntry>(
+ FSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
!Cp, LK_Exclusive, UnlockLoc));
}
}
@@ -987,7 +987,7 @@ private:
} else {
FSet.removeLock(FactMan, !Cp);
FSet.addLock(FactMan,
- llvm::make_unique<LockableFactEntry>(Cp, kind, loc));
+ std::make_unique<LockableFactEntry>(Cp, kind, loc));
}
}
@@ -996,7 +996,7 @@ private:
StringRef DiagKind) const {
if (FSet.findLock(FactMan, Cp)) {
FSet.removeLock(FactMan, Cp);
- FSet.addLock(FactMan, llvm::make_unique<LockableFactEntry>(
+ FSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
!Cp, LK_Exclusive, loc));
} else if (Handler) {
Handler->handleUnmatchedUnlock(DiagKind, Cp.toString(), loc);
@@ -1551,11 +1551,11 @@ void ThreadSafetyAnalyzer::getEdgeLockse
// Add and remove locks.
SourceLocation Loc = Exp->getExprLoc();
for (const auto &ExclusiveLockToAdd : ExclusiveLocksToAdd)
- addLock(Result, llvm::make_unique<LockableFactEntry>(ExclusiveLockToAdd,
+ addLock(Result, std::make_unique<LockableFactEntry>(ExclusiveLockToAdd,
LK_Exclusive, Loc),
CapDiagKind);
for (const auto &SharedLockToAdd : SharedLocksToAdd)
- addLock(Result, llvm::make_unique<LockableFactEntry>(SharedLockToAdd,
+ addLock(Result, std::make_unique<LockableFactEntry>(SharedLockToAdd,
LK_Shared, Loc),
CapDiagKind);
}
@@ -1840,7 +1840,7 @@ void BuildLockset::handleCall(const Expr
Analyzer->getMutexIDs(AssertLocks, A, Exp, D, VD);
for (const auto &AssertLock : AssertLocks)
Analyzer->addLock(FSet,
- llvm::make_unique<LockableFactEntry>(
+ std::make_unique<LockableFactEntry>(
AssertLock, LK_Exclusive, Loc, false, true),
ClassifyDiagnostic(A));
break;
@@ -1852,7 +1852,7 @@ void BuildLockset::handleCall(const Expr
Analyzer->getMutexIDs(AssertLocks, A, Exp, D, VD);
for (const auto &AssertLock : AssertLocks)
Analyzer->addLock(FSet,
- llvm::make_unique<LockableFactEntry>(
+ std::make_unique<LockableFactEntry>(
AssertLock, LK_Shared, Loc, false, true),
ClassifyDiagnostic(A));
break;
@@ -1864,7 +1864,7 @@ void BuildLockset::handleCall(const Expr
Analyzer->getMutexIDs(AssertLocks, A, Exp, D, VD);
for (const auto &AssertLock : AssertLocks)
Analyzer->addLock(FSet,
- llvm::make_unique<LockableFactEntry>(
+ std::make_unique<LockableFactEntry>(
AssertLock,
A->isShared() ? LK_Shared : LK_Exclusive, Loc,
false, true),
@@ -1928,11 +1928,11 @@ void BuildLockset::handleCall(const Expr
// Add locks.
for (const auto &M : ExclusiveLocksToAdd)
- Analyzer->addLock(FSet, llvm::make_unique<LockableFactEntry>(
+ Analyzer->addLock(FSet, std::make_unique<LockableFactEntry>(
M, LK_Exclusive, Loc, isScopedVar),
CapDiagKind);
for (const auto &M : SharedLocksToAdd)
- Analyzer->addLock(FSet, llvm::make_unique<LockableFactEntry>(
+ Analyzer->addLock(FSet, std::make_unique<LockableFactEntry>(
M, LK_Shared, Loc, isScopedVar),
CapDiagKind);
@@ -1944,7 +1944,7 @@ void BuildLockset::handleCall(const Expr
// FIXME: does this store a pointer to DRE?
CapabilityExpr Scp = Analyzer->SxBuilder.translateAttrExpr(&DRE, nullptr);
- auto ScopedEntry = llvm::make_unique<ScopedLockableFactEntry>(Scp, MLoc);
+ auto ScopedEntry = std::make_unique<ScopedLockableFactEntry>(Scp, MLoc);
for (const auto &M : ExclusiveLocksToAdd)
ScopedEntry->addExclusiveLock(M);
for (const auto &M : ScopedExclusiveReqs)
@@ -2349,12 +2349,12 @@ void ThreadSafetyAnalyzer::runAnalysis(A
// FIXME -- Loc can be wrong here.
for (const auto &Mu : ExclusiveLocksToAdd) {
- auto Entry = llvm::make_unique<LockableFactEntry>(Mu, LK_Exclusive, Loc);
+ auto Entry = std::make_unique<LockableFactEntry>(Mu, LK_Exclusive, Loc);
Entry->setDeclared(true);
addLock(InitialLockset, std::move(Entry), CapDiagKind, true);
}
for (const auto &Mu : SharedLocksToAdd) {
- auto Entry = llvm::make_unique<LockableFactEntry>(Mu, LK_Shared, Loc);
+ auto Entry = std::make_unique<LockableFactEntry>(Mu, LK_Shared, Loc);
Entry->setDeclared(true);
addLock(InitialLockset, std::move(Entry), CapDiagKind, true);
}
@@ -2523,10 +2523,10 @@ void ThreadSafetyAnalyzer::runAnalysis(A
// issue the appropriate warning.
// FIXME: the location here is not quite right.
for (const auto &Lock : ExclusiveLocksAcquired)
- ExpectedExitSet.addLock(FactMan, llvm::make_unique<LockableFactEntry>(
+ ExpectedExitSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
Lock, LK_Exclusive, D->getLocation()));
for (const auto &Lock : SharedLocksAcquired)
- ExpectedExitSet.addLock(FactMan, llvm::make_unique<LockableFactEntry>(
+ ExpectedExitSet.addLock(FactMan, std::make_unique<LockableFactEntry>(
Lock, LK_Shared, D->getLocation()));
for (const auto &Lock : LocksReleased)
ExpectedExitSet.removeLock(FactMan, Lock);
Modified: cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp (original)
+++ cfe/trunk/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp Wed Aug 14 16:04:18 2019
@@ -37,7 +37,7 @@ void MainCallChecker::checkPreStmt(const
BT.reset(new BugType(this, "call to main", "example analyzer plugin"));
std::unique_ptr<BugReport> report =
- llvm::make_unique<BugReport>(*BT, BT->getName(), N);
+ std::make_unique<BugReport>(*BT, BT->getName(), N);
report->addRange(Callee->getSourceRange());
C.emitReport(std::move(report));
}
Modified: cfe/trunk/lib/Basic/FileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileManager.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileManager.cpp (original)
+++ cfe/trunk/lib/Basic/FileManager.cpp Wed Aug 14 16:04:18 2019
@@ -98,7 +98,7 @@ void FileManager::addAncestorsAsVirtualD
return;
// Add the virtual directory to the cache.
- auto UDE = llvm::make_unique<DirectoryEntry>();
+ auto UDE = std::make_unique<DirectoryEntry>();
UDE->Name = NamedDirEnt.first();
NamedDirEnt.second = *UDE.get();
VirtualDirectoryEntries.push_back(std::move(UDE));
@@ -345,7 +345,7 @@ FileManager::getVirtualFile(StringRef Fi
UFE->IsNamedPipe = Status.getType() == llvm::sys::fs::file_type::fifo_file;
fillRealPathName(UFE, Status.getName());
} else {
- VirtualFileEntries.push_back(llvm::make_unique<FileEntry>());
+ VirtualFileEntries.push_back(std::make_unique<FileEntry>());
UFE = VirtualFileEntries.back().get();
NamedFileEnt.second = *UFE;
}
Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Wed Aug 14 16:04:18 2019
@@ -505,7 +505,7 @@ llvm::MemoryBuffer *SourceManager::getFa
const SrcMgr::ContentCache *
SourceManager::getFakeContentCacheForRecovery() const {
if (!FakeContentCacheForRecovery) {
- FakeContentCacheForRecovery = llvm::make_unique<SrcMgr::ContentCache>();
+ FakeContentCacheForRecovery = std::make_unique<SrcMgr::ContentCache>();
FakeContentCacheForRecovery->replaceBuffer(getFakeBufferForRecovery(),
/*DoNotFree=*/true);
}
@@ -1927,7 +1927,7 @@ SourceManager::getMacroArgExpandedLocati
std::unique_ptr<MacroArgsMap> &MacroArgsCache = MacroArgsCacheMap[FID];
if (!MacroArgsCache) {
- MacroArgsCache = llvm::make_unique<MacroArgsMap>();
+ MacroArgsCache = std::make_unique<MacroArgsMap>();
computeMacroArgsCache(*MacroArgsCache, FID);
}
@@ -2256,13 +2256,13 @@ SourceManagerForFile::SourceManagerForFi
// This is passed to `SM` as reference, so the pointer has to be referenced
// in `Environment` so that `FileMgr` can out-live this function scope.
FileMgr =
- llvm::make_unique<FileManager>(FileSystemOptions(), InMemoryFileSystem);
+ std::make_unique<FileManager>(FileSystemOptions(), InMemoryFileSystem);
// This is passed to `SM` as reference, so the pointer has to be referenced
// by `Environment` due to the same reason above.
- Diagnostics = llvm::make_unique<DiagnosticsEngine>(
+ Diagnostics = std::make_unique<DiagnosticsEngine>(
IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs),
new DiagnosticOptions);
- SourceMgr = llvm::make_unique<SourceManager>(*Diagnostics, *FileMgr);
+ SourceMgr = std::make_unique<SourceManager>(*Diagnostics, *FileMgr);
FileID ID = SourceMgr->createFileID(*FileMgr->getFile(FileName),
SourceLocation(), clang::SrcMgr::C_User);
assert(ID.isValid());
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Wed Aug 14 16:04:18 2019
@@ -119,7 +119,7 @@ class EmitAssemblyHelper {
std::unique_ptr<llvm::ToolOutputFile> openOutputFile(StringRef Path) {
std::error_code EC;
- auto F = llvm::make_unique<llvm::ToolOutputFile>(Path, EC,
+ auto F = std::make_unique<llvm::ToolOutputFile>(Path, EC,
llvm::sys::fs::OF_None);
if (EC) {
Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();
@@ -1424,7 +1424,7 @@ static void runThinLTOBackend(ModuleSumm
OwnedImports.push_back(std::move(*MBOrErr));
}
auto AddStream = [&](size_t Task) {
- return llvm::make_unique<lto::NativeObjectStream>(std::move(OS));
+ return std::make_unique<lto::NativeObjectStream>(std::move(OS));
};
lto::Config Conf;
if (CGOpts.SaveTempsFilePrefix != "") {
@@ -1536,7 +1536,7 @@ void clang::EmitBackendOutput(Diagnostic
// trying to read it. Also for some features, like CFI, we must skip
// the compilation as CombinedIndex does not contain all required
// information.
- EmptyModule = llvm::make_unique<llvm::Module>("empty", M->getContext());
+ EmptyModule = std::make_unique<llvm::Module>("empty", M->getContext());
EmptyModule->setTargetTriple(M->getTargetTriple());
M = EmptyModule.get();
}
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Wed Aug 14 16:04:18 2019
@@ -903,7 +903,7 @@ struct NoExpansion : TypeExpansion {
static std::unique_ptr<TypeExpansion>
getTypeExpansion(QualType Ty, const ASTContext &Context) {
if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty)) {
- return llvm::make_unique<ConstantArrayExpansion>(
+ return std::make_unique<ConstantArrayExpansion>(
AT->getElementType(), AT->getSize().getZExtValue());
}
if (const RecordType *RT = Ty->getAs<RecordType>()) {
@@ -947,13 +947,13 @@ getTypeExpansion(QualType Ty, const ASTC
Fields.push_back(FD);
}
}
- return llvm::make_unique<RecordExpansion>(std::move(Bases),
+ return std::make_unique<RecordExpansion>(std::move(Bases),
std::move(Fields));
}
if (const ComplexType *CT = Ty->getAs<ComplexType>()) {
- return llvm::make_unique<ComplexExpansion>(CT->getElementType());
+ return std::make_unique<ComplexExpansion>(CT->getElementType());
}
- return llvm::make_unique<NoExpansion>();
+ return std::make_unique<NoExpansion>();
}
static int getExpansionSize(QualType Ty, const ASTContext &Context) {
Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Wed Aug 14 16:04:18 2019
@@ -2030,7 +2030,7 @@ llvm::Function *CGOpenMPRuntimeNVPTX::em
auto I = Rt.FunctionGlobalizedDecls.try_emplace(CGF.CurFn).first;
I->getSecond().GlobalRecord = GlobalizedRD;
I->getSecond().MappedParams =
- llvm::make_unique<CodeGenFunction::OMPMapVars>();
+ std::make_unique<CodeGenFunction::OMPMapVars>();
DeclToAddrMapTy &Data = I->getSecond().LocalVarData;
for (const auto &Pair : MappedDeclsFields) {
assert(Pair.getFirst()->isCanonicalDecl() &&
@@ -4637,7 +4637,7 @@ void CGOpenMPRuntimeNVPTX::emitFunctionP
return;
auto I = FunctionGlobalizedDecls.try_emplace(CGF.CurFn).first;
I->getSecond().MappedParams =
- llvm::make_unique<CodeGenFunction::OMPMapVars>();
+ std::make_unique<CodeGenFunction::OMPMapVars>();
I->getSecond().GlobalRecord = GlobalizedVarsRecord;
I->getSecond().EscapedParameters.insert(
VarChecker.getEscapedParameters().begin(),
Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Wed Aug 14 16:04:18 2019
@@ -261,7 +261,7 @@ namespace clang {
std::unique_ptr<DiagnosticHandler> OldDiagnosticHandler =
Ctx.getDiagnosticHandler();
- Ctx.setDiagnosticHandler(llvm::make_unique<ClangDiagnosticHandler>(
+ Ctx.setDiagnosticHandler(std::make_unique<ClangDiagnosticHandler>(
CodeGenOpts, this));
Expected<std::unique_ptr<llvm::ToolOutputFile>> OptRecordFileOrErr =
@@ -915,7 +915,7 @@ CodeGenAction::CreateASTConsumer(Compile
if (CI.getCodeGenOpts().getDebugInfo() != codegenoptions::NoDebugInfo &&
CI.getCodeGenOpts().MacroDebugInfo) {
std::unique_ptr<PPCallbacks> Callbacks =
- llvm::make_unique<MacroPPCallbacks>(BEConsumer->getCodeGenerator(),
+ std::make_unique<MacroPPCallbacks>(BEConsumer->getCodeGenerator(),
CI.getPreprocessor());
CI.getPreprocessor().addPPCallbacks(std::move(Callbacks));
}
@@ -976,7 +976,7 @@ CodeGenAction::loadModule(MemoryBufferRe
// the file was already processed by indexing and will be passed to the
// linker using merged object file.
if (!Bm) {
- auto M = llvm::make_unique<llvm::Module>("empty", *VMContext);
+ auto M = std::make_unique<llvm::Module>("empty", *VMContext);
M->setTargetTriple(CI.getTargetOpts().Triple);
return M;
}
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Wed Aug 14 16:04:18 2019
@@ -5815,7 +5815,7 @@ void CodeGenModule::getFunctionFeatureMa
llvm::SanitizerStatReport &CodeGenModule::getSanStats() {
if (!SanStats)
- SanStats = llvm::make_unique<llvm::SanitizerStatReport>(&getModule());
+ SanStats = std::make_unique<llvm::SanitizerStatReport>(&getModule());
return *SanStats;
}
Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenPGO.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Wed Aug 14 16:04:18 2019
@@ -980,7 +980,7 @@ void CodeGenPGO::loadRegionCounts(llvm::
return;
}
ProfRecord =
- llvm::make_unique<llvm::InstrProfRecord>(std::move(RecordExpected.get()));
+ std::make_unique<llvm::InstrProfRecord>(std::move(RecordExpected.get()));
RegionCounts = ProfRecord->Counts;
}
Modified: cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp (original)
+++ cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp Wed Aug 14 16:04:18 2019
@@ -297,7 +297,7 @@ public:
Diags, HeaderSearchOpts, CodeGenOpts, TargetOpts, LangOpts,
Ctx.getTargetInfo().getDataLayout(), M.get(),
BackendAction::Backend_EmitLL,
- llvm::make_unique<llvm::raw_svector_ostream>(Buffer));
+ std::make_unique<llvm::raw_svector_ostream>(Buffer));
llvm::dbgs() << Buffer;
});
@@ -321,7 +321,7 @@ ObjectFilePCHContainerWriter::CreatePCHC
const std::string &OutputFileName,
std::unique_ptr<llvm::raw_pwrite_stream> OS,
std::shared_ptr<PCHBuffer> Buffer) const {
- return llvm::make_unique<PCHContainerGenerator>(
+ return std::make_unique<PCHContainerGenerator>(
CI, MainFileName, OutputFileName, std::move(OS), Buffer);
}
Modified: cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp (original)
+++ cfe/trunk/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp Wed Aug 14 16:04:18 2019
@@ -186,7 +186,7 @@ void DirectoryWatcherLinux::InotifyPolli
struct Buffer {
alignas(struct inotify_event) char buffer[EventBufferLength];
};
- auto ManagedBuffer = llvm::make_unique<Buffer>();
+ auto ManagedBuffer = std::make_unique<Buffer>();
char *const Buf = ManagedBuffer->buffer;
const int EpollFD = epoll_create1(EPOLL_CLOEXEC);
@@ -354,7 +354,7 @@ llvm::Expected<std::unique_ptr<Directory
std::string("SemaphorePipe::create() error: ") + strerror(errno),
llvm::inconvertibleErrorCode());
- return llvm::make_unique<DirectoryWatcherLinux>(
+ return std::make_unique<DirectoryWatcherLinux>(
Path, Receiver, WaitForInitialSync, InotifyFD, InotifyWD,
std::move(*InotifyPollingStopper));
}
Modified: cfe/trunk/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp (original)
+++ cfe/trunk/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp Wed Aug 14 16:04:18 2019
@@ -217,7 +217,7 @@ llvm::Expected<std::unique_ptr<Directory
assert(EventStream && "EventStream expected to be non-null");
std::unique_ptr<DirectoryWatcher> Result =
- llvm::make_unique<DirectoryWatcherMac>(EventStream, Receiver, Path);
+ std::make_unique<DirectoryWatcherMac>(EventStream, Receiver, Path);
// We need to copy the data so the lifetime is ok after a const copy is made
// for the block.
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Wed Aug 14 16:04:18 2019
@@ -626,7 +626,7 @@ void Driver::CreateOffloadingDeviceToolC
// because the device toolchain we create depends on both.
auto &CudaTC = ToolChains[CudaTriple.str() + "/" + HostTriple.str()];
if (!CudaTC) {
- CudaTC = llvm::make_unique<toolchains::CudaToolChain>(
+ CudaTC = std::make_unique<toolchains::CudaToolChain>(
*this, CudaTriple, *HostTC, C.getInputArgs(), OFK);
}
C.addOffloadDeviceToolChain(CudaTC.get(), OFK);
@@ -641,7 +641,7 @@ void Driver::CreateOffloadingDeviceToolC
// because the device toolchain we create depends on both.
auto &HIPTC = ToolChains[HIPTriple.str() + "/" + HostTriple.str()];
if (!HIPTC) {
- HIPTC = llvm::make_unique<toolchains::HIPToolChain>(
+ HIPTC = std::make_unique<toolchains::HIPToolChain>(
*this, HIPTriple, *HostTC, C.getInputArgs());
}
C.addOffloadDeviceToolChain(HIPTC.get(), OFK);
@@ -699,7 +699,7 @@ void Driver::CreateOffloadingDeviceToolC
auto &CudaTC =
ToolChains[TT.str() + "/" + HostTC->getTriple().normalize()];
if (!CudaTC)
- CudaTC = llvm::make_unique<toolchains::CudaToolChain>(
+ CudaTC = std::make_unique<toolchains::CudaToolChain>(
*this, TT, *HostTC, C.getInputArgs(), Action::OFK_OpenMP);
TC = CudaTC.get();
} else
@@ -760,7 +760,7 @@ bool Driver::readConfigFile(StringRef Fi
llvm::sys::path::native(CfgFileName);
ConfigFile = CfgFileName.str();
bool ContainErrors;
- CfgOptions = llvm::make_unique<InputArgList>(
+ CfgOptions = std::make_unique<InputArgList>(
ParseArgStrings(NewCfgArgs, IsCLMode(), ContainErrors));
if (ContainErrors) {
CfgOptions.reset();
@@ -954,7 +954,7 @@ Compilation *Driver::BuildCompilation(Ar
// Arguments specified in command line.
bool ContainsError;
- CLOptions = llvm::make_unique<InputArgList>(
+ CLOptions = std::make_unique<InputArgList>(
ParseArgStrings(ArgList.slice(1), IsCLMode(), ContainsError));
// Try parsing configuration file.
@@ -1000,7 +1000,7 @@ Compilation *Driver::BuildCompilation(Ar
if (!CLModePassThroughArgList.empty()) {
// Parse any pass through args using default clang processing rather
// than clang-cl processing.
- auto CLModePassThroughOptions = llvm::make_unique<InputArgList>(
+ auto CLModePassThroughOptions = std::make_unique<InputArgList>(
ParseArgStrings(CLModePassThroughArgList, false, ContainsError));
if (!ContainsError)
@@ -1093,7 +1093,7 @@ Compilation *Driver::BuildCompilation(Ar
}
std::unique_ptr<llvm::opt::InputArgList> UArgs =
- llvm::make_unique<InputArgList>(std::move(Args));
+ std::make_unique<InputArgList>(std::move(Args));
// Perform the default argument translations.
DerivedArgList *TranslatedArgs = TranslateInputArgs(*UArgs);
@@ -4605,152 +4605,152 @@ const ToolChain &Driver::getToolChain(co
if (!TC) {
switch (Target.getOS()) {
case llvm::Triple::Haiku:
- TC = llvm::make_unique<toolchains::Haiku>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Haiku>(*this, Target, Args);
break;
case llvm::Triple::Ananas:
- TC = llvm::make_unique<toolchains::Ananas>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Ananas>(*this, Target, Args);
break;
case llvm::Triple::CloudABI:
- TC = llvm::make_unique<toolchains::CloudABI>(*this, Target, Args);
+ TC = std::make_unique<toolchains::CloudABI>(*this, Target, Args);
break;
case llvm::Triple::Darwin:
case llvm::Triple::MacOSX:
case llvm::Triple::IOS:
case llvm::Triple::TvOS:
case llvm::Triple::WatchOS:
- TC = llvm::make_unique<toolchains::DarwinClang>(*this, Target, Args);
+ TC = std::make_unique<toolchains::DarwinClang>(*this, Target, Args);
break;
case llvm::Triple::DragonFly:
- TC = llvm::make_unique<toolchains::DragonFly>(*this, Target, Args);
+ TC = std::make_unique<toolchains::DragonFly>(*this, Target, Args);
break;
case llvm::Triple::OpenBSD:
- TC = llvm::make_unique<toolchains::OpenBSD>(*this, Target, Args);
+ TC = std::make_unique<toolchains::OpenBSD>(*this, Target, Args);
break;
case llvm::Triple::NetBSD:
- TC = llvm::make_unique<toolchains::NetBSD>(*this, Target, Args);
+ TC = std::make_unique<toolchains::NetBSD>(*this, Target, Args);
break;
case llvm::Triple::FreeBSD:
- TC = llvm::make_unique<toolchains::FreeBSD>(*this, Target, Args);
+ TC = std::make_unique<toolchains::FreeBSD>(*this, Target, Args);
break;
case llvm::Triple::Minix:
- TC = llvm::make_unique<toolchains::Minix>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Minix>(*this, Target, Args);
break;
case llvm::Triple::Linux:
case llvm::Triple::ELFIAMCU:
if (Target.getArch() == llvm::Triple::hexagon)
- TC = llvm::make_unique<toolchains::HexagonToolChain>(*this, Target,
+ TC = std::make_unique<toolchains::HexagonToolChain>(*this, Target,
Args);
else if ((Target.getVendor() == llvm::Triple::MipsTechnologies) &&
!Target.hasEnvironment())
- TC = llvm::make_unique<toolchains::MipsLLVMToolChain>(*this, Target,
+ TC = std::make_unique<toolchains::MipsLLVMToolChain>(*this, Target,
Args);
else if (Target.getArch() == llvm::Triple::ppc ||
Target.getArch() == llvm::Triple::ppc64 ||
Target.getArch() == llvm::Triple::ppc64le)
- TC = llvm::make_unique<toolchains::PPCLinuxToolChain>(*this, Target,
+ TC = std::make_unique<toolchains::PPCLinuxToolChain>(*this, Target,
Args);
else
- TC = llvm::make_unique<toolchains::Linux>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Linux>(*this, Target, Args);
break;
case llvm::Triple::NaCl:
- TC = llvm::make_unique<toolchains::NaClToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::NaClToolChain>(*this, Target, Args);
break;
case llvm::Triple::Fuchsia:
- TC = llvm::make_unique<toolchains::Fuchsia>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Fuchsia>(*this, Target, Args);
break;
case llvm::Triple::Solaris:
- TC = llvm::make_unique<toolchains::Solaris>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Solaris>(*this, Target, Args);
break;
case llvm::Triple::AMDHSA:
case llvm::Triple::AMDPAL:
case llvm::Triple::Mesa3D:
- TC = llvm::make_unique<toolchains::AMDGPUToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::AMDGPUToolChain>(*this, Target, Args);
break;
case llvm::Triple::Win32:
switch (Target.getEnvironment()) {
default:
if (Target.isOSBinFormatELF())
- TC = llvm::make_unique<toolchains::Generic_ELF>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Generic_ELF>(*this, Target, Args);
else if (Target.isOSBinFormatMachO())
- TC = llvm::make_unique<toolchains::MachO>(*this, Target, Args);
+ TC = std::make_unique<toolchains::MachO>(*this, Target, Args);
else
- TC = llvm::make_unique<toolchains::Generic_GCC>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Generic_GCC>(*this, Target, Args);
break;
case llvm::Triple::GNU:
- TC = llvm::make_unique<toolchains::MinGW>(*this, Target, Args);
+ TC = std::make_unique<toolchains::MinGW>(*this, Target, Args);
break;
case llvm::Triple::Itanium:
- TC = llvm::make_unique<toolchains::CrossWindowsToolChain>(*this, Target,
+ TC = std::make_unique<toolchains::CrossWindowsToolChain>(*this, Target,
Args);
break;
case llvm::Triple::MSVC:
case llvm::Triple::UnknownEnvironment:
if (Args.getLastArgValue(options::OPT_fuse_ld_EQ)
.startswith_lower("bfd"))
- TC = llvm::make_unique<toolchains::CrossWindowsToolChain>(
+ TC = std::make_unique<toolchains::CrossWindowsToolChain>(
*this, Target, Args);
else
TC =
- llvm::make_unique<toolchains::MSVCToolChain>(*this, Target, Args);
+ std::make_unique<toolchains::MSVCToolChain>(*this, Target, Args);
break;
}
break;
case llvm::Triple::PS4:
- TC = llvm::make_unique<toolchains::PS4CPU>(*this, Target, Args);
+ TC = std::make_unique<toolchains::PS4CPU>(*this, Target, Args);
break;
case llvm::Triple::Contiki:
- TC = llvm::make_unique<toolchains::Contiki>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Contiki>(*this, Target, Args);
break;
case llvm::Triple::Hurd:
- TC = llvm::make_unique<toolchains::Hurd>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Hurd>(*this, Target, Args);
break;
default:
// Of these targets, Hexagon is the only one that might have
// an OS of Linux, in which case it got handled above already.
switch (Target.getArch()) {
case llvm::Triple::tce:
- TC = llvm::make_unique<toolchains::TCEToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::TCEToolChain>(*this, Target, Args);
break;
case llvm::Triple::tcele:
- TC = llvm::make_unique<toolchains::TCELEToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::TCELEToolChain>(*this, Target, Args);
break;
case llvm::Triple::hexagon:
- TC = llvm::make_unique<toolchains::HexagonToolChain>(*this, Target,
+ TC = std::make_unique<toolchains::HexagonToolChain>(*this, Target,
Args);
break;
case llvm::Triple::lanai:
- TC = llvm::make_unique<toolchains::LanaiToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::LanaiToolChain>(*this, Target, Args);
break;
case llvm::Triple::xcore:
- TC = llvm::make_unique<toolchains::XCoreToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::XCoreToolChain>(*this, Target, Args);
break;
case llvm::Triple::wasm32:
case llvm::Triple::wasm64:
- TC = llvm::make_unique<toolchains::WebAssembly>(*this, Target, Args);
+ TC = std::make_unique<toolchains::WebAssembly>(*this, Target, Args);
break;
case llvm::Triple::avr:
- TC = llvm::make_unique<toolchains::AVRToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::AVRToolChain>(*this, Target, Args);
break;
case llvm::Triple::msp430:
TC =
- llvm::make_unique<toolchains::MSP430ToolChain>(*this, Target, Args);
+ std::make_unique<toolchains::MSP430ToolChain>(*this, Target, Args);
break;
case llvm::Triple::riscv32:
case llvm::Triple::riscv64:
- TC = llvm::make_unique<toolchains::RISCVToolChain>(*this, Target, Args);
+ TC = std::make_unique<toolchains::RISCVToolChain>(*this, Target, Args);
break;
default:
if (Target.getVendor() == llvm::Triple::Myriad)
- TC = llvm::make_unique<toolchains::MyriadToolChain>(*this, Target,
+ TC = std::make_unique<toolchains::MyriadToolChain>(*this, Target,
Args);
else if (toolchains::BareMetal::handlesTarget(Target))
- TC = llvm::make_unique<toolchains::BareMetal>(*this, Target, Args);
+ TC = std::make_unique<toolchains::BareMetal>(*this, Target, Args);
else if (Target.isOSBinFormatELF())
- TC = llvm::make_unique<toolchains::Generic_ELF>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Generic_ELF>(*this, Target, Args);
else if (Target.isOSBinFormatMachO())
- TC = llvm::make_unique<toolchains::MachO>(*this, Target, Args);
+ TC = std::make_unique<toolchains::MachO>(*this, Target, Args);
else
- TC = llvm::make_unique<toolchains::Generic_GCC>(*this, Target, Args);
+ TC = std::make_unique<toolchains::Generic_GCC>(*this, Target, Args);
}
}
}
Modified: cfe/trunk/lib/Driver/DriverOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/DriverOptions.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/DriverOptions.cpp (original)
+++ cfe/trunk/lib/Driver/DriverOptions.cpp Wed Aug 14 16:04:18 2019
@@ -40,7 +40,7 @@ public:
}
std::unique_ptr<OptTable> clang::driver::createDriverOptTable() {
- auto Result = llvm::make_unique<DriverOptTable>();
+ auto Result = std::make_unique<DriverOptTable>();
// Options.inc is included in DriverOptions.cpp, and calls OptTable's
// addValues function.
// Opt is a variable used in the code fragment in Options.inc.
Modified: cfe/trunk/lib/Driver/ToolChains/AMDGPU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/AMDGPU.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/AMDGPU.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/AMDGPU.cpp Wed Aug 14 16:04:18 2019
@@ -31,7 +31,7 @@ void amdgpu::Linker::ConstructJob(Compil
CmdArgs.push_back("-shared");
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
+ C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
CmdArgs, Inputs));
}
Modified: cfe/trunk/lib/Driver/ToolChains/AVR.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/AVR.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/AVR.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/AVR.cpp Wed Aug 14 16:04:18 2019
@@ -144,7 +144,7 @@ void AVR::Linker::ConstructJob(Compilati
CmdArgs.push_back(Args.MakeArgString(std::string("-m") + *FamilyName));
}
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
+ C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
CmdArgs, Inputs));
}
Modified: cfe/trunk/lib/Driver/ToolChains/Ananas.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Ananas.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Ananas.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Ananas.cpp Wed Aug 14 16:04:18 2019
@@ -39,7 +39,7 @@ void ananas::Assembler::ConstructJob(Com
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void ananas::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -123,7 +123,7 @@ void ananas::Linker::ConstructJob(Compil
}
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
// Ananas - Ananas tool chain which can call as(1) and ld(1) directly.
Modified: cfe/trunk/lib/Driver/ToolChains/BareMetal.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/BareMetal.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/BareMetal.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/BareMetal.cpp Wed Aug 14 16:04:18 2019
@@ -191,7 +191,7 @@ void baremetal::Linker::ConstructJob(Com
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
- C.addCommand(llvm::make_unique<Command>(JA, *this,
+ C.addCommand(std::make_unique<Command>(JA, *this,
Args.MakeArgString(TC.GetLinkerPath()),
CmdArgs, Inputs));
}
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Wed Aug 14 16:04:18 2019
@@ -2003,7 +2003,7 @@ void Clang::DumpCompilationDatabase(Comp
if (!CompilationDatabase) {
std::error_code EC;
- auto File = llvm::make_unique<llvm::raw_fd_ostream>(Filename, EC,
+ auto File = std::make_unique<llvm::raw_fd_ostream>(Filename, EC,
llvm::sys::fs::OF_Text);
if (EC) {
D.Diag(clang::diag::err_drv_compilationdatabase) << Filename
@@ -3804,7 +3804,7 @@ void Clang::ConstructJob(Compilation &C,
II.getInputArg().renderAsInput(Args, CmdArgs);
}
- C.addCommand(llvm::make_unique<Command>(JA, *this, D.getClangProgramPath(),
+ C.addCommand(std::make_unique<Command>(JA, *this, D.getClangProgramPath(),
CmdArgs, Inputs));
return;
}
@@ -5524,16 +5524,16 @@ void Clang::ConstructJob(Compilation &C,
(InputType == types::TY_C || InputType == types::TY_CXX)) {
auto CLCommand =
getCLFallback()->GetCommand(C, JA, Output, Inputs, Args, LinkingOutput);
- C.addCommand(llvm::make_unique<FallbackCommand>(
+ C.addCommand(std::make_unique<FallbackCommand>(
JA, *this, Exec, CmdArgs, Inputs, std::move(CLCommand)));
} else if (Args.hasArg(options::OPT__SLASH_fallback) &&
isa<PrecompileJobAction>(JA)) {
// In /fallback builds, run the main compilation even if the pch generation
// fails, so that the main compilation's fallback to cl.exe runs.
- C.addCommand(llvm::make_unique<ForceSuccessCommand>(JA, *this, Exec,
+ C.addCommand(std::make_unique<ForceSuccessCommand>(JA, *this, Exec,
CmdArgs, Inputs));
} else {
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
// Make the compile command echo its inputs for /showFilenames.
@@ -6260,7 +6260,7 @@ void ClangAs::ConstructJob(Compilation &
CmdArgs.push_back(Input.getFilename());
const char *Exec = getToolChain().getDriver().getClangProgramPath();
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
// Begin OffloadBundler
@@ -6343,7 +6343,7 @@ void OffloadBundler::ConstructJob(Compil
CmdArgs.push_back(TCArgs.MakeArgString(UB));
// All the inputs are encoded as commands.
- C.addCommand(llvm::make_unique<Command>(
+ C.addCommand(std::make_unique<Command>(
JA, *this,
TCArgs.MakeArgString(getToolChain().GetProgramPath(getShortName())),
CmdArgs, None));
@@ -6409,7 +6409,7 @@ void OffloadBundler::ConstructJobMultipl
CmdArgs.push_back("-unbundle");
// All the inputs are encoded as commands.
- C.addCommand(llvm::make_unique<Command>(
+ C.addCommand(std::make_unique<Command>(
JA, *this,
TCArgs.MakeArgString(getToolChain().GetProgramPath(getShortName())),
CmdArgs, None));
Modified: cfe/trunk/lib/Driver/ToolChains/CloudABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CloudABI.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CloudABI.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CloudABI.cpp Wed Aug 14 16:04:18 2019
@@ -92,7 +92,7 @@ void cloudabi::Linker::ConstructJob(Comp
CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtend.o")));
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
// CloudABI - CloudABI tool chain which can call ld(1) directly.
Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Wed Aug 14 16:04:18 2019
@@ -822,10 +822,10 @@ void tools::SplitDebugInfo(const ToolCha
InputInfo II(types::TY_Object, Output.getFilename(), Output.getFilename());
// First extract the dwo sections.
- C.addCommand(llvm::make_unique<Command>(JA, T, Exec, ExtractArgs, II));
+ C.addCommand(std::make_unique<Command>(JA, T, Exec, ExtractArgs, II));
// Then remove them from the original .o file.
- C.addCommand(llvm::make_unique<Command>(JA, T, Exec, StripArgs, II));
+ C.addCommand(std::make_unique<Command>(JA, T, Exec, StripArgs, II));
}
// Claim options we don't want to warn if they are unused. We do this for
Modified: cfe/trunk/lib/Driver/ToolChains/CrossWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CrossWindows.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CrossWindows.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CrossWindows.cpp Wed Aug 14 16:04:18 2019
@@ -57,7 +57,7 @@ void tools::CrossWindows::Assembler::Con
const std::string Assembler = TC.GetProgramPath("as");
Exec = Args.MakeArgString(Assembler);
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void tools::CrossWindows::Linker::ConstructJob(
@@ -202,7 +202,7 @@ void tools::CrossWindows::Linker::Constr
Exec = Args.MakeArgString(TC.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
CrossWindowsToolChain::CrossWindowsToolChain(const Driver &D,
Modified: cfe/trunk/lib/Driver/ToolChains/Cuda.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Cuda.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Cuda.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Cuda.cpp Wed Aug 14 16:04:18 2019
@@ -422,7 +422,7 @@ void NVPTX::Assembler::ConstructJob(Comp
Exec = A->getValue();
else
Exec = Args.MakeArgString(TC.GetProgramPath("ptxas"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
static bool shouldIncludePTX(const ArgList &Args, const char *gpu_arch) {
@@ -488,7 +488,7 @@ void NVPTX::Linker::ConstructJob(Compila
CmdArgs.push_back(Args.MakeArgString(A));
const char *Exec = Args.MakeArgString(TC.GetProgramPath("fatbinary"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void NVPTX::OpenMPLinker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -567,7 +567,7 @@ void NVPTX::OpenMPLinker::ConstructJob(C
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath("nvlink"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// CUDA toolchain. Our assembler is ptxas, and our "linker" is fatbinary,
Modified: cfe/trunk/lib/Driver/ToolChains/Darwin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Darwin.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Darwin.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Darwin.cpp Wed Aug 14 16:04:18 2019
@@ -146,7 +146,7 @@ void darwin::Assembler::ConstructJob(Com
// asm_final spec is empty.
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void darwin::MachOTool::anchor() {}
@@ -451,7 +451,7 @@ void darwin::Linker::ConstructJob(Compil
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath("touch"));
CmdArgs.push_back(Output.getFilename());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, None));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, None));
return;
}
@@ -653,7 +653,7 @@ void darwin::Linker::ConstructJob(Compil
const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());
std::unique_ptr<Command> Cmd =
- llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs);
+ std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs);
Cmd->setInputFileList(std::move(InputFileList));
C.addCommand(std::move(Cmd));
}
@@ -677,7 +677,7 @@ void darwin::Lipo::ConstructJob(Compilat
}
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("lipo"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void darwin::Dsymutil::ConstructJob(Compilation &C, const JobAction &JA,
@@ -697,7 +697,7 @@ void darwin::Dsymutil::ConstructJob(Comp
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath("dsymutil"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void darwin::VerifyDebug::ConstructJob(Compilation &C, const JobAction &JA,
@@ -720,7 +720,7 @@ void darwin::VerifyDebug::ConstructJob(C
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath("dwarfdump"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
MachO::MachO(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
Modified: cfe/trunk/lib/Driver/ToolChains/DragonFly.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/DragonFly.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/DragonFly.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/DragonFly.cpp Wed Aug 14 16:04:18 2019
@@ -45,7 +45,7 @@ void dragonfly::Assembler::ConstructJob(
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void dragonfly::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -169,7 +169,7 @@ void dragonfly::Linker::ConstructJob(Com
getToolChain().addProfileRTLibs(Args, CmdArgs);
const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly.
Modified: cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp Wed Aug 14 16:04:18 2019
@@ -112,7 +112,7 @@ void freebsd::Assembler::ConstructJob(Co
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -339,7 +339,7 @@ void freebsd::Linker::ConstructJob(Compi
ToolChain.addProfileRTLibs(Args, CmdArgs);
const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// FreeBSD - FreeBSD tool chain which can call as(1) and ld(1) directly.
Modified: cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp Wed Aug 14 16:04:18 2019
@@ -156,7 +156,7 @@ void fuchsia::Linker::ConstructJob(Compi
CmdArgs.push_back("-lc");
}
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// Fuchsia - Fuchsia tool chain which can call as(1) and ld(1) directly.
Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Gnu.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Wed Aug 14 16:04:18 2019
@@ -189,7 +189,7 @@ void tools::gcc::Common::ConstructJob(Co
GCCName = "gcc";
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath(GCCName));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void tools::gcc::Preprocessor::RenderExtraToolArgs(
@@ -627,7 +627,7 @@ void tools::gnutools::Linker::ConstructJ
*this);
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void tools::gnutools::Assembler::ConstructJob(Compilation &C,
@@ -878,7 +878,7 @@ void tools::gnutools::Assembler::Constru
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
// Handle the debug info splitting at object creation time if we're
// creating an object.
Modified: cfe/trunk/lib/Driver/ToolChains/HIP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/HIP.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/HIP.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/HIP.cpp Wed Aug 14 16:04:18 2019
@@ -69,7 +69,7 @@ const char *AMDGCN::Linker::constructLLV
SmallString<128> ExecPath(C.getDriver().Dir);
llvm::sys::path::append(ExecPath, "llvm-link");
const char *Exec = Args.MakeArgString(ExecPath);
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
return OutputFileName;
}
@@ -117,7 +117,7 @@ const char *AMDGCN::Linker::constructOpt
SmallString<128> OptPath(C.getDriver().Dir);
llvm::sys::path::append(OptPath, "opt");
const char *OptExec = Args.MakeArgString(OptPath);
- C.addCommand(llvm::make_unique<Command>(JA, *this, OptExec, OptArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, OptExec, OptArgs, Inputs));
return OutputFileName;
}
@@ -159,7 +159,7 @@ const char *AMDGCN::Linker::constructLlc
SmallString<128> LlcPath(C.getDriver().Dir);
llvm::sys::path::append(LlcPath, "llc");
const char *Llc = Args.MakeArgString(LlcPath);
- C.addCommand(llvm::make_unique<Command>(JA, *this, Llc, LlcArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Llc, LlcArgs, Inputs));
return LlcOutputFile;
}
@@ -175,7 +175,7 @@ void AMDGCN::Linker::constructLldCommand
SmallString<128> LldPath(C.getDriver().Dir);
llvm::sys::path::append(LldPath, "lld");
const char *Lld = Args.MakeArgString(LldPath);
- C.addCommand(llvm::make_unique<Command>(JA, *this, Lld, LldArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Lld, LldArgs, Inputs));
}
// Construct a clang-offload-bundler command to bundle code objects for
@@ -209,7 +209,7 @@ void AMDGCN::constructHIPFatbinCommand(C
SmallString<128> BundlerPath(C.getDriver().Dir);
llvm::sys::path::append(BundlerPath, "clang-offload-bundler");
const char *Bundler = Args.MakeArgString(BundlerPath);
- C.addCommand(llvm::make_unique<Command>(JA, T, Bundler, BundlerArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, T, Bundler, BundlerArgs, Inputs));
}
// For amdgcn the inputs of the linker job are device bitcode and output is
Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp Wed Aug 14 16:04:18 2019
@@ -183,7 +183,7 @@ void hexagon::Assembler::ConstructJob(Co
}
auto *Exec = Args.MakeArgString(HTC.GetProgramPath(AsName));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void hexagon::Linker::RenderExtraToolArgs(const JobAction &JA,
@@ -370,7 +370,7 @@ void hexagon::Linker::ConstructJob(Compi
LinkingOutput);
const char *Exec = Args.MakeArgString(HTC.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
// Hexagon tools end.
Modified: cfe/trunk/lib/Driver/ToolChains/MSP430.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MSP430.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/MSP430.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/MSP430.cpp Wed Aug 14 16:04:18 2019
@@ -227,6 +227,6 @@ void msp430::Linker::ConstructJob(Compil
}
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
+ C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
CmdArgs, Inputs));
}
Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MSVC.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/MSVC.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/MSVC.cpp Wed Aug 14 16:04:18 2019
@@ -565,7 +565,7 @@ void visualstudio::Linker::ConstructJob(
linkPath = TC.GetProgramPath(Linker.str().c_str());
}
- auto LinkCmd = llvm::make_unique<Command>(
+ auto LinkCmd = std::make_unique<Command>(
JA, *this, Args.MakeArgString(linkPath), CmdArgs, Inputs);
if (!Environment.empty())
LinkCmd->setEnvironment(Environment);
@@ -695,7 +695,7 @@ std::unique_ptr<Command> visualstudio::C
CmdArgs.push_back(Fo);
std::string Exec = FindVisualStudioExecutable(getToolChain(), "cl.exe");
- return llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
+ return std::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
CmdArgs, Inputs);
}
Modified: cfe/trunk/lib/Driver/ToolChains/MinGW.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MinGW.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/MinGW.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/MinGW.cpp Wed Aug 14 16:04:18 2019
@@ -49,7 +49,7 @@ void tools::MinGW::Assembler::ConstructJ
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
if (Args.hasArg(options::OPT_gsplit_dwarf))
SplitDebugInfo(getToolChain(), C, *this, JA, Args, Output,
@@ -294,7 +294,7 @@ void tools::MinGW::Linker::ConstructJob(
}
}
const char *Exec = Args.MakeArgString(TC.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
// Simplified from Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple.
Modified: cfe/trunk/lib/Driver/ToolChains/Minix.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Minix.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Minix.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Minix.cpp Wed Aug 14 16:04:18 2019
@@ -36,7 +36,7 @@ void tools::minix::Assembler::ConstructJ
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void tools::minix::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -88,7 +88,7 @@ void tools::minix::Linker::ConstructJob(
}
const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// Minix - Minix tool chain which can call as(1) and ld(1) directly.
Modified: cfe/trunk/lib/Driver/ToolChains/Myriad.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Myriad.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Myriad.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Myriad.cpp Wed Aug 14 16:04:18 2019
@@ -77,7 +77,7 @@ void tools::SHAVE::Compiler::ConstructJo
std::string Exec =
Args.MakeArgString(getToolChain().GetProgramPath("moviCompile"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
+ C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
CmdArgs, Inputs));
}
@@ -112,7 +112,7 @@ void tools::SHAVE::Assembler::ConstructJ
std::string Exec =
Args.MakeArgString(getToolChain().GetProgramPath("moviAsm"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
+ C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
CmdArgs, Inputs));
}
@@ -198,7 +198,7 @@ void tools::Myriad::Linker::ConstructJob
std::string Exec =
Args.MakeArgString(TC.GetProgramPath("sparc-myriad-rtems-ld"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
+ C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Exec),
CmdArgs, Inputs));
}
Modified: cfe/trunk/lib/Driver/ToolChains/NaCl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/NaCl.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/NaCl.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/NaCl.cpp Wed Aug 14 16:04:18 2019
@@ -193,7 +193,7 @@ void nacltools::Linker::ConstructJob(Com
}
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// NaCl Toolchain
Modified: cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp Wed Aug 14 16:04:18 2019
@@ -103,7 +103,7 @@ void netbsd::Assembler::ConstructJob(Com
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString((getToolChain().GetProgramPath("as")));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void netbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -333,7 +333,7 @@ void netbsd::Linker::ConstructJob(Compil
ToolChain.addProfileRTLibs(Args, CmdArgs);
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly.
Modified: cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp Wed Aug 14 16:04:18 2019
@@ -89,7 +89,7 @@ void openbsd::Assembler::ConstructJob(Co
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -227,7 +227,7 @@ void openbsd::Linker::ConstructJob(Compi
}
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
SanitizerMask OpenBSD::getSupportedSanitizers() const {
Modified: cfe/trunk/lib/Driver/ToolChains/PS4CPU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/PS4CPU.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/PS4CPU.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/PS4CPU.cpp Wed Aug 14 16:04:18 2019
@@ -62,7 +62,7 @@ void tools::PS4cpu::Assemble::ConstructJ
const char *Exec =
Args.MakeArgString(getToolChain().GetProgramPath("orbis-as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
static void AddPS4SanitizerArgs(const ToolChain &TC, ArgStringList &CmdArgs) {
@@ -141,7 +141,7 @@ static void ConstructPS4LinkJob(const To
const char *Exec = Args.MakeArgString(ToolChain.GetProgramPath("orbis-ld"));
- C.addCommand(llvm::make_unique<Command>(JA, T, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, T, Exec, CmdArgs, Inputs));
}
static void ConstructGoldLinkJob(const Tool &T, Compilation &C,
@@ -319,7 +319,7 @@ static void ConstructGoldLinkJob(const T
Args.MakeArgString(ToolChain.GetProgramPath("orbis-ld"));
#endif
- C.addCommand(llvm::make_unique<Command>(JA, T, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, T, Exec, CmdArgs, Inputs));
}
void tools::PS4cpu::Link::ConstructJob(Compilation &C, const JobAction &JA,
Modified: cfe/trunk/lib/Driver/ToolChains/RISCVToolchain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/RISCVToolchain.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/RISCVToolchain.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/RISCVToolchain.cpp Wed Aug 14 16:04:18 2019
@@ -134,7 +134,7 @@ void RISCV::Linker::ConstructJob(Compila
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
+ C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
CmdArgs, Inputs));
}
// RISCV tools end.
Modified: cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Solaris.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Solaris.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Solaris.cpp Wed Aug 14 16:04:18 2019
@@ -41,7 +41,7 @@ void solaris::Assembler::ConstructJob(Co
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -150,7 +150,7 @@ void solaris::Linker::ConstructJob(Compi
getToolChain().addProfileRTLibs(Args, CmdArgs);
const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
static StringRef getSolarisLibSuffix(const llvm::Triple &Triple) {
Modified: cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp Wed Aug 14 16:04:18 2019
@@ -89,7 +89,7 @@ void wasm::Linker::ConstructJob(Compilat
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
- C.addCommand(llvm::make_unique<Command>(JA, *this, Linker, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Linker, CmdArgs, Inputs));
}
WebAssembly::WebAssembly(const Driver &D, const llvm::Triple &Triple,
Modified: cfe/trunk/lib/Driver/ToolChains/XCore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/XCore.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/XCore.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/XCore.cpp Wed Aug 14 16:04:18 2019
@@ -52,7 +52,7 @@ void tools::XCore::Assembler::ConstructJ
CmdArgs.push_back(II.getFilename());
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("xcc"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
void tools::XCore::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -80,7 +80,7 @@ void tools::XCore::Linker::ConstructJob(
AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("xcc"));
- C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+ C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
/// XCore tool chain
Modified: cfe/trunk/lib/Format/ContinuationIndenter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/ContinuationIndenter.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Format/ContinuationIndenter.cpp (original)
+++ cfe/trunk/lib/Format/ContinuationIndenter.cpp Wed Aug 14 16:04:18 2019
@@ -1795,7 +1795,7 @@ ContinuationIndenter::createBreakableTok
unsigned UnbreakableTailLength = (State.NextToken && canBreak(State))
? 0
: Current.UnbreakableTailLength;
- return llvm::make_unique<BreakableStringLiteral>(
+ return std::make_unique<BreakableStringLiteral>(
Current, StartColumn, Prefix, Postfix, UnbreakableTailLength,
State.Line->InPPDirective, Encoding, Style);
}
@@ -1807,7 +1807,7 @@ ContinuationIndenter::createBreakableTok
switchesFormatting(Current)) {
return nullptr;
}
- return llvm::make_unique<BreakableBlockComment>(
+ return std::make_unique<BreakableBlockComment>(
Current, StartColumn, Current.OriginalColumn, !Current.Previous,
State.Line->InPPDirective, Encoding, Style, Whitespaces.useCRLF());
} else if (Current.is(TT_LineComment) &&
@@ -1817,7 +1817,7 @@ ContinuationIndenter::createBreakableTok
CommentPragmasRegex.match(Current.TokenText.substr(2)) ||
switchesFormatting(Current))
return nullptr;
- return llvm::make_unique<BreakableLineCommentSection>(
+ return std::make_unique<BreakableLineCommentSection>(
Current, StartColumn, Current.OriginalColumn, !Current.Previous,
/*InPPDirective=*/false, Encoding, Style);
}
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Wed Aug 14 16:04:18 2019
@@ -2303,7 +2303,7 @@ reformat(const FormatStyle &Style, Strin
});
auto Env =
- llvm::make_unique<Environment>(Code, FileName, Ranges, FirstStartColumn,
+ std::make_unique<Environment>(Code, FileName, Ranges, FirstStartColumn,
NextStartColumn, LastStartColumn);
llvm::Optional<std::string> CurrentCode = None;
tooling::Replacements Fixes;
@@ -2317,7 +2317,7 @@ reformat(const FormatStyle &Style, Strin
Penalty += PassFixes.second;
if (I + 1 < E) {
CurrentCode = std::move(*NewCode);
- Env = llvm::make_unique<Environment>(
+ Env = std::make_unique<Environment>(
*CurrentCode, FileName,
tooling::calculateRangesAfterReplacements(Fixes, Ranges),
FirstStartColumn, NextStartColumn, LastStartColumn);
Modified: cfe/trunk/lib/Format/UnwrappedLineParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/UnwrappedLineParser.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Format/UnwrappedLineParser.cpp (original)
+++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp Wed Aug 14 16:04:18 2019
@@ -145,7 +145,7 @@ public:
else if (!Parser.Line->Tokens.empty())
Parser.CurrentLines = &Parser.Line->Tokens.back().Children;
PreBlockLine = std::move(Parser.Line);
- Parser.Line = llvm::make_unique<UnwrappedLine>();
+ Parser.Line = std::make_unique<UnwrappedLine>();
Parser.Line->Level = PreBlockLine->Level;
Parser.Line->InPPDirective = PreBlockLine->InPPDirective;
}
Modified: cfe/trunk/lib/Frontend/ASTConsumers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTConsumers.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTConsumers.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTConsumers.cpp Wed Aug 14 16:04:18 2019
@@ -139,7 +139,7 @@ namespace {
std::unique_ptr<ASTConsumer>
clang::CreateASTPrinter(std::unique_ptr<raw_ostream> Out,
StringRef FilterString) {
- return llvm::make_unique<ASTPrinter>(std::move(Out), ASTPrinter::Print,
+ return std::make_unique<ASTPrinter>(std::move(Out), ASTPrinter::Print,
ADOF_Default, FilterString);
}
@@ -148,7 +148,7 @@ clang::CreateASTDumper(std::unique_ptr<r
bool DumpDecls, bool Deserialize, bool DumpLookups,
ASTDumpOutputFormat Format) {
assert((DumpDecls || Deserialize || DumpLookups) && "nothing to dump");
- return llvm::make_unique<ASTPrinter>(std::move(Out),
+ return std::make_unique<ASTPrinter>(std::move(Out),
Deserialize ? ASTPrinter::DumpFull :
DumpDecls ? ASTPrinter::Dump :
ASTPrinter::None, Format,
@@ -156,7 +156,7 @@ clang::CreateASTDumper(std::unique_ptr<r
}
std::unique_ptr<ASTConsumer> clang::CreateASTDeclNodeLister() {
- return llvm::make_unique<ASTDeclNodeLister>(nullptr);
+ return std::make_unique<ASTDeclNodeLister>(nullptr);
}
//===----------------------------------------------------------------------===//
@@ -193,5 +193,5 @@ void ASTViewer::HandleTopLevelSingleDecl
}
std::unique_ptr<ASTConsumer> clang::CreateASTViewer() {
- return llvm::make_unique<ASTViewer>();
+ return std::make_unique<ASTViewer>();
}
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Wed Aug 14 16:04:18 2019
@@ -819,7 +819,7 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFr
/*isysroot=*/"",
/*DisableValidation=*/disableValid, AllowPCHWithCompilerErrors);
- AST->Reader->setListener(llvm::make_unique<ASTInfoCollector>(
+ AST->Reader->setListener(std::make_unique<ASTInfoCollector>(
*AST->PP, AST->Ctx.get(), *AST->HSOpts, *AST->PPOpts, *AST->LangOpts,
AST->TargetOpts, AST->Target, Counter));
@@ -999,9 +999,9 @@ public:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) override {
CI.getPreprocessor().addPPCallbacks(
- llvm::make_unique<MacroDefinitionTrackerPPCallbacks>(
+ std::make_unique<MacroDefinitionTrackerPPCallbacks>(
Unit.getCurrentTopLevelHashValue()));
- return llvm::make_unique<TopLevelDeclTrackerConsumer>(
+ return std::make_unique<TopLevelDeclTrackerConsumer>(
Unit, Unit.getCurrentTopLevelHashValue());
}
@@ -1049,7 +1049,7 @@ public:
}
std::unique_ptr<PPCallbacks> createPPCallbacks() override {
- return llvm::make_unique<MacroDefinitionTrackerPPCallbacks>(Hash);
+ return std::make_unique<MacroDefinitionTrackerPPCallbacks>(Hash);
}
private:
@@ -1624,15 +1624,15 @@ ASTUnit *ASTUnit::LoadFromCompilerInvoca
if (Persistent && !TrackerAct) {
Clang->getPreprocessor().addPPCallbacks(
- llvm::make_unique<MacroDefinitionTrackerPPCallbacks>(
+ std::make_unique<MacroDefinitionTrackerPPCallbacks>(
AST->getCurrentTopLevelHashValue()));
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
if (Clang->hasASTConsumer())
Consumers.push_back(Clang->takeASTConsumer());
- Consumers.push_back(llvm::make_unique<TopLevelDeclTrackerConsumer>(
+ Consumers.push_back(std::make_unique<TopLevelDeclTrackerConsumer>(
*AST, AST->getCurrentTopLevelHashValue()));
Clang->setASTConsumer(
- llvm::make_unique<MultiplexConsumer>(std::move(Consumers)));
+ std::make_unique<MultiplexConsumer>(std::move(Consumers)));
}
if (llvm::Error Err = Act->Execute()) {
consumeError(std::move(Err)); // FIXME this drops errors on the floor.
Modified: cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp (original)
+++ cfe/trunk/lib/Frontend/ChainedIncludesSource.cpp Wed Aug 14 16:04:18 2019
@@ -158,7 +158,7 @@ IntrusiveRefCntPtr<ExternalSemaSource> c
auto Buffer = std::make_shared<PCHBuffer>();
ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions;
- auto consumer = llvm::make_unique<PCHGenerator>(
+ auto consumer = std::make_unique<PCHGenerator>(
Clang->getPreprocessor(), Clang->getModuleCache(), "-", /*isysroot=*/"",
Buffer, Extensions, /*AllowASTWithErrors=*/true);
Clang->getASTContext().setASTMutationListener(
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Wed Aug 14 16:04:18 2019
@@ -215,7 +215,7 @@ static void SetUpDiagnosticLog(Diagnosti
raw_ostream *OS = &llvm::errs();
if (DiagOpts->DiagnosticLogFile != "-") {
// Create the output stream.
- auto FileOS = llvm::make_unique<llvm::raw_fd_ostream>(
+ auto FileOS = std::make_unique<llvm::raw_fd_ostream>(
DiagOpts->DiagnosticLogFile, EC,
llvm::sys::fs::OF_Append | llvm::sys::fs::OF_Text);
if (EC) {
@@ -229,7 +229,7 @@ static void SetUpDiagnosticLog(Diagnosti
}
// Chain in the diagnostic client which will log the diagnostics.
- auto Logger = llvm::make_unique<LogDiagnosticPrinter>(*OS, DiagOpts,
+ auto Logger = std::make_unique<LogDiagnosticPrinter>(*OS, DiagOpts,
std::move(StreamOwner));
if (CodeGenOpts)
Logger->setDwarfDebugFlags(CodeGenOpts->DwarfDebugFlags);
@@ -667,7 +667,7 @@ CompilerInstance::createDefaultOutputFil
}
std::unique_ptr<raw_pwrite_stream> CompilerInstance::createNullOutputFile() {
- return llvm::make_unique<llvm::raw_null_ostream>();
+ return std::make_unique<llvm::raw_null_ostream>();
}
std::unique_ptr<raw_pwrite_stream>
@@ -793,7 +793,7 @@ std::unique_ptr<llvm::raw_pwrite_stream>
if (!Binary || OS->supportsSeeking())
return std::move(OS);
- auto B = llvm::make_unique<llvm::buffer_ostream>(*OS);
+ auto B = std::make_unique<llvm::buffer_ostream>(*OS);
assert(!NonSeekStream);
NonSeekStream = std::move(OS);
return std::move(B);
@@ -988,7 +988,7 @@ bool CompilerInstance::ExecuteAction(Fro
StringRef StatsFile = getFrontendOpts().StatsFile;
if (!StatsFile.empty()) {
std::error_code EC;
- auto StatS = llvm::make_unique<llvm::raw_fd_ostream>(
+ auto StatS = std::make_unique<llvm::raw_fd_ostream>(
StatsFile, EC, llvm::sys::fs::OF_Text);
if (EC) {
getDiagnostics().Report(diag::warn_fe_unable_to_open_stats_file)
@@ -1471,7 +1471,7 @@ void CompilerInstance::createModuleManag
const PreprocessorOptions &PPOpts = getPreprocessorOpts();
std::unique_ptr<llvm::Timer> ReadTimer;
if (FrontendTimerGroup)
- ReadTimer = llvm::make_unique<llvm::Timer>("reading_modules",
+ ReadTimer = std::make_unique<llvm::Timer>("reading_modules",
"Reading modules",
*FrontendTimerGroup);
ModuleManager = new ASTReader(
@@ -1566,7 +1566,7 @@ bool CompilerInstance::loadModuleFile(St
SourceLocation())
<= DiagnosticsEngine::Warning;
- auto Listener = llvm::make_unique<ReadModuleNames>(*this);
+ auto Listener = std::make_unique<ReadModuleNames>(*this);
auto &ListenerRef = *Listener;
ASTReader::ListenerScope ReadModuleNamesListener(*ModuleManager,
std::move(Listener));
Modified: cfe/trunk/lib/Frontend/CreateInvocationFromCommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CreateInvocationFromCommandLine.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CreateInvocationFromCommandLine.cpp (original)
+++ cfe/trunk/lib/Frontend/CreateInvocationFromCommandLine.cpp Wed Aug 14 16:04:18 2019
@@ -94,7 +94,7 @@ std::unique_ptr<CompilerInvocation> clan
}
const ArgStringList &CCArgs = Cmd.getArguments();
- auto CI = llvm::make_unique<CompilerInvocation>();
+ auto CI = std::make_unique<CompilerInvocation>();
if (!CompilerInvocation::CreateFromArgs(*CI,
const_cast<const char **>(CCArgs.data()),
const_cast<const char **>(CCArgs.data()) +
Modified: cfe/trunk/lib/Frontend/DependencyFile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/DependencyFile.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/DependencyFile.cpp (original)
+++ cfe/trunk/lib/Frontend/DependencyFile.cpp Wed Aug 14 16:04:18 2019
@@ -168,13 +168,13 @@ bool DependencyCollector::sawDependency(
DependencyCollector::~DependencyCollector() { }
void DependencyCollector::attachToPreprocessor(Preprocessor &PP) {
- PP.addPPCallbacks(llvm::make_unique<DepCollectorPPCallbacks>(
+ PP.addPPCallbacks(std::make_unique<DepCollectorPPCallbacks>(
*this, PP.getSourceManager(), PP.getDiagnostics()));
PP.getHeaderSearchInfo().getModuleMap().addModuleMapCallbacks(
- llvm::make_unique<DepCollectorMMCallbacks>(*this));
+ std::make_unique<DepCollectorMMCallbacks>(*this));
}
void DependencyCollector::attachToASTReader(ASTReader &R) {
- R.addListener(llvm::make_unique<DepCollectorASTListener>(*this));
+ R.addListener(std::make_unique<DepCollectorASTListener>(*this));
}
DependencyFileGenerator::DependencyFileGenerator(
Modified: cfe/trunk/lib/Frontend/DependencyGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/DependencyGraph.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/DependencyGraph.cpp (original)
+++ cfe/trunk/lib/Frontend/DependencyGraph.cpp Wed Aug 14 16:04:18 2019
@@ -61,7 +61,7 @@ public:
void clang::AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile,
StringRef SysRoot) {
- PP.addPPCallbacks(llvm::make_unique<DependencyGraphCallback>(&PP, OutputFile,
+ PP.addPPCallbacks(std::make_unique<DependencyGraphCallback>(&PP, OutputFile,
SysRoot));
}
Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendAction.cpp Wed Aug 14 16:04:18 2019
@@ -216,7 +216,7 @@ FrontendAction::CreateWrappedASTConsumer
Consumers.push_back(std::move(C));
}
- return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
+ return std::make_unique<MultiplexConsumer>(std::move(Consumers));
}
/// For preprocessed files, if the first line is the linemarker and specifies
Modified: cfe/trunk/lib/Frontend/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendActions.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendActions.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendActions.cpp Wed Aug 14 16:04:18 2019
@@ -55,7 +55,7 @@ void EnsureSemaIsCreated(CompilerInstanc
std::unique_ptr<ASTConsumer>
InitOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
void InitOnlyAction::ExecuteAction() {
@@ -109,7 +109,7 @@ GeneratePCHAction::CreateASTConsumer(Com
const auto &FrontendOpts = CI.getFrontendOpts();
auto Buffer = std::make_shared<PCHBuffer>();
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
- Consumers.push_back(llvm::make_unique<PCHGenerator>(
+ Consumers.push_back(std::make_unique<PCHGenerator>(
CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer,
FrontendOpts.ModuleFileExtensions,
CI.getPreprocessorOpts().AllowPCHWithCompilerErrors,
@@ -117,7 +117,7 @@ GeneratePCHAction::CreateASTConsumer(Com
Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI, InFile, OutputFile, std::move(OS), Buffer));
- return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
+ return std::make_unique<MultiplexConsumer>(std::move(Consumers));
}
bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI,
@@ -172,7 +172,7 @@ GenerateModuleAction::CreateASTConsumer(
auto Buffer = std::make_shared<PCHBuffer>();
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
- Consumers.push_back(llvm::make_unique<PCHGenerator>(
+ Consumers.push_back(std::make_unique<PCHGenerator>(
CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer,
CI.getFrontendOpts().ModuleFileExtensions,
/*AllowASTWithErrors=*/false,
@@ -182,7 +182,7 @@ GenerateModuleAction::CreateASTConsumer(
+CI.getFrontendOpts().BuildingImplicitModule));
Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI, InFile, OutputFile, std::move(OS), Buffer));
- return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
+ return std::make_unique<MultiplexConsumer>(std::move(Consumers));
}
bool GenerateModuleFromModuleMapAction::BeginSourceFileAction(
@@ -313,18 +313,18 @@ SyntaxOnlyAction::~SyntaxOnlyAction() {
std::unique_ptr<ASTConsumer>
SyntaxOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
std::unique_ptr<ASTConsumer>
DumpModuleInfoAction::CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
std::unique_ptr<ASTConsumer>
VerifyPCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
void VerifyPCHAction::ExecuteAction() {
@@ -466,7 +466,7 @@ private:
std::unique_ptr<ASTConsumer>
TemplightDumpAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
void TemplightDumpAction::ExecuteAction() {
@@ -479,7 +479,7 @@ void TemplightDumpAction::ExecuteAction(
EnsureSemaIsCreated(CI, *this);
CI.getSema().TemplateInstCallbacks.push_back(
- llvm::make_unique<DefaultTemplateInstCallback>());
+ std::make_unique<DefaultTemplateInstCallback>());
ASTFrontendAction::ExecuteAction();
}
Modified: cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp (original)
+++ cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp Wed Aug 14 16:04:18 2019
@@ -120,7 +120,7 @@ void clang::AttachHeaderIncludeGen(Prepr
// the GNU way to generate rules is -M / -MM / -MD / -MMD.
for (const auto &Header : DepOpts.ExtraDeps)
PrintHeaderInfo(OutputFile, Header, ShowDepth, 2, MSStyle);
- PP.addPPCallbacks(llvm::make_unique<HeaderIncludesCallback>(
+ PP.addPPCallbacks(std::make_unique<HeaderIncludesCallback>(
&PP, ShowAllHeaders, OutputFile, DepOpts, OwnsOutputFile, ShowDepth,
MSStyle));
}
Modified: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp Wed Aug 14 16:04:18 2019
@@ -366,13 +366,13 @@ public:
std::unique_ptr<ASTConsumer>
GenerateInterfaceYAMLExpV1Action::CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
- return llvm::make_unique<InterfaceStubFunctionsConsumer>(
+ return std::make_unique<InterfaceStubFunctionsConsumer>(
CI, InFile, "experimental-yaml-elf-v1");
}
std::unique_ptr<ASTConsumer>
GenerateInterfaceTBEExpV1Action::CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
- return llvm::make_unique<InterfaceStubFunctionsConsumer>(
+ return std::make_unique<InterfaceStubFunctionsConsumer>(
CI, InFile, "experimental-tapi-elf-v1");
}
Modified: cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp (original)
+++ cfe/trunk/lib/Frontend/ModuleDependencyCollector.cpp Wed Aug 14 16:04:18 2019
@@ -99,14 +99,14 @@ struct ModuleDependencyMMCallbacks : pub
}
void ModuleDependencyCollector::attachToASTReader(ASTReader &R) {
- R.addListener(llvm::make_unique<ModuleDependencyListener>(*this));
+ R.addListener(std::make_unique<ModuleDependencyListener>(*this));
}
void ModuleDependencyCollector::attachToPreprocessor(Preprocessor &PP) {
- PP.addPPCallbacks(llvm::make_unique<ModuleDependencyPPCallbacks>(
+ PP.addPPCallbacks(std::make_unique<ModuleDependencyPPCallbacks>(
*this, PP.getSourceManager()));
PP.getHeaderSearchInfo().getModuleMap().addModuleMapCallbacks(
- llvm::make_unique<ModuleDependencyMMCallbacks>(*this));
+ std::make_unique<ModuleDependencyMMCallbacks>(*this));
}
static bool isCaseSensitivePath(StringRef Path) {
Modified: cfe/trunk/lib/Frontend/MultiplexConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/MultiplexConsumer.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/MultiplexConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/MultiplexConsumer.cpp Wed Aug 14 16:04:18 2019
@@ -249,11 +249,11 @@ MultiplexConsumer::MultiplexConsumer(
}
if (!mutationListeners.empty()) {
MutationListener =
- llvm::make_unique<MultiplexASTMutationListener>(mutationListeners);
+ std::make_unique<MultiplexASTMutationListener>(mutationListeners);
}
if (!serializationListeners.empty()) {
DeserializationListener =
- llvm::make_unique<MultiplexASTDeserializationListener>(
+ std::make_unique<MultiplexASTDeserializationListener>(
serializationListeners);
}
}
Modified: cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp (original)
+++ cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp Wed Aug 14 16:04:18 2019
@@ -202,7 +202,7 @@ PrecompilePreambleAction::CreateASTConsu
std::unique_ptr<llvm::raw_ostream> OS;
if (InMemStorage) {
- OS = llvm::make_unique<llvm::raw_string_ostream>(*InMemStorage);
+ OS = std::make_unique<llvm::raw_string_ostream>(*InMemStorage);
} else {
std::string OutputFile;
OS = GeneratePCHAction::CreateOutputFile(CI, InFile, OutputFile);
@@ -213,7 +213,7 @@ PrecompilePreambleAction::CreateASTConsu
if (!CI.getFrontendOpts().RelocatablePCH)
Sysroot.clear();
- return llvm::make_unique<PrecompilePreambleConsumer>(
+ return std::make_unique<PrecompilePreambleConsumer>(
*this, CI.getPreprocessor(), CI.getModuleCache(), Sysroot, std::move(OS));
}
Modified: cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp Wed Aug 14 16:04:18 2019
@@ -675,7 +675,7 @@ struct UnknownPragmaHandler : public Pra
if (ShouldExpandTokens) {
// The first token does not have expanded macros. Expand them, if
// required.
- auto Toks = llvm::make_unique<Token[]>(1);
+ auto Toks = std::make_unique<Token[]>(1);
Toks[0] = PragmaTok;
PP.EnterTokenStream(std::move(Toks), /*NumToks=*/1,
/*DisableMacroExpansion=*/false,
Modified: cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp (original)
+++ cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp Wed Aug 14 16:04:18 2019
@@ -50,7 +50,7 @@ FixItAction::~FixItAction() {}
std::unique_ptr<ASTConsumer>
FixItAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
namespace {
@@ -295,7 +295,7 @@ bool RewriteIncludesAction::BeginSourceF
if (CI.getPreprocessorOutputOpts().RewriteImports) {
CI.createModuleManager();
CI.getModuleManager()->addListener(
- llvm::make_unique<RewriteImportsListener>(CI, OutputStream));
+ std::make_unique<RewriteImportsListener>(CI, OutputStream));
}
return true;
Modified: cfe/trunk/lib/Frontend/Rewrite/HTMLPrint.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Rewrite/HTMLPrint.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Rewrite/HTMLPrint.cpp (original)
+++ cfe/trunk/lib/Frontend/Rewrite/HTMLPrint.cpp Wed Aug 14 16:04:18 2019
@@ -48,7 +48,7 @@ namespace {
std::unique_ptr<ASTConsumer>
clang::CreateHTMLPrinter(std::unique_ptr<raw_ostream> OS, Preprocessor &PP,
bool SyntaxHighlight, bool HighlightMacros) {
- return llvm::make_unique<HTMLPrinter>(std::move(OS), PP, SyntaxHighlight,
+ return std::make_unique<HTMLPrinter>(std::move(OS), PP, SyntaxHighlight,
HighlightMacros);
}
Modified: cfe/trunk/lib/Frontend/Rewrite/RewriteModernObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Rewrite/RewriteModernObjC.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Rewrite/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/Rewrite/RewriteModernObjC.cpp Wed Aug 14 16:04:18 2019
@@ -663,7 +663,7 @@ std::unique_ptr<ASTConsumer> clang::Crea
const std::string &InFile, std::unique_ptr<raw_ostream> OS,
DiagnosticsEngine &Diags, const LangOptions &LOpts,
bool SilenceRewriteMacroWarning, bool LineInfo) {
- return llvm::make_unique<RewriteModernObjC>(InFile, std::move(OS), Diags,
+ return std::make_unique<RewriteModernObjC>(InFile, std::move(OS), Diags,
LOpts, SilenceRewriteMacroWarning,
LineInfo);
}
Modified: cfe/trunk/lib/Frontend/Rewrite/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Rewrite/RewriteObjC.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Rewrite/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/Rewrite/RewriteObjC.cpp Wed Aug 14 16:04:18 2019
@@ -593,7 +593,7 @@ clang::CreateObjCRewriter(const std::str
std::unique_ptr<raw_ostream> OS,
DiagnosticsEngine &Diags, const LangOptions &LOpts,
bool SilenceRewriteMacroWarning) {
- return llvm::make_unique<RewriteObjCFragileABI>(
+ return std::make_unique<RewriteObjCFragileABI>(
InFile, std::move(OS), Diags, LOpts, SilenceRewriteMacroWarning);
}
Modified: cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp (original)
+++ cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp Wed Aug 14 16:04:18 2019
@@ -296,7 +296,7 @@ namespace clang {
namespace serialized_diags {
std::unique_ptr<DiagnosticConsumer>
create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords) {
- return llvm::make_unique<SDiagsWriter>(OutputFile, Diags, MergeChildRecords);
+ return std::make_unique<SDiagsWriter>(OutputFile, Diags, MergeChildRecords);
}
} // end namespace serialized_diags
@@ -743,7 +743,7 @@ DiagnosticsEngine *SDiagsWriter::getMeta
IntrusiveRefCntPtr<DiagnosticIDs> IDs(new DiagnosticIDs());
auto Client =
new TextDiagnosticPrinter(llvm::errs(), State->DiagOpts.get());
- State->MetaDiagnostics = llvm::make_unique<DiagnosticsEngine>(
+ State->MetaDiagnostics = std::make_unique<DiagnosticsEngine>(
IDs, State->DiagOpts.get(), Client);
}
return State->MetaDiagnostics.get();
@@ -780,7 +780,7 @@ void SDiagsWriter::finish() {
}
std::error_code EC;
- auto OS = llvm::make_unique<llvm::raw_fd_ostream>(State->OutputFile.c_str(),
+ auto OS = std::make_unique<llvm::raw_fd_ostream>(State->OutputFile.c_str(),
EC, llvm::sys::fs::OF_None);
if (EC) {
getMetaDiags()->Report(diag::warn_fe_serialized_diag_failure)
Modified: cfe/trunk/lib/Frontend/VerifyDiagnosticConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/VerifyDiagnosticConsumer.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/VerifyDiagnosticConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/VerifyDiagnosticConsumer.cpp Wed Aug 14 16:04:18 2019
@@ -671,7 +671,7 @@ void VerifyDiagnosticConsumer::BeginSour
#ifndef NDEBUG
// Debug build tracks parsed files.
const_cast<Preprocessor *>(PP)->addPPCallbacks(
- llvm::make_unique<VerifyFileTracker>(*this, *SrcManager));
+ std::make_unique<VerifyFileTracker>(*this, *SrcManager));
#endif
}
}
@@ -1116,7 +1116,7 @@ std::unique_ptr<Directive> Directive::cr
bool MatchAnyLine, StringRef Text,
unsigned Min, unsigned Max) {
if (!RegexKind)
- return llvm::make_unique<StandardDirective>(DirectiveLoc, DiagnosticLoc,
+ return std::make_unique<StandardDirective>(DirectiveLoc, DiagnosticLoc,
MatchAnyLine, Text, Min, Max);
// Parse the directive into a regular expression.
@@ -1142,6 +1142,6 @@ std::unique_ptr<Directive> Directive::cr
}
}
- return llvm::make_unique<RegexDirective>(
+ return std::make_unique<RegexDirective>(
DirectiveLoc, DiagnosticLoc, MatchAnyLine, Text, Min, Max, RegexStr);
}
Modified: cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp (original)
+++ cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp Wed Aug 14 16:04:18 2019
@@ -41,38 +41,38 @@ CreateFrontendBaseAction(CompilerInstanc
(void)Action;
switch (CI.getFrontendOpts().ProgramAction) {
- case ASTDeclList: return llvm::make_unique<ASTDeclListAction>();
- case ASTDump: return llvm::make_unique<ASTDumpAction>();
- case ASTPrint: return llvm::make_unique<ASTPrintAction>();
- case ASTView: return llvm::make_unique<ASTViewAction>();
+ case ASTDeclList: return std::make_unique<ASTDeclListAction>();
+ case ASTDump: return std::make_unique<ASTDumpAction>();
+ case ASTPrint: return std::make_unique<ASTPrintAction>();
+ case ASTView: return std::make_unique<ASTViewAction>();
case DumpCompilerOptions:
- return llvm::make_unique<DumpCompilerOptionsAction>();
- case DumpRawTokens: return llvm::make_unique<DumpRawTokensAction>();
- case DumpTokens: return llvm::make_unique<DumpTokensAction>();
- case EmitAssembly: return llvm::make_unique<EmitAssemblyAction>();
- case EmitBC: return llvm::make_unique<EmitBCAction>();
- case EmitHTML: return llvm::make_unique<HTMLPrintAction>();
- case EmitLLVM: return llvm::make_unique<EmitLLVMAction>();
- case EmitLLVMOnly: return llvm::make_unique<EmitLLVMOnlyAction>();
- case EmitCodeGenOnly: return llvm::make_unique<EmitCodeGenOnlyAction>();
- case EmitObj: return llvm::make_unique<EmitObjAction>();
- case FixIt: return llvm::make_unique<FixItAction>();
+ return std::make_unique<DumpCompilerOptionsAction>();
+ case DumpRawTokens: return std::make_unique<DumpRawTokensAction>();
+ case DumpTokens: return std::make_unique<DumpTokensAction>();
+ case EmitAssembly: return std::make_unique<EmitAssemblyAction>();
+ case EmitBC: return std::make_unique<EmitBCAction>();
+ case EmitHTML: return std::make_unique<HTMLPrintAction>();
+ case EmitLLVM: return std::make_unique<EmitLLVMAction>();
+ case EmitLLVMOnly: return std::make_unique<EmitLLVMOnlyAction>();
+ case EmitCodeGenOnly: return std::make_unique<EmitCodeGenOnlyAction>();
+ case EmitObj: return std::make_unique<EmitObjAction>();
+ case FixIt: return std::make_unique<FixItAction>();
case GenerateModule:
- return llvm::make_unique<GenerateModuleFromModuleMapAction>();
+ return std::make_unique<GenerateModuleFromModuleMapAction>();
case GenerateModuleInterface:
- return llvm::make_unique<GenerateModuleInterfaceAction>();
+ return std::make_unique<GenerateModuleInterfaceAction>();
case GenerateHeaderModule:
- return llvm::make_unique<GenerateHeaderModuleAction>();
- case GeneratePCH: return llvm::make_unique<GeneratePCHAction>();
+ return std::make_unique<GenerateHeaderModuleAction>();
+ case GeneratePCH: return std::make_unique<GeneratePCHAction>();
case GenerateInterfaceYAMLExpV1:
- return llvm::make_unique<GenerateInterfaceYAMLExpV1Action>();
+ return std::make_unique<GenerateInterfaceYAMLExpV1Action>();
case GenerateInterfaceTBEExpV1:
- return llvm::make_unique<GenerateInterfaceTBEExpV1Action>();
- case InitOnly: return llvm::make_unique<InitOnlyAction>();
- case ParseSyntaxOnly: return llvm::make_unique<SyntaxOnlyAction>();
- case ModuleFileInfo: return llvm::make_unique<DumpModuleInfoAction>();
- case VerifyPCH: return llvm::make_unique<VerifyPCHAction>();
- case TemplightDump: return llvm::make_unique<TemplightDumpAction>();
+ return std::make_unique<GenerateInterfaceTBEExpV1Action>();
+ case InitOnly: return std::make_unique<InitOnlyAction>();
+ case ParseSyntaxOnly: return std::make_unique<SyntaxOnlyAction>();
+ case ModuleFileInfo: return std::make_unique<DumpModuleInfoAction>();
+ case VerifyPCH: return std::make_unique<VerifyPCHAction>();
+ case TemplightDump: return std::make_unique<TemplightDumpAction>();
case PluginAction: {
for (FrontendPluginRegistry::iterator it =
@@ -93,35 +93,35 @@ CreateFrontendBaseAction(CompilerInstanc
return nullptr;
}
- case PrintPreamble: return llvm::make_unique<PrintPreambleAction>();
+ case PrintPreamble: return std::make_unique<PrintPreambleAction>();
case PrintPreprocessedInput: {
if (CI.getPreprocessorOutputOpts().RewriteIncludes ||
CI.getPreprocessorOutputOpts().RewriteImports)
- return llvm::make_unique<RewriteIncludesAction>();
- return llvm::make_unique<PrintPreprocessedAction>();
+ return std::make_unique<RewriteIncludesAction>();
+ return std::make_unique<PrintPreprocessedAction>();
}
- case RewriteMacros: return llvm::make_unique<RewriteMacrosAction>();
- case RewriteTest: return llvm::make_unique<RewriteTestAction>();
+ case RewriteMacros: return std::make_unique<RewriteMacrosAction>();
+ case RewriteTest: return std::make_unique<RewriteTestAction>();
#if CLANG_ENABLE_OBJC_REWRITER
- case RewriteObjC: return llvm::make_unique<RewriteObjCAction>();
+ case RewriteObjC: return std::make_unique<RewriteObjCAction>();
#else
case RewriteObjC: Action = "RewriteObjC"; break;
#endif
#if CLANG_ENABLE_ARCMT
case MigrateSource:
- return llvm::make_unique<arcmt::MigrateSourceAction>();
+ return std::make_unique<arcmt::MigrateSourceAction>();
#else
case MigrateSource: Action = "MigrateSource"; break;
#endif
#if CLANG_ENABLE_STATIC_ANALYZER
- case RunAnalysis: return llvm::make_unique<ento::AnalysisAction>();
+ case RunAnalysis: return std::make_unique<ento::AnalysisAction>();
#else
case RunAnalysis: Action = "RunAnalysis"; break;
#endif
- case RunPreprocessorOnly: return llvm::make_unique<PreprocessOnlyAction>();
+ case RunPreprocessorOnly: return std::make_unique<PreprocessOnlyAction>();
case PrintDependencyDirectivesSourceMinimizerOutput:
- return llvm::make_unique<PrintDependencyDirectivesSourceMinimizerAction>();
+ return std::make_unique<PrintDependencyDirectivesSourceMinimizerAction>();
}
#if !CLANG_ENABLE_ARCMT || !CLANG_ENABLE_STATIC_ANALYZER \
@@ -143,7 +143,7 @@ CreateFrontendAction(CompilerInstance &C
const FrontendOptions &FEOpts = CI.getFrontendOpts();
if (FEOpts.FixAndRecompile) {
- Act = llvm::make_unique<FixItRecompile>(std::move(Act));
+ Act = std::make_unique<FixItRecompile>(std::move(Act));
}
#if CLANG_ENABLE_ARCMT
@@ -154,13 +154,13 @@ CreateFrontendAction(CompilerInstance &C
case FrontendOptions::ARCMT_None:
break;
case FrontendOptions::ARCMT_Check:
- Act = llvm::make_unique<arcmt::CheckAction>(std::move(Act));
+ Act = std::make_unique<arcmt::CheckAction>(std::move(Act));
break;
case FrontendOptions::ARCMT_Modify:
- Act = llvm::make_unique<arcmt::ModifyAction>(std::move(Act));
+ Act = std::make_unique<arcmt::ModifyAction>(std::move(Act));
break;
case FrontendOptions::ARCMT_Migrate:
- Act = llvm::make_unique<arcmt::MigrateAction>(std::move(Act),
+ Act = std::make_unique<arcmt::MigrateAction>(std::move(Act),
FEOpts.MTMigrateDir,
FEOpts.ARCMTMigrateReportOut,
FEOpts.ARCMTMigrateEmitARCErrors);
@@ -168,7 +168,7 @@ CreateFrontendAction(CompilerInstance &C
}
if (FEOpts.ObjCMTAction != FrontendOptions::ObjCMT_None) {
- Act = llvm::make_unique<arcmt::ObjCMigrateAction>(std::move(Act),
+ Act = std::make_unique<arcmt::ObjCMigrateAction>(std::move(Act),
FEOpts.MTMigrateDir,
FEOpts.ObjCMTAction);
}
@@ -178,7 +178,7 @@ CreateFrontendAction(CompilerInstance &C
// If there are any AST files to merge, create a frontend action
// adaptor to perform the merge.
if (!FEOpts.ASTMergeFiles.empty())
- Act = llvm::make_unique<ASTMergeAction>(std::move(Act),
+ Act = std::make_unique<ASTMergeAction>(std::move(Act),
FEOpts.ASTMergeFiles);
return Act;
@@ -231,7 +231,7 @@ bool ExecuteCompilerInvocation(CompilerI
// This should happen AFTER plugins have been loaded!
if (!Clang->getFrontendOpts().LLVMArgs.empty()) {
unsigned NumArgs = Clang->getFrontendOpts().LLVMArgs.size();
- auto Args = llvm::make_unique<const char*[]>(NumArgs + 2);
+ auto Args = std::make_unique<const char*[]>(NumArgs + 2);
Args[0] = "clang (LLVM option parsing)";
for (unsigned i = 0; i != NumArgs; ++i)
Args[i + 1] = Clang->getFrontendOpts().LLVMArgs[i].c_str();
Modified: cfe/trunk/lib/Index/IndexingAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/IndexingAction.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Index/IndexingAction.cpp (original)
+++ cfe/trunk/lib/Index/IndexingAction.cpp Wed Aug 14 16:04:18 2019
@@ -118,12 +118,12 @@ protected:
std::unique_ptr<IndexASTConsumer>
createIndexASTConsumer(CompilerInstance &CI) {
- return llvm::make_unique<IndexASTConsumer>(CI.getPreprocessorPtr(),
+ return std::make_unique<IndexASTConsumer>(CI.getPreprocessorPtr(),
IndexCtx);
}
std::unique_ptr<PPCallbacks> createIndexPPCallbacks() {
- return llvm::make_unique<IndexPPCallbacks>(IndexCtx);
+ return std::make_unique<IndexPPCallbacks>(IndexCtx);
}
void finish() {
@@ -176,7 +176,7 @@ protected:
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
Consumers.push_back(std::move(OtherConsumer));
Consumers.push_back(createIndexASTConsumer(CI));
- return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
+ return std::make_unique<MultiplexConsumer>(std::move(Consumers));
}
bool BeginSourceFileAction(clang::CompilerInstance &CI) override {
@@ -200,10 +200,10 @@ index::createIndexingAction(std::shared_
IndexingOptions Opts,
std::unique_ptr<FrontendAction> WrappedAction) {
if (WrappedAction)
- return llvm::make_unique<WrappingIndexAction>(std::move(WrappedAction),
+ return std::make_unique<WrappingIndexAction>(std::move(WrappedAction),
std::move(DataConsumer),
Opts);
- return llvm::make_unique<IndexAction>(std::move(DataConsumer), Opts);
+ return std::make_unique<IndexAction>(std::move(DataConsumer), Opts);
}
static bool topLevelDeclVisitor(void *context, const Decl *D) {
@@ -257,7 +257,7 @@ void index::indexTopLevelDecls(ASTContex
std::unique_ptr<PPCallbacks>
index::indexMacrosCallback(IndexDataConsumer &Consumer, IndexingOptions Opts) {
- return llvm::make_unique<IndexPPCallbacks>(
+ return std::make_unique<IndexPPCallbacks>(
std::make_shared<IndexingContext>(Opts, Consumer));
}
Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Wed Aug 14 16:04:18 2019
@@ -1023,7 +1023,7 @@ void Preprocessor::HandleDirective(Token
// various pseudo-ops. Just return the # token and push back the following
// token to be lexed next time.
if (getLangOpts().AsmPreprocessor) {
- auto Toks = llvm::make_unique<Token[]>(2);
+ auto Toks = std::make_unique<Token[]>(2);
// Return the # and the token after it.
Toks[0] = SavedHash;
Toks[1] = Result;
@@ -1513,7 +1513,7 @@ void Preprocessor::EnterAnnotationToken(
void *AnnotationVal) {
// FIXME: Produce this as the current token directly, rather than
// allocating a new token for it.
- auto Tok = llvm::make_unique<Token[]>(1);
+ auto Tok = std::make_unique<Token[]>(1);
Tok[0].startToken();
Tok[0].setKind(Kind);
Tok[0].setLocation(Range.getBegin());
Modified: cfe/trunk/lib/Lex/PPLexerChange.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPLexerChange.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/trunk/lib/Lex/PPLexerChange.cpp Wed Aug 14 16:04:18 2019
@@ -128,7 +128,7 @@ void Preprocessor::EnterMacro(Token &Tok
MacroInfo *Macro, MacroArgs *Args) {
std::unique_ptr<TokenLexer> TokLexer;
if (NumCachedTokenLexers == 0) {
- TokLexer = llvm::make_unique<TokenLexer>(Tok, ILEnd, Macro, Args, *this);
+ TokLexer = std::make_unique<TokenLexer>(Tok, ILEnd, Macro, Args, *this);
} else {
TokLexer = std::move(TokenLexerCache[--NumCachedTokenLexers]);
TokLexer->Init(Tok, ILEnd, Macro, Args);
@@ -180,7 +180,7 @@ void Preprocessor::EnterTokenStream(cons
// Create a macro expander to expand from the specified token stream.
std::unique_ptr<TokenLexer> TokLexer;
if (NumCachedTokenLexers == 0) {
- TokLexer = llvm::make_unique<TokenLexer>(
+ TokLexer = std::make_unique<TokenLexer>(
Toks, NumToks, DisableMacroExpansion, OwnsTokens, IsReinject, *this);
} else {
TokLexer = std::move(TokenLexerCache[--NumCachedTokenLexers]);
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Wed Aug 14 16:04:18 2019
@@ -804,7 +804,7 @@ MacroArgs *Preprocessor::ReadMacroCallAr
return nullptr;
}
// Do not lose the EOF/EOD.
- auto Toks = llvm::make_unique<Token[]>(1);
+ auto Toks = std::make_unique<Token[]>(1);
Toks[0] = Tok;
EnterTokenStream(std::move(Toks), 1, true, /*IsReinject*/ false);
break;
Modified: cfe/trunk/lib/Lex/Pragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Pragma.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Pragma.cpp (original)
+++ cfe/trunk/lib/Lex/Pragma.cpp Wed Aug 14 16:04:18 2019
@@ -183,7 +183,7 @@ void Preprocessor::Handle_Pragma(Token &
assert(!Tokens.empty() && "collected unexpected number of tokens");
// Push the ( "string" ) tokens into the token stream.
- auto Toks = llvm::make_unique<Token[]>(Tokens.size());
+ auto Toks = std::make_unique<Token[]>(Tokens.size());
std::copy(Tokens.begin() + 1, Tokens.end(), Toks.get());
Toks[Tokens.size() - 1] = Tok;
Self.EnterTokenStream(std::move(Toks), Tokens.size(),
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Wed Aug 14 16:04:18 2019
@@ -209,7 +209,7 @@ void Preprocessor::InitializeForModelFil
// Reset pragmas
PragmaHandlersBackup = std::move(PragmaHandlers);
- PragmaHandlers = llvm::make_unique<PragmaNamespace>(StringRef());
+ PragmaHandlers = std::make_unique<PragmaNamespace>(StringRef());
RegisterBuiltinPragmas();
// Reset PredefinesFileID
@@ -1129,7 +1129,7 @@ bool Preprocessor::LexAfterModuleImport(
// Allocate a holding buffer for a sequence of tokens and introduce it into
// the token stream.
auto EnterTokens = [this](ArrayRef<Token> Toks) {
- auto ToksCopy = llvm::make_unique<Token[]>(Toks.size());
+ auto ToksCopy = std::make_unique<Token[]>(Toks.size());
std::copy(Toks.begin(), Toks.end(), ToksCopy.get());
EnterTokenStream(std::move(ToksCopy), Toks.size(),
/*DisableMacroExpansion*/ true, /*IsReinject*/ false);
Modified: cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp (original)
+++ cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp Wed Aug 14 16:04:18 2019
@@ -986,7 +986,7 @@ public:
// Put back the original tokens.
Self.SkipUntil(EndKind, StopAtSemi | StopBeforeMatch);
if (Toks.size()) {
- auto Buffer = llvm::make_unique<Token[]>(Toks.size());
+ auto Buffer = std::make_unique<Token[]>(Toks.size());
std::copy(Toks.begin() + 1, Toks.end(), Buffer.get());
Buffer[Toks.size() - 1] = Self.Tok;
Self.PP.EnterTokenStream(std::move(Buffer), Toks.size(), true,
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Wed Aug 14 16:04:18 2019
@@ -573,7 +573,7 @@ class CastExpressionIdValidator final :
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<CastExpressionIdValidator>(*this);
+ return std::make_unique<CastExpressionIdValidator>(*this);
}
private:
Modified: cfe/trunk/lib/Parse/ParsePragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParsePragma.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParsePragma.cpp (original)
+++ cfe/trunk/lib/Parse/ParsePragma.cpp Wed Aug 14 16:04:18 2019
@@ -265,122 +265,122 @@ struct PragmaAttributeHandler : public P
} // end namespace
void Parser::initializePragmaHandlers() {
- AlignHandler = llvm::make_unique<PragmaAlignHandler>();
+ AlignHandler = std::make_unique<PragmaAlignHandler>();
PP.AddPragmaHandler(AlignHandler.get());
- GCCVisibilityHandler = llvm::make_unique<PragmaGCCVisibilityHandler>();
+ GCCVisibilityHandler = std::make_unique<PragmaGCCVisibilityHandler>();
PP.AddPragmaHandler("GCC", GCCVisibilityHandler.get());
- OptionsHandler = llvm::make_unique<PragmaOptionsHandler>();
+ OptionsHandler = std::make_unique<PragmaOptionsHandler>();
PP.AddPragmaHandler(OptionsHandler.get());
- PackHandler = llvm::make_unique<PragmaPackHandler>();
+ PackHandler = std::make_unique<PragmaPackHandler>();
PP.AddPragmaHandler(PackHandler.get());
- MSStructHandler = llvm::make_unique<PragmaMSStructHandler>();
+ MSStructHandler = std::make_unique<PragmaMSStructHandler>();
PP.AddPragmaHandler(MSStructHandler.get());
- UnusedHandler = llvm::make_unique<PragmaUnusedHandler>();
+ UnusedHandler = std::make_unique<PragmaUnusedHandler>();
PP.AddPragmaHandler(UnusedHandler.get());
- WeakHandler = llvm::make_unique<PragmaWeakHandler>();
+ WeakHandler = std::make_unique<PragmaWeakHandler>();
PP.AddPragmaHandler(WeakHandler.get());
- RedefineExtnameHandler = llvm::make_unique<PragmaRedefineExtnameHandler>();
+ RedefineExtnameHandler = std::make_unique<PragmaRedefineExtnameHandler>();
PP.AddPragmaHandler(RedefineExtnameHandler.get());
- FPContractHandler = llvm::make_unique<PragmaFPContractHandler>();
+ FPContractHandler = std::make_unique<PragmaFPContractHandler>();
PP.AddPragmaHandler("STDC", FPContractHandler.get());
- STDCFENVHandler = llvm::make_unique<PragmaSTDC_FENV_ACCESSHandler>();
+ STDCFENVHandler = std::make_unique<PragmaSTDC_FENV_ACCESSHandler>();
PP.AddPragmaHandler("STDC", STDCFENVHandler.get());
- STDCCXLIMITHandler = llvm::make_unique<PragmaSTDC_CX_LIMITED_RANGEHandler>();
+ STDCCXLIMITHandler = std::make_unique<PragmaSTDC_CX_LIMITED_RANGEHandler>();
PP.AddPragmaHandler("STDC", STDCCXLIMITHandler.get());
- STDCUnknownHandler = llvm::make_unique<PragmaSTDC_UnknownHandler>();
+ STDCUnknownHandler = std::make_unique<PragmaSTDC_UnknownHandler>();
PP.AddPragmaHandler("STDC", STDCUnknownHandler.get());
- PCSectionHandler = llvm::make_unique<PragmaClangSectionHandler>(Actions);
+ PCSectionHandler = std::make_unique<PragmaClangSectionHandler>(Actions);
PP.AddPragmaHandler("clang", PCSectionHandler.get());
if (getLangOpts().OpenCL) {
- OpenCLExtensionHandler = llvm::make_unique<PragmaOpenCLExtensionHandler>();
+ OpenCLExtensionHandler = std::make_unique<PragmaOpenCLExtensionHandler>();
PP.AddPragmaHandler("OPENCL", OpenCLExtensionHandler.get());
PP.AddPragmaHandler("OPENCL", FPContractHandler.get());
}
if (getLangOpts().OpenMP)
- OpenMPHandler = llvm::make_unique<PragmaOpenMPHandler>();
+ OpenMPHandler = std::make_unique<PragmaOpenMPHandler>();
else
- OpenMPHandler = llvm::make_unique<PragmaNoOpenMPHandler>();
+ OpenMPHandler = std::make_unique<PragmaNoOpenMPHandler>();
PP.AddPragmaHandler(OpenMPHandler.get());
if (getLangOpts().MicrosoftExt ||
getTargetInfo().getTriple().isOSBinFormatELF()) {
- MSCommentHandler = llvm::make_unique<PragmaCommentHandler>(Actions);
+ MSCommentHandler = std::make_unique<PragmaCommentHandler>(Actions);
PP.AddPragmaHandler(MSCommentHandler.get());
}
if (getLangOpts().MicrosoftExt) {
MSDetectMismatchHandler =
- llvm::make_unique<PragmaDetectMismatchHandler>(Actions);
+ std::make_unique<PragmaDetectMismatchHandler>(Actions);
PP.AddPragmaHandler(MSDetectMismatchHandler.get());
- MSPointersToMembers = llvm::make_unique<PragmaMSPointersToMembers>();
+ MSPointersToMembers = std::make_unique<PragmaMSPointersToMembers>();
PP.AddPragmaHandler(MSPointersToMembers.get());
- MSVtorDisp = llvm::make_unique<PragmaMSVtorDisp>();
+ MSVtorDisp = std::make_unique<PragmaMSVtorDisp>();
PP.AddPragmaHandler(MSVtorDisp.get());
- MSInitSeg = llvm::make_unique<PragmaMSPragma>("init_seg");
+ MSInitSeg = std::make_unique<PragmaMSPragma>("init_seg");
PP.AddPragmaHandler(MSInitSeg.get());
- MSDataSeg = llvm::make_unique<PragmaMSPragma>("data_seg");
+ MSDataSeg = std::make_unique<PragmaMSPragma>("data_seg");
PP.AddPragmaHandler(MSDataSeg.get());
- MSBSSSeg = llvm::make_unique<PragmaMSPragma>("bss_seg");
+ MSBSSSeg = std::make_unique<PragmaMSPragma>("bss_seg");
PP.AddPragmaHandler(MSBSSSeg.get());
- MSConstSeg = llvm::make_unique<PragmaMSPragma>("const_seg");
+ MSConstSeg = std::make_unique<PragmaMSPragma>("const_seg");
PP.AddPragmaHandler(MSConstSeg.get());
- MSCodeSeg = llvm::make_unique<PragmaMSPragma>("code_seg");
+ MSCodeSeg = std::make_unique<PragmaMSPragma>("code_seg");
PP.AddPragmaHandler(MSCodeSeg.get());
- MSSection = llvm::make_unique<PragmaMSPragma>("section");
+ MSSection = std::make_unique<PragmaMSPragma>("section");
PP.AddPragmaHandler(MSSection.get());
- MSRuntimeChecks = llvm::make_unique<PragmaMSRuntimeChecksHandler>();
+ MSRuntimeChecks = std::make_unique<PragmaMSRuntimeChecksHandler>();
PP.AddPragmaHandler(MSRuntimeChecks.get());
- MSIntrinsic = llvm::make_unique<PragmaMSIntrinsicHandler>();
+ MSIntrinsic = std::make_unique<PragmaMSIntrinsicHandler>();
PP.AddPragmaHandler(MSIntrinsic.get());
- MSOptimize = llvm::make_unique<PragmaMSOptimizeHandler>();
+ MSOptimize = std::make_unique<PragmaMSOptimizeHandler>();
PP.AddPragmaHandler(MSOptimize.get());
}
if (getLangOpts().CUDA) {
CUDAForceHostDeviceHandler =
- llvm::make_unique<PragmaForceCUDAHostDeviceHandler>(Actions);
+ std::make_unique<PragmaForceCUDAHostDeviceHandler>(Actions);
PP.AddPragmaHandler("clang", CUDAForceHostDeviceHandler.get());
}
- OptimizeHandler = llvm::make_unique<PragmaOptimizeHandler>(Actions);
+ OptimizeHandler = std::make_unique<PragmaOptimizeHandler>(Actions);
PP.AddPragmaHandler("clang", OptimizeHandler.get());
- LoopHintHandler = llvm::make_unique<PragmaLoopHintHandler>();
+ LoopHintHandler = std::make_unique<PragmaLoopHintHandler>();
PP.AddPragmaHandler("clang", LoopHintHandler.get());
- UnrollHintHandler = llvm::make_unique<PragmaUnrollHintHandler>("unroll");
+ UnrollHintHandler = std::make_unique<PragmaUnrollHintHandler>("unroll");
PP.AddPragmaHandler(UnrollHintHandler.get());
- NoUnrollHintHandler = llvm::make_unique<PragmaUnrollHintHandler>("nounroll");
+ NoUnrollHintHandler = std::make_unique<PragmaUnrollHintHandler>("nounroll");
PP.AddPragmaHandler(NoUnrollHintHandler.get());
UnrollAndJamHintHandler =
- llvm::make_unique<PragmaUnrollHintHandler>("unroll_and_jam");
+ std::make_unique<PragmaUnrollHintHandler>("unroll_and_jam");
PP.AddPragmaHandler(UnrollAndJamHintHandler.get());
NoUnrollAndJamHintHandler =
- llvm::make_unique<PragmaUnrollHintHandler>("nounroll_and_jam");
+ std::make_unique<PragmaUnrollHintHandler>("nounroll_and_jam");
PP.AddPragmaHandler(NoUnrollAndJamHintHandler.get());
- FPHandler = llvm::make_unique<PragmaFPHandler>();
+ FPHandler = std::make_unique<PragmaFPHandler>();
PP.AddPragmaHandler("clang", FPHandler.get());
AttributePragmaHandler =
- llvm::make_unique<PragmaAttributeHandler>(AttrFactory);
+ std::make_unique<PragmaAttributeHandler>(AttrFactory);
PP.AddPragmaHandler("clang", AttributePragmaHandler.get());
}
@@ -1626,7 +1626,7 @@ void PragmaGCCVisibilityHandler::HandleP
return;
}
- auto Toks = llvm::make_unique<Token[]>(1);
+ auto Toks = std::make_unique<Token[]>(1);
Toks[0].startToken();
Toks[0].setKind(tok::annot_pragma_vis);
Toks[0].setLocation(VisLoc);
@@ -2242,7 +2242,7 @@ void PragmaOpenMPHandler::HandlePragma(P
Tok.setLocation(EodLoc);
Pragma.push_back(Tok);
- auto Toks = llvm::make_unique<Token[]>(Pragma.size());
+ auto Toks = std::make_unique<Token[]>(Pragma.size());
std::copy(Pragma.begin(), Pragma.end(), Toks.get());
PP.EnterTokenStream(std::move(Toks), Pragma.size(),
/*DisableMacroExpansion=*/false, /*IsReinject=*/false);
@@ -2459,7 +2459,7 @@ void PragmaMSPragma::HandlePragma(Prepro
TokenVector.push_back(EoF);
// We must allocate this array with new because EnterTokenStream is going to
// delete it later.
- auto TokenArray = llvm::make_unique<Token[]>(TokenVector.size());
+ auto TokenArray = std::make_unique<Token[]>(TokenVector.size());
std::copy(TokenVector.begin(), TokenVector.end(), TokenArray.get());
auto Value = new (PP.getPreprocessorAllocator())
std::pair<std::unique_ptr<Token[]>, size_t>(std::move(TokenArray),
@@ -2744,7 +2744,7 @@ void PragmaFPHandler::HandlePragma(Prepr
return;
}
- auto TokenArray = llvm::make_unique<Token[]>(TokenList.size());
+ auto TokenArray = std::make_unique<Token[]>(TokenList.size());
std::copy(TokenList.begin(), TokenList.end(), TokenArray.get());
PP.EnterTokenStream(std::move(TokenArray), TokenList.size(),
@@ -2929,7 +2929,7 @@ void PragmaLoopHintHandler::HandlePragma
return;
}
- auto TokenArray = llvm::make_unique<Token[]>(TokenList.size());
+ auto TokenArray = std::make_unique<Token[]>(TokenList.size());
std::copy(TokenList.begin(), TokenList.end(), TokenArray.get());
PP.EnterTokenStream(std::move(TokenArray), TokenList.size(),
@@ -3001,7 +3001,7 @@ void PragmaUnrollHintHandler::HandlePrag
}
// Generate the hint token.
- auto TokenArray = llvm::make_unique<Token[]>(1);
+ auto TokenArray = std::make_unique<Token[]>(1);
TokenArray[0].startToken();
TokenArray[0].setKind(tok::annot_pragma_loop_hint);
TokenArray[0].setLocation(PragmaName.getLocation());
@@ -3273,7 +3273,7 @@ void PragmaAttributeHandler::HandlePragm
<< "clang attribute";
// Generate the annotated pragma token.
- auto TokenArray = llvm::make_unique<Token[]>(1);
+ auto TokenArray = std::make_unique<Token[]>(1);
TokenArray[0].startToken();
TokenArray[0].setKind(tok::annot_pragma_attribute);
TokenArray[0].setLocation(FirstToken.getLocation());
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Wed Aug 14 16:04:18 2019
@@ -140,7 +140,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<StatementFilterCCC>(*this);
+ return std::make_unique<StatementFilterCCC>(*this);
}
private:
Modified: cfe/trunk/lib/Parse/ParseTentative.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTentative.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseTentative.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTentative.cpp Wed Aug 14 16:04:18 2019
@@ -1193,7 +1193,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<TentativeParseCCC>(*this);
+ return std::make_unique<TentativeParseCCC>(*this);
}
};
}
Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Wed Aug 14 16:04:18 2019
@@ -181,7 +181,7 @@ Sema::Sema(Preprocessor &pp, ASTContext
InitDataSharingAttributesStack();
std::unique_ptr<sema::SemaPPCallbacks> Callbacks =
- llvm::make_unique<sema::SemaPPCallbacks>();
+ std::make_unique<sema::SemaPPCallbacks>();
SemaPPCallbackHandler = Callbacks.get();
PP.addPPCallbacks(std::move(Callbacks));
SemaPPCallbackHandler->set(*this);
Modified: cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp Wed Aug 14 16:04:18 2019
@@ -440,7 +440,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<NestedNameSpecifierValidatorCCC>(*this);
+ return std::make_unique<NestedNameSpecifierValidatorCCC>(*this);
}
private:
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Aug 14 16:04:18 2019
@@ -106,7 +106,7 @@ class TypeNameValidatorCCC final : publi
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<TypeNameValidatorCCC>(*this);
+ return std::make_unique<TypeNameValidatorCCC>(*this);
}
private:
@@ -7785,7 +7785,7 @@ class DifferentNameValidatorCCC final :
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<DifferentNameValidatorCCC>(*this);
+ return std::make_unique<DifferentNameValidatorCCC>(*this);
}
private:
@@ -16791,7 +16791,7 @@ static void CheckForDuplicateEnumValues(
continue;
// Create new vector and push values onto it.
- auto Vec = llvm::make_unique<ECDVector>();
+ auto Vec = std::make_unique<ECDVector>();
Vec->push_back(D);
Vec->push_back(ECD);
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Aug 14 16:04:18 2019
@@ -3944,7 +3944,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<MemInitializerValidatorCCC>(*this);
+ return std::make_unique<MemInitializerValidatorCCC>(*this);
}
private:
@@ -9504,7 +9504,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<NamespaceValidatorCCC>(*this);
+ return std::make_unique<NamespaceValidatorCCC>(*this);
}
};
@@ -10083,7 +10083,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<UsingValidatorCCC>(*this);
+ return std::make_unique<UsingValidatorCCC>(*this);
}
private:
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Wed Aug 14 16:04:18 2019
@@ -512,7 +512,7 @@ class ObjCInterfaceValidatorCCC final :
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<ObjCInterfaceValidatorCCC>(*this);
+ return std::make_unique<ObjCInterfaceValidatorCCC>(*this);
}
private:
@@ -1387,7 +1387,7 @@ class ObjCTypeArgOrProtocolValidatorCCC
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<ObjCTypeArgOrProtocolValidatorCCC>(*this);
+ return std::make_unique<ObjCTypeArgOrProtocolValidatorCCC>(*this);
}
};
} // end anonymous namespace
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Aug 14 16:04:18 2019
@@ -4944,7 +4944,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<FunctionCallCCC>(*this);
+ return std::make_unique<FunctionCallCCC>(*this);
}
private:
Modified: cfe/trunk/lib/Sema/SemaExprMember.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprMember.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprMember.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprMember.cpp Wed Aug 14 16:04:18 2019
@@ -629,7 +629,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<RecordMemberExprValidatorCCC>(*this);
+ return std::make_unique<RecordMemberExprValidatorCCC>(*this);
}
private:
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Wed Aug 14 16:04:18 2019
@@ -2115,7 +2115,7 @@ class ObjCInterfaceOrSuperCCC final : pu
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<ObjCInterfaceOrSuperCCC>(*this);
+ return std::make_unique<ObjCInterfaceOrSuperCCC>(*this);
}
};
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Wed Aug 14 16:04:18 2019
@@ -2236,7 +2236,7 @@ class FieldInitializerValidatorCCC final
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<FieldInitializerValidatorCCC>(*this);
+ return std::make_unique<FieldInitializerValidatorCCC>(*this);
}
private:
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Wed Aug 14 16:04:18 2019
@@ -4745,7 +4745,7 @@ std::unique_ptr<TypoCorrectionConsumer>
// occurs). Note that CorrectionCandidateCallback is polymorphic and
// initially stack-allocated.
std::unique_ptr<CorrectionCandidateCallback> ClonedCCC = CCC.clone();
- auto Consumer = llvm::make_unique<TypoCorrectionConsumer>(
+ auto Consumer = std::make_unique<TypoCorrectionConsumer>(
*this, TypoName, LookupKind, S, SS, std::move(ClonedCCC), MemberContext,
EnteringContext);
Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Wed Aug 14 16:04:18 2019
@@ -2049,7 +2049,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<VarDeclFilterCCC>(*this);
+ return std::make_unique<VarDeclFilterCCC>(*this);
}
};
@@ -2071,7 +2071,7 @@ public:
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<VarOrFuncDeclFilterCCC>(*this);
+ return std::make_unique<VarOrFuncDeclFilterCCC>(*this);
}
};
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Wed Aug 14 16:04:18 2019
@@ -644,7 +644,7 @@ void Sema::diagnoseExprIntendedAsTemplat
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<TemplateCandidateFilter>(*this);
+ return std::make_unique<TemplateCandidateFilter>(*this);
}
};
@@ -3455,7 +3455,7 @@ bool Sema::resolveAssumedTemplateNameAsT
getAsTypeTemplateDecl(TC.getCorrectionDecl());
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<CandidateCallback>(*this);
+ return std::make_unique<CandidateCallback>(*this);
}
} FilterCCC;
@@ -10297,7 +10297,7 @@ void Sema::MarkAsLateParsedTemplate(Func
if (!FD)
return;
- auto LPT = llvm::make_unique<LateParsedTemplate>();
+ auto LPT = std::make_unique<LateParsedTemplate>();
// Take tokens to avoid allocations
LPT->Toks.swap(Toks);
Modified: cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp Wed Aug 14 16:04:18 2019
@@ -937,7 +937,7 @@ class ParameterPackValidatorCCC final :
}
std::unique_ptr<CorrectionCandidateCallback> clone() override {
- return llvm::make_unique<ParameterPackValidatorCCC>(*this);
+ return std::make_unique<ParameterPackValidatorCCC>(*this);
}
};
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Aug 14 16:04:18 2019
@@ -8729,7 +8729,7 @@ void ASTReader::ReadLateParsedTemplates(
/* In loop */) {
FunctionDecl *FD = cast<FunctionDecl>(GetDecl(LateParsedTemplates[Idx++]));
- auto LT = llvm::make_unique<LateParsedTemplate>();
+ auto LT = std::make_unique<LateParsedTemplate>();
LT->D = GetDecl(LateParsedTemplates[Idx++]);
ModuleFile *F = getOwningModuleFile(LT->D);
Modified: cfe/trunk/lib/Serialization/ModuleManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ModuleManager.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ModuleManager.cpp (original)
+++ cfe/trunk/lib/Serialization/ModuleManager.cpp Wed Aug 14 16:04:18 2019
@@ -144,7 +144,7 @@ ModuleManager::addModule(StringRef FileN
}
// Allocate a new module.
- auto NewModule = llvm::make_unique<ModuleFile>(Type, Generation);
+ auto NewModule = std::make_unique<ModuleFile>(Type, Generation);
NewModule->Index = Chain.size();
NewModule->FileName = FileName.str();
NewModule->File = Entry;
Modified: cfe/trunk/lib/Serialization/PCHContainerOperations.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/PCHContainerOperations.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/PCHContainerOperations.cpp (original)
+++ cfe/trunk/lib/Serialization/PCHContainerOperations.cpp Wed Aug 14 16:04:18 2019
@@ -54,7 +54,7 @@ std::unique_ptr<ASTConsumer> RawPCHConta
CompilerInstance &CI, const std::string &MainFileName,
const std::string &OutputFileName, std::unique_ptr<llvm::raw_pwrite_stream> OS,
std::shared_ptr<PCHBuffer> Buffer) const {
- return llvm::make_unique<RawPCHContainerGenerator>(std::move(OS), Buffer);
+ return std::make_unique<RawPCHContainerGenerator>(std::move(OS), Buffer);
}
StringRef
@@ -63,6 +63,6 @@ RawPCHContainerReader::ExtractPCH(llvm::
}
PCHContainerOperations::PCHContainerOperations() {
- registerWriter(llvm::make_unique<RawPCHContainerWriter>());
- registerReader(llvm::make_unique<RawPCHContainerReader>());
+ registerWriter(std::make_unique<RawPCHContainerWriter>());
+ registerReader(std::make_unique<RawPCHContainerReader>());
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp Wed Aug 14 16:04:18 2019
@@ -75,7 +75,7 @@ void ArrayBoundChecker::checkLocation(SV
// reference is outside the range.
// Generate a report for this bug.
- auto report = llvm::make_unique<BugReport>(*BT, BT->getDescription(), N);
+ auto report = std::make_unique<BugReport>(*BT, BT->getDescription(), N);
report->addRange(LoadS->getSourceRange());
C.emitReport(std::move(report));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp Wed Aug 14 16:04:18 2019
@@ -208,7 +208,7 @@ void ArrayBoundCheckerV2::checkLocation(
SVal ByteOffset = rawOffset.getByteOffset();
if (isTainted(state, ByteOffset)) {
reportOOB(checkerContext, state_exceedsUpperBound, OOB_Tainted,
- llvm::make_unique<TaintBugVisitor>(ByteOffset));
+ std::make_unique<TaintBugVisitor>(ByteOffset));
return;
}
} else if (state_exceedsUpperBound) {
@@ -256,7 +256,7 @@ void ArrayBoundCheckerV2::reportOOB(
break;
}
- auto BR = llvm::make_unique<BugReport>(*BT, os.str(), errorNode);
+ auto BR = std::make_unique<BugReport>(*BT, os.str(), errorNode);
BR->addVisitor(std::move(Visitor));
checkerContext.emitReport(std::move(BR));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp Wed Aug 14 16:04:18 2019
@@ -211,7 +211,7 @@ void NilArgChecker::generateBugReport(Ex
if (!BT)
BT.reset(new APIMisuse(this, "nil argument"));
- auto R = llvm::make_unique<BugReport>(*BT, Msg, N);
+ auto R = std::make_unique<BugReport>(*BT, Msg, N);
R->addRange(Range);
bugreporter::trackExpressionValue(N, E, *R);
C.emitReport(std::move(R));
@@ -520,7 +520,7 @@ void CFNumberChecker::checkPreStmt(const
if (!BT)
BT.reset(new APIMisuse(this, "Bad use of CFNumber APIs"));
- auto report = llvm::make_unique<BugReport>(*BT, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT, os.str(), N);
report->addRange(CE->getArg(2)->getSourceRange());
C.emitReport(std::move(report));
}
@@ -575,7 +575,7 @@ void CFRetainReleaseChecker::checkPreCal
OS << "Null pointer argument in call to "
<< cast<FunctionDecl>(Call.getDecl())->getName();
- auto report = llvm::make_unique<BugReport>(BT, OS.str(), N);
+ auto report = std::make_unique<BugReport>(BT, OS.str(), N);
report->addRange(Call.getArgSourceRange(0));
bugreporter::trackExpressionValue(N, Call.getArgExpr(0), *report);
C.emitReport(std::move(report));
@@ -635,7 +635,7 @@ void ClassReleaseChecker::checkPreObjCMe
"of class '" << Class->getName()
<< "' and not the class directly";
- auto report = llvm::make_unique<BugReport>(*BT, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT, os.str(), N);
report->addRange(msg.getSourceRange());
C.emitReport(std::move(report));
}
@@ -788,7 +788,7 @@ void VariadicMethodTypeChecker::checkPre
ArgTy.print(os, C.getLangOpts());
os << "'";
- auto R = llvm::make_unique<BugReport>(*BT, os.str(), errorNode.getValue());
+ auto R = std::make_unique<BugReport>(*BT, os.str(), errorNode.getValue());
R->addRange(msg.getArgSourceRange(I));
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp Wed Aug 14 16:04:18 2019
@@ -173,7 +173,7 @@ void BlockInCriticalSectionChecker::repo
llvm::raw_string_ostream os(msg);
os << "Call to blocking function '" << Call.getCalleeIdentifier()->getName()
<< "' inside of critical section";
- auto R = llvm::make_unique<BugReport>(*BlockInCritSectionBugType, os.str(), ErrNode);
+ auto R = std::make_unique<BugReport>(*BlockInCritSectionBugType, os.str(), ErrNode);
R->addRange(Call.getSourceRange());
R->markInteresting(BlockDescSym);
C.emitReport(std::move(R));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp Wed Aug 14 16:04:18 2019
@@ -34,7 +34,7 @@ void BoolAssignmentChecker::emitReport(P
if (ExplodedNode *N = C.generateNonFatalErrorNode(state)) {
if (!BT)
BT.reset(new BuiltinBug(this, "Assignment of a non-Boolean value"));
- C.emitReport(llvm::make_unique<BugReport>(*BT, BT->getDescription(), N));
+ C.emitReport(std::make_unique<BugReport>(*BT, BT->getDescription(), N));
}
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp Wed Aug 14 16:04:18 2019
@@ -566,7 +566,7 @@ void CStringChecker::emitOverlapBug(Chec
categories::UnixAPI, "Improper arguments"));
// Generate a report for this bug.
- auto report = llvm::make_unique<BugReport>(
+ auto report = std::make_unique<BugReport>(
*BT_Overlap, "Arguments must not be overlapping buffers", N);
report->addRange(First->getSourceRange());
report->addRange(Second->getSourceRange());
@@ -583,7 +583,7 @@ void CStringChecker::emitNullArgBug(Chec
"Null pointer argument in call to byte string function"));
BuiltinBug *BT = static_cast<BuiltinBug *>(BT_Null.get());
- auto Report = llvm::make_unique<BugReport>(*BT, WarningMsg, N);
+ auto Report = std::make_unique<BugReport>(*BT, WarningMsg, N);
Report->addRange(S->getSourceRange());
if (const auto *Ex = dyn_cast<Expr>(S))
bugreporter::trackExpressionValue(N, Ex, *Report);
@@ -607,7 +607,7 @@ void CStringChecker::emitOutOfBoundsBug(
// FIXME: It would be nice to eventually make this diagnostic more clear,
// e.g., by referencing the original declaration or by saying *why* this
// reference is outside the range.
- auto Report = llvm::make_unique<BugReport>(*BT, WarningMsg, N);
+ auto Report = std::make_unique<BugReport>(*BT, WarningMsg, N);
Report->addRange(S->getSourceRange());
C.emitReport(std::move(Report));
}
@@ -622,7 +622,7 @@ void CStringChecker::emitNotCStringBug(C
Filter.CheckNameCStringNotNullTerm, categories::UnixAPI,
"Argument is not a null-terminated string."));
- auto Report = llvm::make_unique<BugReport>(*BT_NotCString, WarningMsg, N);
+ auto Report = std::make_unique<BugReport>(*BT_NotCString, WarningMsg, N);
Report->addRange(S->getSourceRange());
C.emitReport(std::move(Report));
@@ -644,7 +644,7 @@ void CStringChecker::emitAdditionOverflo
"This expression will create a string whose length is too big to "
"be represented as a size_t";
- auto Report = llvm::make_unique<BugReport>(*BT_NotCString, WarningMsg, N);
+ auto Report = std::make_unique<BugReport>(*BT_NotCString, WarningMsg, N);
C.emitReport(std::move(Report));
}
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp Wed Aug 14 16:04:18 2019
@@ -95,7 +95,7 @@ void CallAndMessageChecker::emitBadCall(
if (!N)
return;
- auto R = llvm::make_unique<BugReport>(*BT, BT->getName(), N);
+ auto R = std::make_unique<BugReport>(*BT, BT->getName(), N);
if (BadE) {
R->addRange(BadE->getSourceRange());
if (BadE->isGLValue())
@@ -175,7 +175,7 @@ bool CallAndMessageChecker::uninitRefOrP
if (PSV.isUndef()) {
if (ExplodedNode *N = C.generateErrorNode()) {
LazyInit_BT(BD, BT);
- auto R = llvm::make_unique<BugReport>(*BT, Os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT, Os.str(), N);
R->addRange(ArgRange);
if (ArgEx)
bugreporter::trackExpressionValue(N, ArgEx, *R);
@@ -252,7 +252,7 @@ bool CallAndMessageChecker::PreVisitProc
SmallString<200> Buf;
llvm::raw_svector_ostream Os(Buf);
describeUninitializedArgumentInCall(Call, ArgumentNumber, Os);
- auto R = llvm::make_unique<BugReport>(*BT, Os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT, Os.str(), N);
R->addRange(ArgRange);
if (ArgEx)
@@ -295,7 +295,7 @@ bool CallAndMessageChecker::PreVisitProc
}
// Generate a report for this bug.
- auto R = llvm::make_unique<BugReport>(*BT, os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT, os.str(), N);
R->addRange(ArgRange);
if (ArgEx)
@@ -358,7 +358,7 @@ void CallAndMessageChecker::checkPreStmt
else
Desc = "Argument to 'delete' is uninitialized";
BugType *BT = BT_cxx_delete_undef.get();
- auto R = llvm::make_unique<BugReport>(*BT, Desc, N);
+ auto R = std::make_unique<BugReport>(*BT, Desc, N);
bugreporter::trackExpressionValue(N, DE, *R);
C.emitReport(std::move(R));
return;
@@ -421,7 +421,7 @@ void CallAndMessageChecker::checkPreCall
<< Call.getNumArgs() << ")";
C.emitReport(
- llvm::make_unique<BugReport>(*BT_call_few_args, os.str(), N));
+ std::make_unique<BugReport>(*BT_call_few_args, os.str(), N));
}
}
@@ -482,7 +482,7 @@ void CallAndMessageChecker::checkPreObjC
}
assert(BT && "Unknown message kind.");
- auto R = llvm::make_unique<BugReport>(*BT, BT->getName(), N);
+ auto R = std::make_unique<BugReport>(*BT, BT->getName(), N);
const ObjCMessageExpr *ME = msg.getOriginExpr();
R->addRange(ME->getReceiverRange());
@@ -525,7 +525,7 @@ void CallAndMessageChecker::emitNilRecei
os << "' that will be garbage";
}
- auto report = llvm::make_unique<BugReport>(*BT_msg_ret, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT_msg_ret, os.str(), N);
report->addRange(ME->getReceiverRange());
// FIXME: This won't track "self" in messages to super.
if (const Expr *receiver = ME->getInstanceReceiver()) {
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp Wed Aug 14 16:04:18 2019
@@ -132,7 +132,7 @@ void CastSizeChecker::checkPreStmt(const
BT.reset(new BuiltinBug(this, "Cast region with wrong size.",
"Cast a region whose size is not a multiple"
" of the destination type size."));
- auto R = llvm::make_unique<BugReport>(*BT, BT->getDescription(), errorNode);
+ auto R = std::make_unique<BugReport>(*BT, BT->getDescription(), errorNode);
R->addRange(CE->getSourceRange());
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp Wed Aug 14 16:04:18 2019
@@ -127,7 +127,7 @@ void ChrootChecker::checkPreCall(const C
BT_BreakJail.reset(new BuiltinBug(
this, "Break out of jail", "No call of chdir(\"/\") immediately "
"after chroot"));
- C.emitReport(llvm::make_unique<BugReport>(
+ C.emitReport(std::make_unique<BugReport>(
*BT_BreakJail, BT_BreakJail->getDescription(), N));
}
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CloneChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CloneChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CloneChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CloneChecker.cpp Wed Aug 14 16:04:18 2019
@@ -114,7 +114,7 @@ void CloneChecker::reportClones(
for (const CloneDetector::CloneGroup &Group : CloneGroups) {
// We group the clones by printing the first as a warning and all others
// as a note.
- auto R = llvm::make_unique<BugReport>(*BT_Exact, "Duplicate code detected",
+ auto R = std::make_unique<BugReport>(*BT_Exact, "Duplicate code detected",
makeLocation(Group.front(), Mgr));
R->addRange(Group.front().getSourceRange());
@@ -169,7 +169,7 @@ void CloneChecker::reportSuspiciousClone
// which may confuse the user.
// Think how to perform more accurate suggestions?
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BT_Suspicious,
"Potential copy-paste error; did you really mean to use '" +
Pair.FirstCloneInfo.Variable->getNameAsString() + "' here?",
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ConversionChecker.cpp Wed Aug 14 16:04:18 2019
@@ -121,7 +121,7 @@ void ConversionChecker::reportBug(Explod
new BuiltinBug(this, "Conversion", "Possible loss of sign/precision."));
// Generate a report for this bug.
- auto R = llvm::make_unique<BugReport>(*BT, Msg, N);
+ auto R = std::make_unique<BugReport>(*BT, Msg, N);
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp Wed Aug 14 16:04:18 2019
@@ -333,7 +333,7 @@ public:
if (!Node)
return;
- auto Report = llvm::make_unique<BugReport>(BT_stmtLoc, "Statement", Node);
+ auto Report = std::make_unique<BugReport>(BT_stmtLoc, "Statement", Node);
C.emitReport(std::move(Report));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DeleteWithNonVirtualDtorChecker.cpp Wed Aug 14 16:04:18 2019
@@ -92,11 +92,11 @@ void DeleteWithNonVirtualDtorChecker::ch
"Logic error"));
ExplodedNode *N = C.generateNonFatalErrorNode();
- auto R = llvm::make_unique<BugReport>(*BT, BT->getName(), N);
+ auto R = std::make_unique<BugReport>(*BT, BT->getName(), N);
// Mark region of problematic base class for later use in the BugVisitor.
R->markInteresting(BaseClassRegion);
- R->addVisitor(llvm::make_unique<DeleteBugVisitor>());
+ R->addVisitor(std::make_unique<DeleteBugVisitor>());
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp Wed Aug 14 16:04:18 2019
@@ -179,7 +179,7 @@ void DereferenceChecker::reportBug(Progr
break;
}
- auto report = llvm::make_unique<BugReport>(
+ auto report = std::make_unique<BugReport>(
*BT_null, buf.empty() ? BT_null->getDescription() : StringRef(buf), N);
bugreporter::trackExpressionValue(N, bugreporter::getDerefExpr(S), *report);
@@ -201,7 +201,7 @@ void DereferenceChecker::checkLocation(S
new BuiltinBug(this, "Dereference of undefined pointer value"));
auto report =
- llvm::make_unique<BugReport>(*BT_undef, BT_undef->getDescription(), N);
+ std::make_unique<BugReport>(*BT_undef, BT_undef->getDescription(), N);
bugreporter::trackExpressionValue(N, bugreporter::getDerefExpr(S), *report);
C.emitReport(std::move(report));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp Wed Aug 14 16:04:18 2019
@@ -47,7 +47,7 @@ void DivZeroChecker::reportBug(
if (!BT)
BT.reset(new BuiltinBug(this, "Division by zero"));
- auto R = llvm::make_unique<BugReport>(*BT, Msg, N);
+ auto R = std::make_unique<BugReport>(*BT, Msg, N);
R->addVisitor(std::move(Visitor));
bugreporter::trackExpressionValue(N, getDenomExpr(N), *R);
C.emitReport(std::move(R));
@@ -88,7 +88,7 @@ void DivZeroChecker::checkPreStmt(const
bool TaintedD = isTainted(C.getState(), *DV);
if ((stateNotZero && stateZero && TaintedD)) {
reportBug("Division by a tainted value, possibly zero", stateZero, C,
- llvm::make_unique<taint::TaintBugVisitor>(*DV));
+ std::make_unique<taint::TaintBugVisitor>(*DV));
return;
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp Wed Aug 14 16:04:18 2019
@@ -83,7 +83,7 @@ void DynamicTypeChecker::reportTypeError
std::unique_ptr<BugReport> R(
new BugReport(*BT, OS.str(), C.generateNonFatalErrorNode()));
R->markInteresting(Reg);
- R->addVisitor(llvm::make_unique<DynamicTypeBugVisitor>(Reg));
+ R->addVisitor(std::make_unique<DynamicTypeBugVisitor>(Reg));
R->addRange(ReportedNode->getSourceRange());
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp Wed Aug 14 16:04:18 2019
@@ -922,7 +922,7 @@ void DynamicTypePropagation::reportGener
std::unique_ptr<BugReport> R(
new BugReport(*ObjCGenericsBugType, OS.str(), N));
R->markInteresting(Sym);
- R->addVisitor(llvm::make_unique<GenericsBugVisitor>(Sym));
+ R->addVisitor(std::make_unique<GenericsBugVisitor>(Sym));
if (ReportedNode)
R->addRange(ReportedNode->getSourceRange());
C.emitReport(std::move(R));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp Wed Aug 14 16:04:18 2019
@@ -83,7 +83,7 @@ void EnumCastOutOfRangeChecker::reportWa
new BuiltinBug(this, "Enum cast out of range",
"The value provided to the cast expression is not in "
"the valid range of values for the enum"));
- C.emitReport(llvm::make_unique<BugReport>(
+ C.emitReport(std::make_unique<BugReport>(
*EnumValueCastOutOfRange, EnumValueCastOutOfRange->getDescription(),
N));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp Wed Aug 14 16:04:18 2019
@@ -148,7 +148,7 @@ ExplodedNode *ExprInspectionChecker::rep
if (!BT)
BT.reset(new BugType(this, "Checking analyzer assumptions", "debug"));
- BR.emitReport(llvm::make_unique<BugReport>(*BT, Msg, N));
+ BR.emitReport(std::make_unique<BugReport>(*BT, Msg, N));
return N;
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp Wed Aug 14 16:04:18 2019
@@ -55,7 +55,7 @@ void FixedAddressChecker::checkPreStmt(c
"Using a fixed address is not portable because that "
"address will probably not be valid in all "
"environments or platforms."));
- auto R = llvm::make_unique<BugReport>(*BT, BT->getDescription(), N);
+ auto R = std::make_unique<BugReport>(*BT, BT->getDescription(), N);
R->addRange(B->getRHS()->getSourceRange());
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp Wed Aug 14 16:04:18 2019
@@ -718,9 +718,9 @@ bool GenericTaintChecker::generateReport
// Generate diagnostic.
if (ExplodedNode *N = C.generateNonFatalErrorNode()) {
initBugType();
- auto report = llvm::make_unique<BugReport>(*BT, Msg, N);
+ auto report = std::make_unique<BugReport>(*BT, Msg, N);
report->addRange(E->getSourceRange());
- report->addVisitor(llvm::make_unique<TaintBugVisitor>(TaintedSVal));
+ report->addVisitor(std::make_unique<TaintBugVisitor>(TaintedSVal));
C.emitReport(std::move(report));
return true;
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp Wed Aug 14 16:04:18 2019
@@ -261,7 +261,7 @@ namespace ento {
namespace allocation_state {
std::unique_ptr<BugReporterVisitor> getInnerPointerBRVisitor(SymbolRef Sym) {
- return llvm::make_unique<InnerPointerChecker::InnerPointerBRVisitor>(Sym);
+ return std::make_unique<InnerPointerChecker::InnerPointerBRVisitor>(Sym);
}
const MemRegion *getContainerObjRegion(ProgramStateRef State, SymbolRef Sym) {
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/IteratorChecker.cpp Wed Aug 14 16:04:18 2019
@@ -1591,7 +1591,7 @@ IteratorPosition IteratorChecker::advanc
void IteratorChecker::reportOutOfRangeBug(const StringRef &Message,
const SVal &Val, CheckerContext &C,
ExplodedNode *ErrNode) const {
- auto R = llvm::make_unique<BugReport>(*OutOfRangeBugType, Message, ErrNode);
+ auto R = std::make_unique<BugReport>(*OutOfRangeBugType, Message, ErrNode);
R->markInteresting(Val);
C.emitReport(std::move(R));
}
@@ -1600,7 +1600,7 @@ void IteratorChecker::reportMismatchedBu
const SVal &Val1, const SVal &Val2,
CheckerContext &C,
ExplodedNode *ErrNode) const {
- auto R = llvm::make_unique<BugReport>(*MismatchedBugType, Message, ErrNode);
+ auto R = std::make_unique<BugReport>(*MismatchedBugType, Message, ErrNode);
R->markInteresting(Val1);
R->markInteresting(Val2);
C.emitReport(std::move(R));
@@ -1610,7 +1610,7 @@ void IteratorChecker::reportMismatchedBu
const SVal &Val, const MemRegion *Reg,
CheckerContext &C,
ExplodedNode *ErrNode) const {
- auto R = llvm::make_unique<BugReport>(*MismatchedBugType, Message, ErrNode);
+ auto R = std::make_unique<BugReport>(*MismatchedBugType, Message, ErrNode);
R->markInteresting(Val);
R->markInteresting(Reg);
C.emitReport(std::move(R));
@@ -1619,7 +1619,7 @@ void IteratorChecker::reportMismatchedBu
void IteratorChecker::reportInvalidatedBug(const StringRef &Message,
const SVal &Val, CheckerContext &C,
ExplodedNode *ErrNode) const {
- auto R = llvm::make_unique<BugReport>(*InvalidatedBugType, Message, ErrNode);
+ auto R = std::make_unique<BugReport>(*InvalidatedBugType, Message, ErrNode);
R->markInteresting(Val);
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp Wed Aug 14 16:04:18 2019
@@ -772,7 +772,7 @@ void NonLocalizedStringChecker::reportLo
const MemRegion *StringRegion = S.getAsRegion();
if (StringRegion)
- R->addVisitor(llvm::make_unique<NonLocalizedStringBRVisitor>(StringRegion));
+ R->addVisitor(std::make_unique<NonLocalizedStringBRVisitor>(StringRegion));
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MIGChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MIGChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MIGChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MIGChecker.cpp Wed Aug 14 16:04:18 2019
@@ -274,7 +274,7 @@ void MIGChecker::checkReturnAux(const Re
if (!N)
return;
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
BT,
"MIG callback fails with error after deallocating argument value. "
"This is a use-after-free vulnerability because the caller will try to "
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp Wed Aug 14 16:04:18 2019
@@ -30,7 +30,7 @@ void MPIBugReporter::reportDoubleNonbloc
ErrorText = "Double nonblocking on request " +
RequestRegion->getDescriptiveName() + ". ";
- auto Report = llvm::make_unique<BugReport>(*DoubleNonblockingBugType,
+ auto Report = std::make_unique<BugReport>(*DoubleNonblockingBugType,
ErrorText, ExplNode);
Report->addRange(MPICallEvent.getSourceRange());
@@ -39,7 +39,7 @@ void MPIBugReporter::reportDoubleNonbloc
if (Range.isValid())
Report->addRange(Range);
- Report->addVisitor(llvm::make_unique<RequestNodeVisitor>(
+ Report->addVisitor(std::make_unique<RequestNodeVisitor>(
RequestRegion, "Request is previously used by nonblocking call here. "));
Report->markInteresting(RequestRegion);
@@ -54,12 +54,12 @@ void MPIBugReporter::reportMissingWait(
" has no matching wait. "};
auto Report =
- llvm::make_unique<BugReport>(*MissingWaitBugType, ErrorText, ExplNode);
+ std::make_unique<BugReport>(*MissingWaitBugType, ErrorText, ExplNode);
SourceRange Range = RequestRegion->sourceRange();
if (Range.isValid())
Report->addRange(Range);
- Report->addVisitor(llvm::make_unique<RequestNodeVisitor>(
+ Report->addVisitor(std::make_unique<RequestNodeVisitor>(
RequestRegion, "Request is previously used by nonblocking call here. "));
Report->markInteresting(RequestRegion);
@@ -74,7 +74,7 @@ void MPIBugReporter::reportUnmatchedWait
" has no matching nonblocking call. "};
auto Report =
- llvm::make_unique<BugReport>(*UnmatchedWaitBugType, ErrorText, ExplNode);
+ std::make_unique<BugReport>(*UnmatchedWaitBugType, ErrorText, ExplNode);
Report->addRange(CE.getSourceRange());
SourceRange Range = RequestRegion->sourceRange();
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp Wed Aug 14 16:04:18 2019
@@ -236,8 +236,8 @@ void MacOSKeychainAPIChecker::
os << "Deallocator doesn't match the allocator: '"
<< FunctionsToTrack[PDeallocIdx].Name << "' should be used.";
- auto Report = llvm::make_unique<BugReport>(*BT, os.str(), N);
- Report->addVisitor(llvm::make_unique<SecKeychainBugVisitor>(AP.first));
+ auto Report = std::make_unique<BugReport>(*BT, os.str(), N);
+ Report->addVisitor(std::make_unique<SecKeychainBugVisitor>(AP.first));
Report->addRange(ArgExpr->getSourceRange());
markInteresting(Report.get(), AP);
C.emitReport(std::move(Report));
@@ -280,8 +280,8 @@ void MacOSKeychainAPIChecker::checkPreSt
<< "the allocator: missing a call to '"
<< FunctionsToTrack[DIdx].Name
<< "'.";
- auto Report = llvm::make_unique<BugReport>(*BT, os.str(), N);
- Report->addVisitor(llvm::make_unique<SecKeychainBugVisitor>(V));
+ auto Report = std::make_unique<BugReport>(*BT, os.str(), N);
+ Report->addVisitor(std::make_unique<SecKeychainBugVisitor>(V));
Report->addRange(ArgExpr->getSourceRange());
Report->markInteresting(AS->Region);
C.emitReport(std::move(Report));
@@ -334,7 +334,7 @@ void MacOSKeychainAPIChecker::checkPreSt
if (!N)
return;
initBugType();
- auto Report = llvm::make_unique<BugReport>(
+ auto Report = std::make_unique<BugReport>(
*BT, "Trying to free data which has not been allocated.", N);
Report->addRange(ArgExpr->getSourceRange());
if (AS)
@@ -488,10 +488,10 @@ MacOSKeychainAPIChecker::generateAllocat
AllocNode->getLocationContext());
auto Report =
- llvm::make_unique<BugReport>(*BT, os.str(), N, LocUsedForUniqueing,
+ std::make_unique<BugReport>(*BT, os.str(), N, LocUsedForUniqueing,
AllocNode->getLocationContext()->getDecl());
- Report->addVisitor(llvm::make_unique<SecKeychainBugVisitor>(AP.first));
+ Report->addVisitor(std::make_unique<SecKeychainBugVisitor>(AP.first));
markInteresting(Report.get(), AP);
return Report;
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp Wed Aug 14 16:04:18 2019
@@ -139,7 +139,7 @@ void MacOSXAPIChecker::CheckDispatchOnce
BT_dispatchOnce.reset(new BugType(this, "Improper use of 'dispatch_once'",
"API Misuse (Apple)"));
- auto report = llvm::make_unique<BugReport>(*BT_dispatchOnce, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT_dispatchOnce, os.str(), N);
report->addRange(CE->getArg(0)->getSourceRange());
C.emitReport(std::move(report));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Wed Aug 14 16:04:18 2019
@@ -1823,7 +1823,7 @@ void MallocChecker::ReportBadFree(Checke
printExpectedAllocName(os, C, DeallocExpr);
- auto R = llvm::make_unique<BugReport>(*BT_BadFree[*CheckKind], os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT_BadFree[*CheckKind], os.str(), N);
R->markInteresting(MR);
R->addRange(Range);
C.emitReport(std::move(R));
@@ -1847,7 +1847,7 @@ void MallocChecker::ReportFreeAlloca(Che
BT_FreeAlloca[*CheckKind].reset(new BugType(
CheckNames[*CheckKind], "Free alloca()", categories::MemoryError));
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BT_FreeAlloca[*CheckKind],
"Memory allocated by alloca() should not be deallocated", N);
R->markInteresting(ArgVal.getAsRegion());
@@ -1903,10 +1903,10 @@ void MallocChecker::ReportMismatchedDeal
os << ", not " << DeallocOs.str();
}
- auto R = llvm::make_unique<BugReport>(*BT_MismatchedDealloc, os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT_MismatchedDealloc, os.str(), N);
R->markInteresting(Sym);
R->addRange(Range);
- R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym));
+ R->addVisitor(std::make_unique<MallocBugVisitor>(Sym));
C.emitReport(std::move(R));
}
}
@@ -1962,7 +1962,7 @@ void MallocChecker::ReportOffsetFree(Che
else
os << "allocated memory";
- auto R = llvm::make_unique<BugReport>(*BT_OffsetFree[*CheckKind], os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT_OffsetFree[*CheckKind], os.str(), N);
R->markInteresting(MR->getBaseRegion());
R->addRange(Range);
C.emitReport(std::move(R));
@@ -1988,7 +1988,7 @@ void MallocChecker::ReportUseAfterFree(C
AllocationFamily AF =
C.getState()->get<RegionState>(Sym)->getAllocationFamily();
- auto R = llvm::make_unique<BugReport>(*BT_UseFree[*CheckKind],
+ auto R = std::make_unique<BugReport>(*BT_UseFree[*CheckKind],
AF == AF_InnerBuffer
? "Inner pointer of container used after re/deallocation"
: "Use of memory after it is freed",
@@ -1996,7 +1996,7 @@ void MallocChecker::ReportUseAfterFree(C
R->markInteresting(Sym);
R->addRange(Range);
- R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym));
+ R->addVisitor(std::make_unique<MallocBugVisitor>(Sym));
if (AF == AF_InnerBuffer)
R->addVisitor(allocation_state::getInnerPointerBRVisitor(Sym));
@@ -2022,7 +2022,7 @@ void MallocChecker::ReportDoubleFree(Che
BT_DoubleFree[*CheckKind].reset(new BugType(
CheckNames[*CheckKind], "Double free", categories::MemoryError));
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BT_DoubleFree[*CheckKind],
(Released ? "Attempt to free released memory"
: "Attempt to free non-owned memory"),
@@ -2031,7 +2031,7 @@ void MallocChecker::ReportDoubleFree(Che
R->markInteresting(Sym);
if (PrevSym)
R->markInteresting(PrevSym);
- R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym));
+ R->addVisitor(std::make_unique<MallocBugVisitor>(Sym));
C.emitReport(std::move(R));
}
}
@@ -2051,11 +2051,11 @@ void MallocChecker::ReportDoubleDelete(C
"Double delete",
categories::MemoryError));
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BT_DoubleDelete, "Attempt to delete released memory", N);
R->markInteresting(Sym);
- R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym));
+ R->addVisitor(std::make_unique<MallocBugVisitor>(Sym));
C.emitReport(std::move(R));
}
}
@@ -2079,13 +2079,13 @@ void MallocChecker::ReportUseZeroAllocat
new BugType(CheckNames[*CheckKind], "Use of zero allocated",
categories::MemoryError));
- auto R = llvm::make_unique<BugReport>(*BT_UseZerroAllocated[*CheckKind],
+ auto R = std::make_unique<BugReport>(*BT_UseZerroAllocated[*CheckKind],
"Use of zero-allocated memory", N);
R->addRange(Range);
if (Sym) {
R->markInteresting(Sym);
- R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym));
+ R->addVisitor(std::make_unique<MallocBugVisitor>(Sym));
}
C.emitReport(std::move(R));
}
@@ -2119,7 +2119,7 @@ void MallocChecker::ReportFunctionPointe
Os << " is a function pointer";
- auto R = llvm::make_unique<BugReport>(*BT_BadFree[*CheckKind], Os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT_BadFree[*CheckKind], Os.str(), N);
R->markInteresting(MR);
R->addRange(Range);
C.emitReport(std::move(R));
@@ -2344,11 +2344,11 @@ void MallocChecker::reportLeak(SymbolRef
os << "Potential memory leak";
}
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BT_Leak[*CheckKind], os.str(), N, LocUsedForUniqueing,
AllocNode->getLocationContext()->getDecl());
R->markInteresting(Sym);
- R->addVisitor(llvm::make_unique<MallocBugVisitor>(Sym, true));
+ R->addVisitor(std::make_unique<MallocBugVisitor>(Sym, true));
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp Wed Aug 14 16:04:18 2019
@@ -67,7 +67,7 @@ void MmapWriteExecChecker::checkPreCall(
if (!N)
return;
- auto Report = llvm::make_unique<BugReport>(
+ auto Report = std::make_unique<BugReport>(
*BT, "Both PROT_WRITE and PROT_EXEC flags are set. This can "
"lead to exploitable memory regions, which could be overwritten "
"with malicious code", N);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MoveChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MoveChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MoveChecker.cpp Wed Aug 14 16:04:18 2019
@@ -428,9 +428,9 @@ ExplodedNode *MoveChecker::reportBug(con
}
auto R =
- llvm::make_unique<BugReport>(*BT, OS.str(), N, LocUsedForUniqueing,
+ std::make_unique<BugReport>(*BT, OS.str(), N, LocUsedForUniqueing,
MoveNode->getLocationContext()->getDecl());
- R->addVisitor(llvm::make_unique<MovedBugVisitor>(*this, Region, RD, MK));
+ R->addVisitor(std::make_unique<MovedBugVisitor>(*this, Region, RD, MK));
C.emitReport(std::move(R));
return N;
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp Wed Aug 14 16:04:18 2019
@@ -67,7 +67,7 @@ void NSAutoreleasePoolChecker::checkPreO
return;
}
- auto Report = llvm::make_unique<BugReport>(
+ auto Report = std::make_unique<BugReport>(
*BT, "Use -drain instead of -release when using NSAutoreleasePool and "
"garbage collection", N);
Report->addRange(msg.getSourceRange());
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp Wed Aug 14 16:04:18 2019
@@ -273,7 +273,7 @@ void NSOrCFErrorDerefChecker::checkEvent
CFBT.reset(new CFErrorDerefBug(this));
bug = CFBT.get();
}
- BR.emitReport(llvm::make_unique<BugReport>(*bug, os.str(), event.SinkNode));
+ BR.emitReport(std::make_unique<BugReport>(*bug, os.str(), event.SinkNode));
}
static bool IsNSError(QualType T, IdentifierInfo *II) {
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp Wed Aug 14 16:04:18 2019
@@ -187,7 +187,7 @@ NonNullParamChecker::genReportNullAttrNo
BTAttrNonNull.reset(new BugType(
this, "Argument with 'nonnull' attribute passed null", "API"));
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BTAttrNonNull,
"Null pointer passed as an argument to a 'nonnull' parameter", ErrorNode);
if (ArgE)
@@ -201,7 +201,7 @@ std::unique_ptr<BugReport> NonNullParamC
if (!BTNullRefArg)
BTNullRefArg.reset(new BuiltinBug(this, "Dereference of null pointer"));
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BTNullRefArg, "Forming reference to null pointer", ErrorNode);
if (ArgE) {
const Expr *ArgEDeref = bugreporter::getDerefExpr(ArgE);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp Wed Aug 14 16:04:18 2019
@@ -163,10 +163,10 @@ private:
if (!BT)
BT.reset(new BugType(this, "Nullability", categories::MemoryError));
- auto R = llvm::make_unique<BugReport>(*BT, Msg, N);
+ auto R = std::make_unique<BugReport>(*BT, Msg, N);
if (Region) {
R->markInteresting(Region);
- R->addVisitor(llvm::make_unique<NullabilityBugVisitor>(Region));
+ R->addVisitor(std::make_unique<NullabilityBugVisitor>(Region));
}
if (ValueExpr) {
R->addRange(ValueExpr->getSourceRange());
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp Wed Aug 14 16:04:18 2019
@@ -47,7 +47,7 @@ void ObjCAtSyncChecker::checkPreStmt(con
BT_undef.reset(new BuiltinBug(this, "Uninitialized value used as mutex "
"for @synchronized"));
auto report =
- llvm::make_unique<BugReport>(*BT_undef, BT_undef->getDescription(), N);
+ std::make_unique<BugReport>(*BT_undef, BT_undef->getDescription(), N);
bugreporter::trackExpressionValue(N, Ex, *report);
C.emitReport(std::move(report));
}
@@ -71,7 +71,7 @@ void ObjCAtSyncChecker::checkPreStmt(con
this, "Nil value used as mutex for @synchronized() "
"(no synchronization will occur)"));
auto report =
- llvm::make_unique<BugReport>(*BT_null, BT_null->getDescription(), N);
+ std::make_unique<BugReport>(*BT_null, BT_null->getDescription(), N);
bugreporter::trackExpressionValue(N, Ex, *report);
C.emitReport(std::move(report));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp Wed Aug 14 16:04:18 2019
@@ -144,7 +144,7 @@ void ObjCContainersChecker::checkPreStmt
if (!N)
return;
initBugType();
- auto R = llvm::make_unique<BugReport>(*BT, "Index is out of bounds", N);
+ auto R = std::make_unique<BugReport>(*BT, "Index is out of bounds", N);
R->addRange(IdxExpr->getSourceRange());
bugreporter::trackExpressionValue(
N, IdxExpr, *R, bugreporter::TrackingKind::Thorough, false);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp Wed Aug 14 16:04:18 2019
@@ -159,7 +159,7 @@ void ObjCSelfInitChecker::checkForInvali
if (!BT)
BT.reset(new BugType(this, "Missing \"self = [(super or self) init...]\"",
categories::CoreFoundationObjectiveC));
- C.emitReport(llvm::make_unique<BugReport>(*BT, errorStr, N));
+ C.emitReport(std::make_unique<BugReport>(*BT, errorStr, N));
}
void ObjCSelfInitChecker::checkPostObjCMessage(const ObjCMethodCall &Msg,
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp Wed Aug 14 16:04:18 2019
@@ -190,7 +190,7 @@ void ObjCSuperDeallocChecker::reportUseA
std::unique_ptr<BugReport> BR(
new BugReport(*DoubleSuperDeallocBugType, Desc, ErrNode));
BR->addRange(S->getSourceRange());
- BR->addVisitor(llvm::make_unique<SuperDeallocBRVisitor>(Sym));
+ BR->addVisitor(std::make_unique<SuperDeallocBRVisitor>(Sym));
C.emitReport(std::move(BR));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp Wed Aug 14 16:04:18 2019
@@ -306,7 +306,7 @@ public:
const SmallVector<const FieldDecl *, 20> &OptimalFieldsOrder) const {
if (!PaddingBug)
PaddingBug =
- llvm::make_unique<BugType>(this, "Excessive Padding", "Performance");
+ std::make_unique<BugType>(this, "Excessive Padding", "Performance");
SmallString<100> Buf;
llvm::raw_svector_ostream Os(Buf);
@@ -335,7 +335,7 @@ public:
PathDiagnosticLocation CELoc =
PathDiagnosticLocation::create(RD, BR->getSourceManager());
- auto Report = llvm::make_unique<BugReport>(*PaddingBug, Os.str(), CELoc);
+ auto Report = std::make_unique<BugReport>(*PaddingBug, Os.str(), CELoc);
Report->setDeclWithIssue(RD);
Report->addRange(RD->getSourceRange());
BR->emitReport(std::move(Report));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp Wed Aug 14 16:04:18 2019
@@ -173,7 +173,7 @@ void PointerArithChecker::reportPointerA
this, "Dangerous pointer arithmetic",
"Pointer arithmetic on a pointer to base class is dangerous "
"because derived and base class may have different size."));
- auto R = llvm::make_unique<BugReport>(*BT_polyArray,
+ auto R = std::make_unique<BugReport>(*BT_polyArray,
BT_polyArray->getDescription(), N);
R->addRange(E->getSourceRange());
R->markInteresting(ArrayRegion);
@@ -196,7 +196,7 @@ void PointerArithChecker::reportPointerA
"Pointer arithmetic on non-array "
"variables relies on memory layout, "
"which is dangerous."));
- auto R = llvm::make_unique<BugReport>(*BT_pointerArith,
+ auto R = std::make_unique<BugReport>(*BT_pointerArith,
BT_pointerArith->getDescription(), N);
R->addRange(SR);
R->markInteresting(Region);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp Wed Aug 14 16:04:18 2019
@@ -63,7 +63,7 @@ void PointerSubChecker::checkPreStmt(con
new BuiltinBug(this, "Pointer subtraction",
"Subtraction of two pointers that do not point to "
"the same memory chunk may cause incorrect result."));
- auto R = llvm::make_unique<BugReport>(*BT, BT->getDescription(), N);
+ auto R = std::make_unique<BugReport>(*BT, BT->getDescription(), N);
R->addRange(B->getSourceRange());
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp Wed Aug 14 16:04:18 2019
@@ -240,7 +240,7 @@ void PthreadLockChecker::AcquireLock(Che
ExplodedNode *N = C.generateErrorNode();
if (!N)
return;
- auto report = llvm::make_unique<BugReport>(
+ auto report = std::make_unique<BugReport>(
*BT_doublelock, "This lock has already been acquired", N);
report->addRange(CE->getArg(0)->getSourceRange());
C.emitReport(std::move(report));
@@ -305,7 +305,7 @@ void PthreadLockChecker::ReleaseLock(Che
ExplodedNode *N = C.generateErrorNode();
if (!N)
return;
- auto Report = llvm::make_unique<BugReport>(
+ auto Report = std::make_unique<BugReport>(
*BT_doubleunlock, "This lock has already been unlocked", N);
Report->addRange(CE->getArg(0)->getSourceRange());
C.emitReport(std::move(Report));
@@ -328,7 +328,7 @@ void PthreadLockChecker::ReleaseLock(Che
ExplodedNode *N = C.generateErrorNode();
if (!N)
return;
- auto report = llvm::make_unique<BugReport>(
+ auto report = std::make_unique<BugReport>(
*BT_lor, "This was not the most recently acquired lock. Possible "
"lock order reversal", N);
report->addRange(CE->getArg(0)->getSourceRange());
@@ -399,7 +399,7 @@ void PthreadLockChecker::DestroyLock(Che
ExplodedNode *N = C.generateErrorNode();
if (!N)
return;
- auto Report = llvm::make_unique<BugReport>(*BT_destroylock, Message, N);
+ auto Report = std::make_unique<BugReport>(*BT_destroylock, Message, N);
Report->addRange(CE->getArg(0)->getSourceRange());
C.emitReport(std::move(Report));
}
@@ -438,7 +438,7 @@ void PthreadLockChecker::InitLock(Checke
ExplodedNode *N = C.generateErrorNode();
if (!N)
return;
- auto Report = llvm::make_unique<BugReport>(*BT_initlock, Message, N);
+ auto Report = std::make_unique<BugReport>(*BT_initlock, Message, N);
Report->addRange(CE->getArg(0)->getSourceRange());
C.emitReport(std::move(Report));
}
@@ -451,7 +451,7 @@ void PthreadLockChecker::reportUseDestro
ExplodedNode *N = C.generateErrorNode();
if (!N)
return;
- auto Report = llvm::make_unique<BugReport>(
+ auto Report = std::make_unique<BugReport>(
*BT_destroylock, "This lock has already been destroyed", N);
Report->addRange(CE->getArg(0)->getSourceRange());
C.emitReport(std::move(Report));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp Wed Aug 14 16:04:18 2019
@@ -875,7 +875,7 @@ void RetainCountChecker::processNonLeakE
if (!N)
return;
- auto report = llvm::make_unique<RefCountReport>(
+ auto report = std::make_unique<RefCountReport>(
errorKindToBugKind(ErrorKind, Sym),
C.getASTContext().getLangOpts(), N, Sym);
report->addRange(ErrorRange);
@@ -1095,7 +1095,7 @@ ExplodedNode * RetainCountChecker::check
if (N) {
const LangOptions &LOpts = C.getASTContext().getLangOpts();
auto R =
- llvm::make_unique<RefLeakReport>(leakAtReturn, LOpts, N, Sym, C);
+ std::make_unique<RefLeakReport>(leakAtReturn, LOpts, N, Sym, C);
C.emitReport(std::move(R));
}
return N;
@@ -1119,7 +1119,7 @@ ExplodedNode * RetainCountChecker::check
ExplodedNode *N = C.addTransition(state, Pred, &ReturnNotOwnedTag);
if (N) {
- auto R = llvm::make_unique<RefCountReport>(
+ auto R = std::make_unique<RefCountReport>(
returnNotOwnedForOwned, C.getASTContext().getLangOpts(), N, Sym);
C.emitReport(std::move(R));
}
@@ -1273,7 +1273,7 @@ RetainCountChecker::handleAutoreleaseCou
os << "has a +" << V.getCount() << " retain count";
const LangOptions &LOpts = Ctx.getASTContext().getLangOpts();
- auto R = llvm::make_unique<RefCountReport>(overAutorelease, LOpts, N, Sym,
+ auto R = std::make_unique<RefCountReport>(overAutorelease, LOpts, N, Sym,
os.str());
Ctx.emitReport(std::move(R));
}
@@ -1321,7 +1321,7 @@ RetainCountChecker::processLeaks(Program
if (N) {
for (SymbolRef L : Leaked) {
const RefCountBug &BT = Pred ? leakWithinFunction : leakAtReturn;
- Ctx.emitReport(llvm::make_unique<RefLeakReport>(BT, LOpts, N, L, Ctx));
+ Ctx.emitReport(std::make_unique<RefLeakReport>(BT, LOpts, N, L, Ctx));
}
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp Wed Aug 14 16:04:18 2019
@@ -817,7 +817,7 @@ RefCountReport::RefCountReport(const Ref
bool isLeak)
: BugReport(D, D.getDescription(), n), Sym(sym), isLeak(isLeak) {
if (!isLeak)
- addVisitor(llvm::make_unique<RefCountReportVisitor>(sym));
+ addVisitor(std::make_unique<RefCountReportVisitor>(sym));
}
RefCountReport::RefCountReport(const RefCountBug &D, const LangOptions &LOpts,
@@ -825,7 +825,7 @@ RefCountReport::RefCountReport(const Ref
StringRef endText)
: BugReport(D, D.getDescription(), endText, n) {
- addVisitor(llvm::make_unique<RefCountReportVisitor>(sym));
+ addVisitor(std::make_unique<RefCountReportVisitor>(sym));
}
void RefLeakReport::deriveParamLocation(CheckerContext &Ctx, SymbolRef sym) {
@@ -917,5 +917,5 @@ RefLeakReport::RefLeakReport(const RefCo
createDescription(Ctx);
- addVisitor(llvm::make_unique<RefLeakReportVisitor>(sym));
+ addVisitor(std::make_unique<RefLeakReportVisitor>(sym));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp Wed Aug 14 16:04:18 2019
@@ -79,7 +79,7 @@ void ReturnPointerRangeChecker::checkPre
// reference is outside the range.
// Generate a report for this bug.
- auto report = llvm::make_unique<BugReport>(*BT, BT->getDescription(), N);
+ auto report = std::make_unique<BugReport>(*BT, BT->getDescription(), N);
report->addRange(RetE->getSourceRange());
C.emitReport(std::move(report));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp Wed Aug 14 16:04:18 2019
@@ -83,7 +83,7 @@ static void emitBug(CheckerContext &C, B
if (!N)
return;
- auto Report = llvm::make_unique<BugReport>(BT, BT.getDescription(), N);
+ auto Report = std::make_unique<BugReport>(BT, BT.getDescription(), N);
Report->addRange(RetE->getSourceRange());
bugreporter::trackExpressionValue(N, TrackingE ? TrackingE : RetE, *Report);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp Wed Aug 14 16:04:18 2019
@@ -206,7 +206,7 @@ void SimpleStreamChecker::reportDoubleCl
return;
// Generate the report.
- auto R = llvm::make_unique<BugReport>(*DoubleCloseBugType,
+ auto R = std::make_unique<BugReport>(*DoubleCloseBugType,
"Closing a previously closed file stream", ErrNode);
R->addRange(Call.getSourceRange());
R->markInteresting(FileDescSym);
@@ -219,7 +219,7 @@ void SimpleStreamChecker::reportLeaks(Ar
// Attach bug reports to the leak node.
// TODO: Identify the leaked file descriptor.
for (SymbolRef LeakedStream : LeakedStreams) {
- auto R = llvm::make_unique<BugReport>(*LeakBugType,
+ auto R = std::make_unique<BugReport>(*LeakBugType,
"Opened file is never closed; potential resource leak", ErrNode);
R->markInteresting(LeakedStream);
C.emitReport(std::move(R));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp Wed Aug 14 16:04:18 2019
@@ -155,14 +155,14 @@ void StackAddrEscapeChecker::EmitStackEr
if (!N)
return;
if (!BT_returnstack)
- BT_returnstack = llvm::make_unique<BuiltinBug>(
+ BT_returnstack = std::make_unique<BuiltinBug>(
this, "Return of address to stack-allocated memory");
// Generate a report for this bug.
SmallString<128> buf;
llvm::raw_svector_ostream os(buf);
SourceRange range = genName(os, R, C.getASTContext());
os << " returned to caller";
- auto report = llvm::make_unique<BugReport>(*BT_returnstack, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT_returnstack, os.str(), N);
report->addRange(RetE->getSourceRange());
if (range.isValid())
report->addRange(range);
@@ -193,14 +193,14 @@ void StackAddrEscapeChecker::checkAsyncE
if (!N)
continue;
if (!BT_capturedstackasync)
- BT_capturedstackasync = llvm::make_unique<BuiltinBug>(
+ BT_capturedstackasync = std::make_unique<BuiltinBug>(
this, "Address of stack-allocated memory is captured");
SmallString<128> Buf;
llvm::raw_svector_ostream Out(Buf);
SourceRange Range = genName(Out, Region, C.getASTContext());
Out << " is captured by an asynchronously-executed block";
auto Report =
- llvm::make_unique<BugReport>(*BT_capturedstackasync, Out.str(), N);
+ std::make_unique<BugReport>(*BT_capturedstackasync, Out.str(), N);
if (Range.isValid())
Report->addRange(Range);
C.emitReport(std::move(Report));
@@ -216,14 +216,14 @@ void StackAddrEscapeChecker::checkReturn
if (!N)
continue;
if (!BT_capturedstackret)
- BT_capturedstackret = llvm::make_unique<BuiltinBug>(
+ BT_capturedstackret = std::make_unique<BuiltinBug>(
this, "Address of stack-allocated memory is captured");
SmallString<128> Buf;
llvm::raw_svector_ostream Out(Buf);
SourceRange Range = genName(Out, Region, C.getASTContext());
Out << " is captured by a returned block";
auto Report =
- llvm::make_unique<BugReport>(*BT_capturedstackret, Out.str(), N);
+ std::make_unique<BugReport>(*BT_capturedstackret, Out.str(), N);
if (Range.isValid())
Report->addRange(Range);
C.emitReport(std::move(Report));
@@ -331,7 +331,7 @@ void StackAddrEscapeChecker::checkEndFun
return;
if (!BT_stackleak)
- BT_stackleak = llvm::make_unique<BuiltinBug>(
+ BT_stackleak = std::make_unique<BuiltinBug>(
this, "Stack address stored into global variable",
"Stack address was saved into a global variable. "
"This is dangerous because the address will become "
@@ -351,7 +351,7 @@ void StackAddrEscapeChecker::checkEndFun
const VarRegion *VR = cast<VarRegion>(P.first->getBaseRegion());
Out << *VR->getDecl()
<< "' upon returning to the caller. This will be a dangling reference";
- auto Report = llvm::make_unique<BugReport>(*BT_stackleak, Out.str(), N);
+ auto Report = std::make_unique<BugReport>(*BT_stackleak, Out.str(), N);
if (Range.isValid())
Report->addRange(Range);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/StreamChecker.cpp Wed Aug 14 16:04:18 2019
@@ -277,7 +277,7 @@ void StreamChecker::Fseek(CheckerContext
new BuiltinBug(this, "Illegal whence argument",
"The whence argument to fseek() should be "
"SEEK_SET, SEEK_END, or SEEK_CUR."));
- C.emitReport(llvm::make_unique<BugReport>(
+ C.emitReport(std::make_unique<BugReport>(
*BT_illegalwhence, BT_illegalwhence->getDescription(), N));
}
}
@@ -345,7 +345,7 @@ ProgramStateRef StreamChecker::CheckNull
if (!BT_nullfp)
BT_nullfp.reset(new BuiltinBug(this, "NULL stream pointer",
"Stream pointer might be NULL."));
- C.emitReport(llvm::make_unique<BugReport>(
+ C.emitReport(std::make_unique<BugReport>(
*BT_nullfp, BT_nullfp->getDescription(), N));
}
return nullptr;
@@ -375,7 +375,7 @@ ProgramStateRef StreamChecker::CheckDoub
BT_doubleclose.reset(new BuiltinBug(
this, "Double fclose", "Try to close a file Descriptor already"
" closed. Cause undefined behaviour."));
- C.emitReport(llvm::make_unique<BugReport>(
+ C.emitReport(std::make_unique<BugReport>(
*BT_doubleclose, BT_doubleclose->getDescription(), N));
}
return nullptr;
@@ -405,7 +405,7 @@ void StreamChecker::checkDeadSymbols(Sym
BT_ResourceLeak.reset(
new BuiltinBug(this, "Resource Leak",
"Opened File never closed. Potential Resource leak."));
- C.emitReport(llvm::make_unique<BugReport>(
+ C.emitReport(std::make_unique<BugReport>(
*BT_ResourceLeak, BT_ResourceLeak->getDescription(), N));
}
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/TaintTesterChecker.cpp Wed Aug 14 16:04:18 2019
@@ -52,7 +52,7 @@ void TaintTesterChecker::checkPostStmt(c
if (isTainted(State, E, C.getLocationContext())) {
if (ExplodedNode *N = C.generateNonFatalErrorNode()) {
initBugType();
- auto report = llvm::make_unique<BugReport>(*BT, "tainted",N);
+ auto report = std::make_unique<BugReport>(*BT, "tainted",N);
report->addRange(E->getSourceRange());
C.emitReport(std::move(report));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp Wed Aug 14 16:04:18 2019
@@ -167,12 +167,12 @@ void TestAfterDivZeroChecker::reportBug(
if (!DivZeroBug)
DivZeroBug.reset(new BuiltinBug(this, "Division by zero"));
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*DivZeroBug, "Value being compared against zero has already been used "
"for division",
N);
- R->addVisitor(llvm::make_unique<DivisionBRVisitor>(Val.getAsSymbol(),
+ R->addVisitor(std::make_unique<DivisionBRVisitor>(Val.getAsSymbol(),
C.getStackFrame()));
C.emitReport(std::move(R));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp Wed Aug 14 16:04:18 2019
@@ -96,7 +96,7 @@ void UndefBranchChecker::checkBranchCond
Ex = FindIt.FindExpr(Ex);
// Emit the bug report.
- auto R = llvm::make_unique<BugReport>(*BT, BT->getDescription(), N);
+ auto R = std::make_unique<BugReport>(*BT, BT->getDescription(), N);
bugreporter::trackExpressionValue(N, Ex, *R);
R->addRange(Ex->getSourceRange());
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp Wed Aug 14 16:04:18 2019
@@ -83,10 +83,10 @@ UndefCapturedBlockVarChecker::checkPostS
os << "Variable '" << VD->getName()
<< "' is uninitialized when captured by block";
- auto R = llvm::make_unique<BugReport>(*BT, os.str(), N);
+ auto R = std::make_unique<BugReport>(*BT, os.str(), N);
if (const Expr *Ex = FindBlockDeclRefExpr(BE->getBody(), VD))
R->addRange(Ex->getSourceRange());
- R->addVisitor(llvm::make_unique<FindLastStoreBRVisitor>(
+ R->addVisitor(std::make_unique<FindLastStoreBRVisitor>(
*V, VR, /*EnableNullFPSuppression*/ false,
bugreporter::TrackingKind::Thorough));
R->disablePathPruning();
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp Wed Aug 14 16:04:18 2019
@@ -170,7 +170,7 @@ void UndefResultChecker::checkPostStmt(c
<< "' expression is undefined";
}
}
- auto report = llvm::make_unique<BugReport>(*BT, OS.str(), N);
+ auto report = std::make_unique<BugReport>(*BT, OS.str(), N);
if (Ex) {
report->addRange(Ex->getSourceRange());
bugreporter::trackExpressionValue(N, Ex, *report);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp Wed Aug 14 16:04:18 2019
@@ -52,7 +52,7 @@ UndefinedArraySubscriptChecker::checkPre
BT.reset(new BuiltinBug(this, "Array subscript is undefined"));
// Generate a report for this bug.
- auto R = llvm::make_unique<BugReport>(*BT, BT->getName(), N);
+ auto R = std::make_unique<BugReport>(*BT, BT->getName(), N);
R->addRange(A->getIdx()->getSourceRange());
bugreporter::trackExpressionValue(N, A->getIdx(), *R);
C.emitReport(std::move(R));
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp Wed Aug 14 16:04:18 2019
@@ -108,7 +108,7 @@ void UndefinedAssignmentChecker::checkBi
if (OS.str().empty())
OS << DefaultMsg;
- auto R = llvm::make_unique<BugReport>(*BT, OS.str(), N);
+ auto R = std::make_unique<BugReport>(*BT, OS.str(), N);
if (ex) {
R->addRange(ex->getSourceRange());
bugreporter::trackExpressionValue(N, ex, *R);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp Wed Aug 14 16:04:18 2019
@@ -187,7 +187,7 @@ void UninitializedObjectChecker::checkEn
if (Opts.ShouldConvertNotesToWarnings) {
for (const auto &Pair : UninitFields) {
- auto Report = llvm::make_unique<BugReport>(
+ auto Report = std::make_unique<BugReport>(
*BT_uninitField, Pair.second, Node, LocUsedForUniqueing,
Node->getLocationContext()->getDecl());
Context.emitReport(std::move(Report));
@@ -201,7 +201,7 @@ void UninitializedObjectChecker::checkEn
<< (UninitFields.size() == 1 ? "" : "s")
<< " at the end of the constructor call";
- auto Report = llvm::make_unique<BugReport>(
+ auto Report = std::make_unique<BugReport>(
*BT_uninitField, WarningOS.str(), Node, LocUsedForUniqueing,
Node->getLocationContext()->getDecl());
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp Wed Aug 14 16:04:18 2019
@@ -135,7 +135,7 @@ void UnixAPIMisuseChecker::ReportOpenBug
LazyInitialize(this, BT_open, "Improper use of 'open'");
- auto Report = llvm::make_unique<BugReport>(*BT_open, Msg, N);
+ auto Report = std::make_unique<BugReport>(*BT_open, Msg, N);
Report->addRange(SR);
C.emitReport(std::move(Report));
}
@@ -304,7 +304,7 @@ void UnixAPIMisuseChecker::CheckPthreadO
LazyInitialize(this, BT_pthreadOnce, "Improper use of 'pthread_once'");
- auto report = llvm::make_unique<BugReport>(*BT_pthreadOnce, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT_pthreadOnce, os.str(), N);
report->addRange(CE->getArg(0)->getSourceRange());
C.emitReport(std::move(report));
}
@@ -347,7 +347,7 @@ bool UnixAPIPortabilityChecker::ReportZe
SmallString<256> S;
llvm::raw_svector_ostream os(S);
os << "Call to '" << fn_name << "' has an allocation size of 0 bytes";
- auto report = llvm::make_unique<BugReport>(*BT_mallocZero, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT_mallocZero, os.str(), N);
report->addRange(arg->getSourceRange());
bugreporter::trackExpressionValue(N, arg, *report);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp Wed Aug 14 16:04:18 2019
@@ -72,7 +72,7 @@ void VLASizeChecker::reportBug(
break;
}
- auto report = llvm::make_unique<BugReport>(*BT, os.str(), N);
+ auto report = std::make_unique<BugReport>(*BT, os.str(), N);
report->addVisitor(std::move(Visitor));
report->addRange(SizeE->getSourceRange());
bugreporter::trackExpressionValue(N, SizeE, *report);
@@ -110,7 +110,7 @@ void VLASizeChecker::checkPreStmt(const
// Check if the size is tainted.
if (isTainted(state, sizeV)) {
reportBug(VLA_Tainted, SE, nullptr, C,
- llvm::make_unique<TaintBugVisitor>(sizeV));
+ std::make_unique<TaintBugVisitor>(sizeV));
return;
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ValistChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ValistChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/ValistChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/ValistChecker.cpp Wed Aug 14 16:04:18 2019
@@ -254,9 +254,9 @@ void ValistChecker::reportUninitializedA
BT_uninitaccess.reset(new BugType(CheckNames[CK_Uninitialized],
"Uninitialized va_list",
categories::MemoryError));
- auto R = llvm::make_unique<BugReport>(*BT_uninitaccess, Msg, N);
+ auto R = std::make_unique<BugReport>(*BT_uninitaccess, Msg, N);
R->markInteresting(VAList);
- R->addVisitor(llvm::make_unique<ValistBugVisitor>(VAList));
+ R->addVisitor(std::make_unique<ValistBugVisitor>(VAList));
C.emitReport(std::move(R));
}
}
@@ -295,11 +295,11 @@ void ValistChecker::reportLeakedVALists(
OS << " " << VariableName;
OS << Msg2;
- auto R = llvm::make_unique<BugReport>(
+ auto R = std::make_unique<BugReport>(
*BT_leakedvalist, OS.str(), N, LocUsedForUniqueing,
StartNode->getLocationContext()->getDecl());
R->markInteresting(Reg);
- R->addVisitor(llvm::make_unique<ValistBugVisitor>(Reg, true));
+ R->addVisitor(std::make_unique<ValistBugVisitor>(Reg, true));
C.emitReport(std::move(R));
}
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/VforkChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/VforkChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/VforkChecker.cpp Wed Aug 14 16:04:18 2019
@@ -132,7 +132,7 @@ void VforkChecker::reportBug(const char
if (Details)
os << "; " << Details;
- auto Report = llvm::make_unique<BugReport>(*BT, os.str(), N);
+ auto Report = std::make_unique<BugReport>(*BT, os.str(), N);
// TODO: mark vfork call in BugReportVisitor
C.emitReport(std::move(Report));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp Wed Aug 14 16:04:18 2019
@@ -268,8 +268,8 @@ void VirtualCallChecker::reportBug(Strin
this, "Call to virtual function during construction or destruction",
"C++ Object Lifecycle"));
- auto Reporter = llvm::make_unique<BugReport>(*BT, Msg, N);
- Reporter->addVisitor(llvm::make_unique<VirtualBugVisitor>(Reg));
+ auto Reporter = std::make_unique<BugReport>(*BT, Msg, N);
+ Reporter->addVisitor(std::make_unique<VirtualBugVisitor>(Reg));
C.emitReport(std::move(Reporter));
}
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Wed Aug 14 16:04:18 2019
@@ -1263,7 +1263,7 @@ void PathDiagnosticBuilder::generatePath
static std::unique_ptr<PathDiagnostic>
generateEmptyDiagnosticForReport(const BugReport *R, const SourceManager &SM) {
const BugType &BT = R->getBugType();
- return llvm::make_unique<PathDiagnostic>(
+ return std::make_unique<PathDiagnostic>(
R->getBugType().getCheckName(), R->getDeclWithIssue(),
R->getBugType().getName(), R->getDescription(),
R->getShortDescription(/*UseFallback=*/false), BT.getCategory(),
@@ -2391,7 +2391,7 @@ BugPathInfo *BugPathGetter::getNextBugPa
// Create a new graph with a single path. This is the graph that will be
// returned to the caller.
- auto GNew = llvm::make_unique<ExplodedGraph>();
+ auto GNew = std::make_unique<ExplodedGraph>();
CurrentBugPath.MapToOriginNodes.clear();
// Now walk from the error node up the BFS path, always taking the
@@ -2533,7 +2533,7 @@ static std::unique_ptr<VisitorsDiagnosti
generateVisitorsDiagnostics(BugReport *R, const ExplodedNode *ErrorNode,
BugReporterContext &BRC) {
std::unique_ptr<VisitorsDiagnosticsTy> Notes =
- llvm::make_unique<VisitorsDiagnosticsTy>();
+ std::make_unique<VisitorsDiagnosticsTy>();
BugReport::VisitorList visitors;
// Run visitors on all nodes starting from the node *before* the last one.
@@ -2599,12 +2599,12 @@ PathDiagnosticBuilder::findValidReport(A
// Register refutation visitors first, if they mark the bug invalid no
// further analysis is required
- R->addVisitor(llvm::make_unique<LikelyFalsePositiveSuppressionBRVisitor>());
+ R->addVisitor(std::make_unique<LikelyFalsePositiveSuppressionBRVisitor>());
// Register additional node visitors.
- R->addVisitor(llvm::make_unique<NilReceiverBRVisitor>());
- R->addVisitor(llvm::make_unique<ConditionBRVisitor>());
- R->addVisitor(llvm::make_unique<TagVisitor>());
+ R->addVisitor(std::make_unique<NilReceiverBRVisitor>());
+ R->addVisitor(std::make_unique<ConditionBRVisitor>());
+ R->addVisitor(std::make_unique<TagVisitor>());
BugReporterContext BRC(Reporter, BugPath->MapToOriginNodes);
@@ -2617,7 +2617,7 @@ PathDiagnosticBuilder::findValidReport(A
// If crosscheck is enabled, remove all visitors, add the refutation
// visitor and check again
R->clearVisitors();
- R->addVisitor(llvm::make_unique<FalsePositiveRefutationBRVisitor>());
+ R->addVisitor(std::make_unique<FalsePositiveRefutationBRVisitor>());
// We don't overrite the notes inserted by other visitors because the
// refutation manager does not add any new note to the path
@@ -2641,7 +2641,7 @@ GRBugReporter::generatePathDiagnostics(
ArrayRef<BugReport *> &bugReports) {
assert(!bugReports.empty());
- auto Out = llvm::make_unique<DiagnosticForConsumerMapTy>();
+ auto Out = std::make_unique<DiagnosticForConsumerMapTy>();
Optional<PathDiagnosticBuilder> PDB =
PathDiagnosticBuilder::findValidReport(bugReports, *this);
@@ -2841,7 +2841,7 @@ void BugReporter::FlushReport(BugReportE
// of the issue.
if (PD->path.empty()) {
PathDiagnosticLocation L = report->getLocation(getSourceManager());
- auto piece = llvm::make_unique<PathDiagnosticEventPiece>(
+ auto piece = std::make_unique<PathDiagnosticEventPiece>(
L, report->getDescription());
for (SourceRange Range : report->getRanges())
piece->addRange(Range);
@@ -2921,7 +2921,7 @@ static void populateExecutedLinesWithStm
/// starting from \p N.
static std::unique_ptr<FilesToLineNumsMap>
findExecutedLines(const SourceManager &SM, const ExplodedNode *N) {
- auto ExecutedLines = llvm::make_unique<FilesToLineNumsMap>();
+ auto ExecutedLines = std::make_unique<FilesToLineNumsMap>();
while (N) {
if (N->getFirstPred() == nullptr) {
@@ -2961,7 +2961,7 @@ BugReporter::generateDiagnosticForConsum
ArrayRef<BugReport *> bugReports) {
if (!report->isPathSensitive()) {
- auto Out = llvm::make_unique<DiagnosticForConsumerMapTy>();
+ auto Out = std::make_unique<DiagnosticForConsumerMapTy>();
for (auto *Consumer : consumers)
(*Out)[Consumer] = generateEmptyDiagnosticForReport(report,
getSourceManager());
@@ -3008,7 +3008,7 @@ void BugReporter::EmitBasicReport(const
ArrayRef<SourceRange> Ranges) {
// 'BT' is owned by BugReporter.
BugType *BT = getBugTypeForName(CheckName, name, category);
- auto R = llvm::make_unique<BugReport>(*BT, str, Loc);
+ auto R = std::make_unique<BugReport>(*BT, str, Loc);
R->setDeclWithIssue(DeclWithIssue);
for (ArrayRef<SourceRange>::iterator I = Ranges.begin(), E = Ranges.end();
I != E; ++I)
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp Wed Aug 14 16:04:18 2019
@@ -789,7 +789,7 @@ public:
AnalyzerOptions &Options = N->getState()->getAnalysisManager().options;
if (EnableNullFPSuppression &&
Options.ShouldSuppressNullReturnPaths && V.getAs<Loc>())
- BR.addVisitor(llvm::make_unique<MacroNullReturnSuppressionVisitor>(
+ BR.addVisitor(std::make_unique<MacroNullReturnSuppressionVisitor>(
R->getAs<SubRegion>(), V));
}
@@ -951,7 +951,7 @@ public:
if (Optional<Loc> RetLoc = RetVal.getAs<Loc>())
EnableNullFPSuppression = State->isNull(*RetLoc).isConstrainedTrue();
- BR.addVisitor(llvm::make_unique<ReturnVisitor>(CalleeContext,
+ BR.addVisitor(std::make_unique<ReturnVisitor>(CalleeContext,
EnableNullFPSuppression,
Options, TKind));
}
@@ -1190,7 +1190,7 @@ void FindLastStoreBRVisitor::registerSta
if (V.getAs<loc::ConcreteInt>() || V.getAs<nonloc::ConcreteInt>()) {
// Register a new visitor with the BugReport.
- BR.addVisitor(llvm::make_unique<FindLastStoreBRVisitor>(
+ BR.addVisitor(std::make_unique<FindLastStoreBRVisitor>(
V.castAs<KnownSVal>(), R, EnableNullFPSuppression, TKind));
}
}
@@ -1468,7 +1468,7 @@ FindLastStoreBRVisitor::VisitNode(const
dyn_cast_or_null<BlockDataRegion>(V.getAsRegion())) {
if (const VarRegion *OriginalR = BDR->getOriginalRegion(VR)) {
if (auto KV = State->getSVal(OriginalR).getAs<KnownSVal>())
- BR.addVisitor(llvm::make_unique<FindLastStoreBRVisitor>(
+ BR.addVisitor(std::make_unique<FindLastStoreBRVisitor>(
*KV, OriginalR, EnableNullFPSuppression, TKind, OriginSFC));
}
}
@@ -1926,7 +1926,7 @@ bool bugreporter::trackExpressionValue(c
// TODO: Shouldn't we track control dependencies of every bug location, rather
// than only tracked expressions?
if (LVState->getAnalysisManager().getAnalyzerOptions().ShouldTrackConditions)
- report.addVisitor(llvm::make_unique<TrackControlDependencyCondBRVisitor>(
+ report.addVisitor(std::make_unique<TrackControlDependencyCondBRVisitor>(
InputNode));
// The message send could be nil due to the receiver being nil.
@@ -1954,7 +1954,7 @@ bool bugreporter::trackExpressionValue(c
// got initialized.
if (RR && !LVIsNull)
if (auto KV = LVal.getAs<KnownSVal>())
- report.addVisitor(llvm::make_unique<FindLastStoreBRVisitor>(
+ report.addVisitor(std::make_unique<FindLastStoreBRVisitor>(
*KV, RR, EnableNullFPSuppression, TKind, SFC));
// In case of C++ references, we want to differentiate between a null
@@ -1969,17 +1969,17 @@ bool bugreporter::trackExpressionValue(c
// Mark both the variable region and its contents as interesting.
SVal V = LVState->getRawSVal(loc::MemRegionVal(R));
report.addVisitor(
- llvm::make_unique<NoStoreFuncVisitor>(cast<SubRegion>(R)));
+ std::make_unique<NoStoreFuncVisitor>(cast<SubRegion>(R)));
MacroNullReturnSuppressionVisitor::addMacroVisitorIfNecessary(
LVNode, R, EnableNullFPSuppression, report, V);
report.markInteresting(V);
- report.addVisitor(llvm::make_unique<UndefOrNullArgVisitor>(R));
+ report.addVisitor(std::make_unique<UndefOrNullArgVisitor>(R));
// If the contents are symbolic, find out when they became null.
if (V.getAsLocSymbol(/*IncludeBaseRegions*/ true))
- report.addVisitor(llvm::make_unique<TrackConstraintBRVisitor>(
+ report.addVisitor(std::make_unique<TrackConstraintBRVisitor>(
V.castAs<DefinedSVal>(), false));
// Add visitor, which will suppress inline defensive checks.
@@ -1987,11 +1987,11 @@ bool bugreporter::trackExpressionValue(c
if (!DV->isZeroConstant() && LVState->isNull(*DV).isConstrainedTrue() &&
EnableNullFPSuppression)
report.addVisitor(
- llvm::make_unique<SuppressInlineDefensiveChecksVisitor>(*DV,
+ std::make_unique<SuppressInlineDefensiveChecksVisitor>(*DV,
LVNode));
if (auto KV = V.getAs<KnownSVal>())
- report.addVisitor(llvm::make_unique<FindLastStoreBRVisitor>(
+ report.addVisitor(std::make_unique<FindLastStoreBRVisitor>(
*KV, R, EnableNullFPSuppression, TKind, SFC));
return true;
}
@@ -2006,7 +2006,7 @@ bool bugreporter::trackExpressionValue(c
// Is it a symbolic value?
if (auto L = V.getAs<loc::MemRegionVal>()) {
- report.addVisitor(llvm::make_unique<UndefOrNullArgVisitor>(L->getRegion()));
+ report.addVisitor(std::make_unique<UndefOrNullArgVisitor>(L->getRegion()));
// FIXME: this is a hack for fixing a later crash when attempting to
// dereference a void* pointer.
@@ -2030,13 +2030,13 @@ bool bugreporter::trackExpressionValue(c
if (CanDereference)
if (auto KV = RVal.getAs<KnownSVal>())
- report.addVisitor(llvm::make_unique<FindLastStoreBRVisitor>(
+ report.addVisitor(std::make_unique<FindLastStoreBRVisitor>(
*KV, L->getRegion(), EnableNullFPSuppression, TKind, SFC));
const MemRegion *RegionRVal = RVal.getAsRegion();
if (RegionRVal && isa<SymbolicRegion>(RegionRVal)) {
report.markInteresting(RegionRVal);
- report.addVisitor(llvm::make_unique<TrackConstraintBRVisitor>(
+ report.addVisitor(std::make_unique<TrackConstraintBRVisitor>(
loc::MemRegionVal(RegionRVal), /*assumption=*/false));
}
}
Modified: cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp Wed Aug 14 16:04:18 2019
@@ -330,7 +330,7 @@ private:
std::unique_ptr<ConstraintManager>
ento::CreateRangeConstraintManager(ProgramStateManager &StMgr, SubEngine *Eng) {
- return llvm::make_unique<RangeConstraintManager>(Eng, StMgr.getSValBuilder());
+ return std::make_unique<RangeConstraintManager>(Eng, StMgr.getSValBuilder());
}
bool RangeConstraintManager::canReasonAbout(SVal X) const {
Modified: cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp Wed Aug 14 16:04:18 2019
@@ -644,14 +644,14 @@ public: // Part of public interface to c
std::unique_ptr<StoreManager>
ento::CreateRegionStoreManager(ProgramStateManager &StMgr) {
RegionStoreFeatures F = maximal_features_tag();
- return llvm::make_unique<RegionStoreManager>(StMgr, F);
+ return std::make_unique<RegionStoreManager>(StMgr, F);
}
std::unique_ptr<StoreManager>
ento::CreateFieldsOnlyRegionStoreManager(ProgramStateManager &StMgr) {
RegionStoreFeatures F = minimal_features_tag();
F.enableFields(true);
- return llvm::make_unique<RegionStoreManager>(StMgr, F);
+ return std::make_unique<RegionStoreManager>(StMgr, F);
}
Modified: cfe/trunk/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp Wed Aug 14 16:04:18 2019
@@ -14,5 +14,5 @@ using namespace ento;
std::unique_ptr<ConstraintManager>
ento::CreateZ3ConstraintManager(ProgramStateManager &StMgr, SubEngine *Eng) {
- return llvm::make_unique<SMTConstraintManager>(Eng, StMgr.getSValBuilder());
+ return std::make_unique<SMTConstraintManager>(Eng, StMgr.getSValBuilder());
}
Modified: cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/WorkList.cpp Wed Aug 14 16:04:18 2019
@@ -79,11 +79,11 @@ public:
WorkList::~WorkList() = default;
std::unique_ptr<WorkList> WorkList::makeDFS() {
- return llvm::make_unique<DFS>();
+ return std::make_unique<DFS>();
}
std::unique_ptr<WorkList> WorkList::makeBFS() {
- return llvm::make_unique<BFS>();
+ return std::make_unique<BFS>();
}
namespace {
@@ -124,7 +124,7 @@ namespace {
} // namespace
std::unique_ptr<WorkList> WorkList::makeBFSBlockDFSContents() {
- return llvm::make_unique<BFSBlockDFSContents>();
+ return std::make_unique<BFSBlockDFSContents>();
}
namespace {
@@ -186,7 +186,7 @@ public:
} // namespace
std::unique_ptr<WorkList> WorkList::makeUnexploredFirst() {
- return llvm::make_unique<UnexploredFirstStack>();
+ return std::make_unique<UnexploredFirstStack>();
}
namespace {
@@ -249,7 +249,7 @@ public:
} // namespace
std::unique_ptr<WorkList> WorkList::makeUnexploredFirstPriorityQueue() {
- return llvm::make_unique<UnexploredFirstPriorityQueue>();
+ return std::make_unique<UnexploredFirstPriorityQueue>();
}
namespace {
@@ -309,5 +309,5 @@ public:
}
std::unique_ptr<WorkList> WorkList::makeUnexploredFirstPriorityLocationQueue() {
- return llvm::make_unique<UnexploredFirstPriorityLocationQueue>();
+ return std::make_unique<UnexploredFirstPriorityLocationQueue>();
}
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Wed Aug 14 16:04:18 2019
@@ -212,13 +212,13 @@ public:
Plugins(plugins), Injector(injector), CTU(CI) {
DigestAnalyzerOptions();
if (Opts->PrintStats || Opts->ShouldSerializeStats) {
- AnalyzerTimers = llvm::make_unique<llvm::TimerGroup>(
+ AnalyzerTimers = std::make_unique<llvm::TimerGroup>(
"analyzer", "Analyzer timers");
- SyntaxCheckTimer = llvm::make_unique<llvm::Timer>(
+ SyntaxCheckTimer = std::make_unique<llvm::Timer>(
"syntaxchecks", "Syntax-based analysis time", *AnalyzerTimers);
- ExprEngineTimer = llvm::make_unique<llvm::Timer>(
+ ExprEngineTimer = std::make_unique<llvm::Timer>(
"exprengine", "Path exploration time", *AnalyzerTimers);
- BugReporterTimer = llvm::make_unique<llvm::Timer>(
+ BugReporterTimer = std::make_unique<llvm::Timer>(
"bugreporter", "Path-sensitive report post-processing time",
*AnalyzerTimers);
llvm::EnableStatistics(/* PrintOnExit= */ false);
@@ -311,7 +311,7 @@ public:
checkerMgr = createCheckerManager(
*Ctx, *Opts, Plugins, CheckerRegistrationFns, PP.getDiagnostics());
- Mgr = llvm::make_unique<AnalysisManager>(
+ Mgr = std::make_unique<AnalysisManager>(
*Ctx, PP.getDiagnostics(), PathConsumers, CreateStoreMgr,
CreateConstraintMgr, checkerMgr.get(), *Opts, Injector);
}
@@ -826,7 +826,7 @@ ento::CreateAnalysisConsumer(CompilerIns
AnalyzerOptionsRef analyzerOpts = CI.getAnalyzerOpts();
bool hasModelPath = analyzerOpts->Config.count("model-path") > 0;
- return llvm::make_unique<AnalysisConsumer>(
+ return std::make_unique<AnalysisConsumer>(
CI, CI.getFrontendOpts().OutputFile, analyzerOpts,
CI.getFrontendOpts().Plugins,
hasModelPath ? new ModelInjector(CI) : nullptr);
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp Wed Aug 14 16:04:18 2019
@@ -30,7 +30,7 @@ std::unique_ptr<CheckerManager> ento::cr
ArrayRef<std::string> plugins,
ArrayRef<std::function<void(CheckerRegistry &)>> checkerRegistrationFns,
DiagnosticsEngine &diags) {
- auto checkerMgr = llvm::make_unique<CheckerManager>(context, opts);
+ auto checkerMgr = std::make_unique<CheckerManager>(context, opts);
CheckerRegistry allCheckers(plugins, diags, opts, context.getLangOpts(),
checkerRegistrationFns);
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/FrontendActions.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/FrontendActions.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/FrontendActions.cpp Wed Aug 14 16:04:18 2019
@@ -23,5 +23,5 @@ ParseModelFileAction::ParseModelFileActi
std::unique_ptr<ASTConsumer>
ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
- return llvm::make_unique<ModelConsumer>(Bodies);
+ return std::make_unique<ModelConsumer>(Bodies);
}
Modified: cfe/trunk/lib/Tooling/ASTDiff/ASTDiff.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/ASTDiff/ASTDiff.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/ASTDiff/ASTDiff.cpp (original)
+++ cfe/trunk/lib/Tooling/ASTDiff/ASTDiff.cpp Wed Aug 14 16:04:18 2019
@@ -35,8 +35,8 @@ public:
Mapping &operator=(Mapping &&Other) = default;
Mapping(size_t Size) {
- SrcToDst = llvm::make_unique<NodeId[]>(Size);
- DstToSrc = llvm::make_unique<NodeId[]>(Size);
+ SrcToDst = std::make_unique<NodeId[]>(Size);
+ DstToSrc = std::make_unique<NodeId[]>(Size);
}
void link(NodeId Src, NodeId Dst) {
@@ -565,13 +565,13 @@ public:
ZhangShashaMatcher(const ASTDiff::Impl &DiffImpl, const SyntaxTree::Impl &T1,
const SyntaxTree::Impl &T2, NodeId Id1, NodeId Id2)
: DiffImpl(DiffImpl), S1(T1, Id1), S2(T2, Id2) {
- TreeDist = llvm::make_unique<std::unique_ptr<double[]>[]>(
+ TreeDist = std::make_unique<std::unique_ptr<double[]>[]>(
size_t(S1.getSize()) + 1);
- ForestDist = llvm::make_unique<std::unique_ptr<double[]>[]>(
+ ForestDist = std::make_unique<std::unique_ptr<double[]>[]>(
size_t(S1.getSize()) + 1);
for (int I = 0, E = S1.getSize() + 1; I < E; ++I) {
- TreeDist[I] = llvm::make_unique<double[]>(size_t(S2.getSize()) + 1);
- ForestDist[I] = llvm::make_unique<double[]>(size_t(S2.getSize()) + 1);
+ TreeDist[I] = std::make_unique<double[]>(size_t(S2.getSize()) + 1);
+ ForestDist[I] = std::make_unique<double[]>(size_t(S2.getSize()) + 1);
}
}
@@ -960,7 +960,7 @@ void ASTDiff::Impl::computeChangeKinds(M
ASTDiff::ASTDiff(SyntaxTree &T1, SyntaxTree &T2,
const ComparisonOptions &Options)
- : DiffImpl(llvm::make_unique<Impl>(*T1.TreeImpl, *T2.TreeImpl, Options)) {}
+ : DiffImpl(std::make_unique<Impl>(*T1.TreeImpl, *T2.TreeImpl, Options)) {}
ASTDiff::~ASTDiff() = default;
@@ -969,7 +969,7 @@ NodeId ASTDiff::getMapped(const SyntaxTr
}
SyntaxTree::SyntaxTree(ASTContext &AST)
- : TreeImpl(llvm::make_unique<SyntaxTree::Impl>(
+ : TreeImpl(std::make_unique<SyntaxTree::Impl>(
this, AST.getTranslationUnitDecl(), AST)) {}
SyntaxTree::~SyntaxTree() = default;
Modified: cfe/trunk/lib/Tooling/AllTUsExecution.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/AllTUsExecution.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/AllTUsExecution.cpp (original)
+++ cfe/trunk/lib/Tooling/AllTUsExecution.cpp Wed Aug 14 16:04:18 2019
@@ -162,7 +162,7 @@ public:
return make_string_error(
"[AllTUsToolExecutorPlugin] Please provide a directory/file path in "
"the compilation database.");
- return llvm::make_unique<AllTUsToolExecutor>(std::move(OptionsParser),
+ return std::make_unique<AllTUsToolExecutor>(std::move(OptionsParser),
ExecutorConcurrency);
}
};
Modified: cfe/trunk/lib/Tooling/CommonOptionsParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CommonOptionsParser.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CommonOptionsParser.cpp (original)
+++ cfe/trunk/lib/Tooling/CommonOptionsParser.cpp Wed Aug 14 16:04:18 2019
@@ -142,7 +142,7 @@ llvm::Error CommonOptionsParser::init(
}
}
auto AdjustingCompilations =
- llvm::make_unique<ArgumentsAdjustingCompilations>(
+ std::make_unique<ArgumentsAdjustingCompilations>(
std::move(Compilations));
Adjuster =
getInsertArgumentAdjuster(ArgsBefore, ArgumentInsertPosition::BEGIN);
Modified: cfe/trunk/lib/Tooling/CompilationDatabase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CompilationDatabase.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CompilationDatabase.cpp (original)
+++ cfe/trunk/lib/Tooling/CompilationDatabase.cpp Wed Aug 14 16:04:18 2019
@@ -356,7 +356,7 @@ FixedCompilationDatabase::loadFromComman
std::vector<std::string> StrippedArgs;
if (!stripPositionalArgs(CommandLine, StrippedArgs, ErrorMsg))
return nullptr;
- return llvm::make_unique<FixedCompilationDatabase>(Directory, StrippedArgs);
+ return std::make_unique<FixedCompilationDatabase>(Directory, StrippedArgs);
}
std::unique_ptr<FixedCompilationDatabase>
@@ -370,7 +370,7 @@ FixedCompilationDatabase::loadFromFile(S
}
std::vector<std::string> Args{llvm::line_iterator(**File),
llvm::line_iterator()};
- return llvm::make_unique<FixedCompilationDatabase>(
+ return std::make_unique<FixedCompilationDatabase>(
llvm::sys::path::parent_path(Path), std::move(Args));
}
Modified: cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp (original)
+++ cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp Wed Aug 14 16:04:18 2019
@@ -88,7 +88,7 @@ DependencyScanningFilesystemSharedCache:
// FIXME: A better heuristic might also consider the OS to account for
// the different cost of lock contention on different OSes.
NumShards = std::max(2u, llvm::hardware_concurrency() / 4);
- CacheShards = llvm::make_unique<CacheShard[]>(NumShards);
+ CacheShards = std::make_unique<CacheShard[]>(NumShards);
}
/// Returns a cache entry for the corresponding key.
@@ -176,7 +176,7 @@ createFile(const CachedFileSystemEntry *
llvm::ErrorOr<StringRef> Contents = Entry->getContents();
if (!Contents)
return Contents.getError();
- return llvm::make_unique<MinimizedVFSFile>(
+ return std::make_unique<MinimizedVFSFile>(
llvm::MemoryBuffer::getMemBuffer(*Contents, Entry->getName(),
/*RequiresNullTerminator=*/false),
*Entry->getStatus());
Modified: cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (original)
+++ cfe/trunk/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp Wed Aug 14 16:04:18 2019
@@ -116,7 +116,7 @@ public:
// invocation to the collector. The options in the invocation are reset,
// which ensures that the compiler won't create new dependency collectors,
// and thus won't write out the extra '.d' files to disk.
- auto Opts = llvm::make_unique<DependencyOutputOptions>(
+ auto Opts = std::make_unique<DependencyOutputOptions>(
std::move(Compiler.getInvocation().getDependencyOutputOpts()));
// We need at least one -MT equivalent for the generator to work.
if (Opts->Targets.empty())
@@ -124,7 +124,7 @@ public:
Compiler.addDependencyCollector(std::make_shared<DependencyPrinter>(
std::move(Opts), DependencyFileContents));
- auto Action = llvm::make_unique<PreprocessOnlyAction>();
+ auto Action = std::make_unique<PreprocessOnlyAction>();
const bool Result = Compiler.ExecuteAction(*Action);
if (!DepFS)
FileMgr->clearStatCache();
Modified: cfe/trunk/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp (original)
+++ cfe/trunk/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp Wed Aug 14 16:04:18 2019
@@ -50,7 +50,7 @@ private:
std::unique_ptr<CompilationDatabase>
inferTargetAndDriverMode(std::unique_ptr<CompilationDatabase> Base) {
- return llvm::make_unique<TargetAndModeAdderDatabase>(std::move(Base));
+ return std::make_unique<TargetAndModeAdderDatabase>(std::move(Base));
}
} // namespace tooling
Modified: cfe/trunk/lib/Tooling/InterpolatingCompilationDatabase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/InterpolatingCompilationDatabase.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/InterpolatingCompilationDatabase.cpp (original)
+++ cfe/trunk/lib/Tooling/InterpolatingCompilationDatabase.cpp Wed Aug 14 16:04:18 2019
@@ -537,7 +537,7 @@ private:
std::unique_ptr<CompilationDatabase>
inferMissingCompileCommands(std::unique_ptr<CompilationDatabase> Inner) {
- return llvm::make_unique<InterpolatingCompilationDatabase>(std::move(Inner));
+ return std::make_unique<InterpolatingCompilationDatabase>(std::move(Inner));
}
} // namespace tooling
Modified: cfe/trunk/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp Wed Aug 14 16:04:18 2019
@@ -35,7 +35,7 @@ Expected<CodeRangeASTSelection> CodeRang
if (!ASTSelection)
return ASTSelection.takeError();
std::unique_ptr<SelectedASTNode> StoredSelection =
- llvm::make_unique<SelectedASTNode>(std::move(*ASTSelection));
+ std::make_unique<SelectedASTNode>(std::move(*ASTSelection));
Optional<CodeRangeASTSelection> CodeRange = CodeRangeASTSelection::create(
Context.getSelectionRange(), *StoredSelection);
if (!CodeRange)
Modified: cfe/trunk/lib/Tooling/Refactoring/RefactoringActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring/RefactoringActions.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Refactoring/RefactoringActions.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring/RefactoringActions.cpp Wed Aug 14 16:04:18 2019
@@ -98,8 +98,8 @@ public:
std::vector<std::unique_ptr<RefactoringAction>> createRefactoringActions() {
std::vector<std::unique_ptr<RefactoringAction>> Actions;
- Actions.push_back(llvm::make_unique<LocalRename>());
- Actions.push_back(llvm::make_unique<ExtractRefactoring>());
+ Actions.push_back(std::make_unique<LocalRename>());
+ Actions.push_back(std::make_unique<ExtractRefactoring>());
return Actions;
}
Modified: cfe/trunk/lib/Tooling/Refactoring/Rename/RenamingAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring/Rename/RenamingAction.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Refactoring/Rename/RenamingAction.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring/Rename/RenamingAction.cpp Wed Aug 14 16:04:18 2019
@@ -266,12 +266,12 @@ private:
};
std::unique_ptr<ASTConsumer> RenamingAction::newASTConsumer() {
- return llvm::make_unique<RenamingASTConsumer>(NewNames, PrevNames, USRList,
+ return std::make_unique<RenamingASTConsumer>(NewNames, PrevNames, USRList,
FileToReplaces, PrintLocations);
}
std::unique_ptr<ASTConsumer> QualifiedRenamingAction::newASTConsumer() {
- return llvm::make_unique<USRSymbolRenamer>(NewNames, USRList, FileToReplaces);
+ return std::make_unique<USRSymbolRenamer>(NewNames, USRList, FileToReplaces);
}
} // end namespace tooling
Modified: cfe/trunk/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp Wed Aug 14 16:04:18 2019
@@ -25,7 +25,7 @@ SymbolOccurrence::SymbolOccurrence(const
Locations[0], Locations[0].getLocWithOffset(NamePieces[0].size()));
return;
}
- MultipleRanges = llvm::make_unique<SourceRange[]>(Locations.size());
+ MultipleRanges = std::make_unique<SourceRange[]>(Locations.size());
RangeOrNumRanges.setBegin(
SourceLocation::getFromRawEncoding(Locations.size()));
for (const auto &Loc : llvm::enumerate(Locations)) {
Modified: cfe/trunk/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp Wed Aug 14 16:04:18 2019
@@ -264,7 +264,7 @@ private:
};
std::unique_ptr<ASTConsumer> USRFindingAction::newASTConsumer() {
- return llvm::make_unique<NamedDeclFindingConsumer>(
+ return std::make_unique<NamedDeclFindingConsumer>(
SymbolOffsets, QualifiedNames, SpellingNames, USRList, Force,
ErrorOccurred);
}
Modified: cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp (original)
+++ cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp Wed Aug 14 16:04:18 2019
@@ -66,7 +66,7 @@ private:
};
std::unique_ptr<ASTConsumer> ASTMatchRefactorer::newASTConsumer() {
- return llvm::make_unique<RefactoringASTConsumer>(*this);
+ return std::make_unique<RefactoringASTConsumer>(*this);
}
static Replacement replaceStmtWithText(SourceManager &Sources, const Stmt &From,
Modified: cfe/trunk/lib/Tooling/StandaloneExecution.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/StandaloneExecution.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/StandaloneExecution.cpp (original)
+++ cfe/trunk/lib/Tooling/StandaloneExecution.cpp Wed Aug 14 16:04:18 2019
@@ -76,7 +76,7 @@ public:
if (OptionsParser.getSourcePathList().empty())
return make_string_error(
"[StandaloneToolExecutorPlugin] No positional argument found.");
- return llvm::make_unique<StandaloneToolExecutor>(std::move(OptionsParser));
+ return std::make_unique<StandaloneToolExecutor>(std::move(OptionsParser));
}
};
Modified: cfe/trunk/lib/Tooling/Syntax/Tokens.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Syntax/Tokens.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Syntax/Tokens.cpp (original)
+++ cfe/trunk/lib/Tooling/Syntax/Tokens.cpp Wed Aug 14 16:04:18 2019
@@ -321,7 +321,7 @@ TokenCollector::TokenCollector(Preproces
});
// And locations of macro calls, to properly recover boundaries of those in
// case of empty expansions.
- auto CB = llvm::make_unique<CollectPPExpansions>(*this);
+ auto CB = std::make_unique<CollectPPExpansions>(*this);
this->Collector = CB.get();
PP.addPPCallbacks(std::move(CB));
}
Modified: cfe/trunk/tools/c-index-test/core_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/core_main.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/core_main.cpp (original)
+++ cfe/trunk/tools/c-index-test/core_main.cpp Wed Aug 14 16:04:18 2019
@@ -251,7 +251,7 @@ static bool printSourceSymbolsFromModule
FileSystemOptions FileSystemOpts;
auto pchContOps = std::make_shared<PCHContainerOperations>();
// Register the support for object-file-wrapped Clang modules.
- pchContOps->registerReader(llvm::make_unique<ObjectFilePCHContainerReader>());
+ pchContOps->registerReader(std::make_unique<ObjectFilePCHContainerReader>());
auto pchRdr = pchContOps->getReaderOrNull(format);
if (!pchRdr) {
errs() << "unknown module format: " << format << '\n';
Modified: cfe/trunk/tools/clang-check/ClangCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/ClangCheck.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-check/ClangCheck.cpp (original)
+++ cfe/trunk/tools/clang-check/ClangCheck.cpp Wed Aug 14 16:04:18 2019
@@ -141,7 +141,7 @@ public:
clang::ADOF_Default);
if (ASTPrint)
return clang::CreateASTPrinter(nullptr, ASTDumpFilter);
- return llvm::make_unique<clang::ASTConsumer>();
+ return std::make_unique<clang::ASTConsumer>();
}
};
Modified: cfe/trunk/tools/clang-diff/ClangDiff.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-diff/ClangDiff.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-diff/ClangDiff.cpp (original)
+++ cfe/trunk/tools/clang-diff/ClangDiff.cpp Wed Aug 14 16:04:18 2019
@@ -74,7 +74,7 @@ static void addExtraArgs(std::unique_ptr
if (!Compilations)
return;
auto AdjustingCompilations =
- llvm::make_unique<ArgumentsAdjustingCompilations>(
+ std::make_unique<ArgumentsAdjustingCompilations>(
std::move(Compilations));
AdjustingCompilations->appendArgumentsAdjuster(
getInsertArgumentAdjuster(ArgsBefore, ArgumentInsertPosition::BEGIN));
@@ -97,7 +97,7 @@ getAST(const std::unique_ptr<Compilation
"without flags.\n"
<< ErrorMessage;
Compilations =
- llvm::make_unique<clang::tooling::FixedCompilationDatabase>(
+ std::make_unique<clang::tooling::FixedCompilationDatabase>(
".", std::vector<std::string>());
}
}
Modified: cfe/trunk/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp (original)
+++ cfe/trunk/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp Wed Aug 14 16:04:18 2019
@@ -105,7 +105,7 @@ class MapExtDefNamesAction : public ASTF
protected:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
llvm::StringRef) {
- return llvm::make_unique<MapExtDefNamesConsumer>(CI.getASTContext());
+ return std::make_unique<MapExtDefNamesConsumer>(CI.getASTContext());
}
};
Modified: cfe/trunk/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp (original)
+++ cfe/trunk/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp Wed Aug 14 16:04:18 2019
@@ -159,7 +159,7 @@ static void CreateAndRunJITFunc(const st
builder.setMAttrs(getFeatureList());
builder.setErrorStr(&ErrorMsg);
builder.setEngineKind(EngineKind::JIT);
- builder.setMCJITMemoryManager(make_unique<SectionMemoryManager>());
+ builder.setMCJITMemoryManager(std::make_unique<SectionMemoryManager>());
builder.setOptLevel(OLvl);
builder.setTargetOptions(InitTargetOptionsFromCodeGenFlags());
Modified: cfe/trunk/tools/clang-import-test/clang-import-test.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-import-test/clang-import-test.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-import-test/clang-import-test.cpp (original)
+++ cfe/trunk/tools/clang-import-test/clang-import-test.cpp Wed Aug 14 16:04:18 2019
@@ -78,7 +78,7 @@ private:
public:
TestDiagnosticConsumer()
- : Passthrough(llvm::make_unique<TextDiagnosticBuffer>()) {}
+ : Passthrough(std::make_unique<TextDiagnosticBuffer>()) {}
virtual void BeginSourceFile(const LangOptions &LangOpts,
const Preprocessor *PP = nullptr) override {
@@ -158,12 +158,12 @@ private:
};
std::unique_ptr<CompilerInstance> BuildCompilerInstance() {
- auto Ins = llvm::make_unique<CompilerInstance>();
- auto DC = llvm::make_unique<TestDiagnosticConsumer>();
+ auto Ins = std::make_unique<CompilerInstance>();
+ auto DC = std::make_unique<TestDiagnosticConsumer>();
const bool ShouldOwnClient = true;
Ins->createDiagnostics(DC.release(), ShouldOwnClient);
- auto Inv = llvm::make_unique<CompilerInvocation>();
+ auto Inv = std::make_unique<CompilerInvocation>();
std::vector<const char *> ClangArgv(ClangArgs.size());
std::transform(ClangArgs.begin(), ClangArgs.end(), ClangArgv.begin(),
@@ -215,7 +215,7 @@ std::unique_ptr<CompilerInstance> BuildC
std::unique_ptr<ASTContext>
BuildASTContext(CompilerInstance &CI, SelectorTable &ST, Builtin::Context &BC) {
- auto AST = llvm::make_unique<ASTContext>(
+ auto AST = std::make_unique<ASTContext>(
CI.getLangOpts(), CI.getSourceManager(),
CI.getPreprocessor().getIdentifierTable(), ST, BC);
AST->InitBuiltinTypes(CI.getTarget());
@@ -267,15 +267,15 @@ void AddExternalSource(CIAndOrigins &CI,
for (CIAndOrigins &Import : Imports)
Sources.push_back({Import.getASTContext(), Import.getFileManager(),
Import.getOriginMap()});
- auto ES = llvm::make_unique<ExternalASTMerger>(Target, Sources);
+ auto ES = std::make_unique<ExternalASTMerger>(Target, Sources);
CI.getASTContext().setExternalSource(ES.release());
CI.getASTContext().getTranslationUnitDecl()->setHasExternalVisibleStorage();
}
CIAndOrigins BuildIndirect(CIAndOrigins &CI) {
CIAndOrigins IndirectCI{init_convenience::BuildCompilerInstance()};
- auto ST = llvm::make_unique<SelectorTable>();
- auto BC = llvm::make_unique<Builtin::Context>();
+ auto ST = std::make_unique<SelectorTable>();
+ auto BC = std::make_unique<Builtin::Context>();
std::unique_ptr<ASTContext> AST = init_convenience::BuildASTContext(
IndirectCI.getCompilerInstance(), *ST, *BC);
IndirectCI.getCompilerInstance().setASTContext(AST.release());
@@ -300,8 +300,8 @@ llvm::Expected<CIAndOrigins> Parse(const
llvm::MutableArrayRef<CIAndOrigins> Imports,
bool ShouldDumpAST, bool ShouldDumpIR) {
CIAndOrigins CI{init_convenience::BuildCompilerInstance()};
- auto ST = llvm::make_unique<SelectorTable>();
- auto BC = llvm::make_unique<Builtin::Context>();
+ auto ST = std::make_unique<SelectorTable>();
+ auto BC = std::make_unique<Builtin::Context>();
std::unique_ptr<ASTContext> AST =
init_convenience::BuildASTContext(CI.getCompilerInstance(), *ST, *BC);
CI.getCompilerInstance().setASTContext(AST.release());
@@ -310,7 +310,7 @@ llvm::Expected<CIAndOrigins> Parse(const
std::vector<std::unique_ptr<ASTConsumer>> ASTConsumers;
- auto LLVMCtx = llvm::make_unique<llvm::LLVMContext>();
+ auto LLVMCtx = std::make_unique<llvm::LLVMContext>();
ASTConsumers.push_back(
init_convenience::BuildCodeGen(CI.getCompilerInstance(), *LLVMCtx));
auto &CG = *static_cast<CodeGenerator *>(ASTConsumers.back().get());
Modified: cfe/trunk/tools/clang-refactor/ClangRefactor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-refactor/ClangRefactor.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-refactor/ClangRefactor.cpp (original)
+++ cfe/trunk/tools/clang-refactor/ClangRefactor.cpp Wed Aug 14 16:04:18 2019
@@ -151,12 +151,12 @@ SourceSelectionArgument::fromString(Stri
findTestSelectionRanges(Filename);
if (!ParsedTestSelection)
return nullptr; // A parsing error was already reported.
- return llvm::make_unique<TestSourceSelectionArgument>(
+ return std::make_unique<TestSourceSelectionArgument>(
std::move(*ParsedTestSelection));
}
Optional<ParsedSourceRange> Range = ParsedSourceRange::fromString(Value);
if (Range)
- return llvm::make_unique<SourceRangeSelectionArgument>(std::move(*Range));
+ return std::make_unique<SourceRangeSelectionArgument>(std::move(*Range));
llvm::errs() << "error: '-selection' option must be specified using "
"<file>:<line>:<column> or "
"<file>:<line>:<column>-<line>:<column> format\n";
@@ -237,7 +237,7 @@ private:
"specified for one refactoring action");
// FIXME: cl::Required can be specified when this option is present
// in all rules in an action.
- return llvm::make_unique<cl::opt<T>>(
+ return std::make_unique<cl::opt<T>>(
Opt.getName(), cl::desc(Opt.getDescription()), cl::Optional,
cl::cat(Category), cl::sub(Subcommand));
}
@@ -260,7 +260,7 @@ public:
// Check if the selection option is supported.
for (const auto &Rule : this->ActionRules) {
if (Rule->hasSelectionRequirement()) {
- Selection = llvm::make_unique<cl::opt<std::string>>(
+ Selection = std::make_unique<cl::opt<std::string>>(
"selection",
cl::desc(
"The selected source range in which the refactoring should "
@@ -361,7 +361,7 @@ public:
// Create subcommands and command-line options.
for (auto &Action : Actions) {
- SubCommands.push_back(llvm::make_unique<RefactoringActionSubcommand>(
+ SubCommands.push_back(std::make_unique<RefactoringActionSubcommand>(
std::move(Action), Action->createActiveActionRules(),
opts::CommonRefactorOptions));
}
@@ -467,7 +467,7 @@ public:
TUCallbackType Callback;
};
- return llvm::make_unique<ToolActionFactory>(
+ return std::make_unique<ToolActionFactory>(
[this](ASTContext &AST) { return callback(AST); });
}
Modified: cfe/trunk/tools/clang-refactor/TestSupport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-refactor/TestSupport.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-refactor/TestSupport.cpp (original)
+++ cfe/trunk/tools/clang-refactor/TestSupport.cpp Wed Aug 14 16:04:18 2019
@@ -256,7 +256,7 @@ bool TestRefactoringResultConsumer::hand
std::unique_ptr<ClangRefactorToolConsumerInterface>
TestSelectionRangesInFile::createConsumer() const {
- return llvm::make_unique<TestRefactoringResultConsumer>(*this);
+ return std::make_unique<TestRefactoringResultConsumer>(*this);
}
/// Adds the \p ColumnOffset to file offset \p Offset, without going past a
Modified: cfe/trunk/tools/clang-scan-deps/ClangScanDeps.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-scan-deps/ClangScanDeps.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/clang-scan-deps/ClangScanDeps.cpp (original)
+++ cfe/trunk/tools/clang-scan-deps/ClangScanDeps.cpp Wed Aug 14 16:04:18 2019
@@ -134,7 +134,7 @@ int main(int argc, const char **argv) {
// The command options are rewritten to run Clang in preprocessor only mode.
auto AdjustingCompilations =
- llvm::make_unique<tooling::ArgumentsAdjustingCompilations>(
+ std::make_unique<tooling::ArgumentsAdjustingCompilations>(
std::move(Compilations));
AdjustingCompilations->appendArgumentsAdjuster(
[](const tooling::CommandLineArguments &Args, StringRef /*unused*/) {
@@ -162,7 +162,7 @@ int main(int argc, const char **argv) {
#endif
std::vector<std::unique_ptr<DependencyScanningTool>> WorkerTools;
for (unsigned I = 0; I < NumWorkers; ++I)
- WorkerTools.push_back(llvm::make_unique<DependencyScanningTool>(
+ WorkerTools.push_back(std::make_unique<DependencyScanningTool>(
Service, *AdjustingCompilations, DependencyOS, Errs));
std::vector<std::thread> WorkerThreads;
Modified: cfe/trunk/tools/driver/cc1_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1_main.cpp Wed Aug 14 16:04:18 2019
@@ -194,8 +194,8 @@ int cc1_main(ArrayRef<const char *> Argv
// Register the support for object-file-wrapped Clang modules.
auto PCHOps = Clang->getPCHContainerOperations();
- PCHOps->registerWriter(llvm::make_unique<ObjectFilePCHContainerWriter>());
- PCHOps->registerReader(llvm::make_unique<ObjectFilePCHContainerReader>());
+ PCHOps->registerWriter(std::make_unique<ObjectFilePCHContainerWriter>());
+ PCHOps->registerReader(std::make_unique<ObjectFilePCHContainerReader>());
// Initialize targets first, so that --version shows registered targets.
llvm::InitializeAllTargets();
Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Wed Aug 14 16:04:18 2019
@@ -315,7 +315,7 @@ getOutputStream(StringRef Path, Diagnost
sys::RemoveFileOnSignal(Path);
std::error_code EC;
- auto Out = llvm::make_unique<raw_fd_ostream>(
+ auto Out = std::make_unique<raw_fd_ostream>(
Path, EC, (Binary ? sys::fs::OF_None : sys::fs::OF_Text));
if (EC) {
Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();
@@ -450,7 +450,7 @@ static bool ExecuteAssembler(AssemblerIn
std::unique_ptr<MCAsmBackend> MAB(
TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions));
- auto FOut = llvm::make_unique<formatted_raw_ostream>(*Out);
+ auto FOut = std::make_unique<formatted_raw_ostream>(*Out);
Str.reset(TheTarget->createAsmStreamer(
Ctx, std::move(FOut), /*asmverbose*/ true,
/*useDwarfDirectory*/ true, IP, std::move(CE), std::move(MAB),
@@ -461,7 +461,7 @@ static bool ExecuteAssembler(AssemblerIn
assert(Opts.OutputType == AssemblerInvocation::FT_Obj &&
"Invalid file type!");
if (!FDOS->supportsSeeking()) {
- BOS = make_unique<buffer_ostream>(*FDOS);
+ BOS = std::make_unique<buffer_ostream>(*FDOS);
Out = BOS.get();
}
@@ -595,7 +595,7 @@ int cc1as_main(ArrayRef<const char *> Ar
// FIXME: Remove this, one day.
if (!Asm.LLVMArgs.empty()) {
unsigned NumArgs = Asm.LLVMArgs.size();
- auto Args = llvm::make_unique<const char*[]>(NumArgs + 2);
+ auto Args = std::make_unique<const char*[]>(NumArgs + 2);
Args[0] = "clang (LLVM option parsing)";
for (unsigned i = 0; i != NumArgs; ++i)
Args[i + 1] = Asm.LLVMArgs[i].c_str();
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Wed Aug 14 16:04:18 2019
@@ -3792,7 +3792,7 @@ static const ExprEvalResult* evaluateExp
QualType rettype;
CallExpr *callExpr;
- auto result = llvm::make_unique<ExprEvalResult>();
+ auto result = std::make_unique<ExprEvalResult>();
result->EvalType = CXEval_UnExposed;
result->IsUnsignedInt = false;
Modified: cfe/trunk/tools/libclang/CIndexDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexDiagnostic.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexDiagnostic.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexDiagnostic.cpp Wed Aug 14 16:04:18 2019
@@ -101,7 +101,7 @@ public:
if (Level != DiagnosticsEngine::Note)
CurrentSet = MainSet;
- auto Owner = llvm::make_unique<CXStoredDiagnostic>(*SD, LangOpts);
+ auto Owner = std::make_unique<CXStoredDiagnostic>(*SD, LangOpts);
CXStoredDiagnostic &CD = *Owner;
CurrentSet->appendDiagnostic(std::move(Owner));
@@ -122,7 +122,7 @@ public:
else
L = clang_getNullLocation();
CurrentSet->appendDiagnostic(
- llvm::make_unique<CXDiagnosticCustomNoteImpl>(Message, L));
+ std::make_unique<CXDiagnosticCustomNoteImpl>(Message, L));
}
void emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc,
@@ -140,7 +140,7 @@ public:
else
L = clang_getNullLocation();
CurrentSet->appendDiagnostic(
- llvm::make_unique<CXDiagnosticCustomNoteImpl>(Message, L));
+ std::make_unique<CXDiagnosticCustomNoteImpl>(Message, L));
}
CXDiagnosticSetImpl *CurrentSet;
Modified: cfe/trunk/tools/libclang/CIndexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexer.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexer.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexer.cpp Wed Aug 14 16:04:18 2019
@@ -52,7 +52,7 @@ void getClangResourcesPathImplAIX(LibCla
size_t BufSize = 2048u;
std::unique_ptr<char[]> Buf;
while (true) {
- Buf = llvm::make_unique<char []>(BufSize);
+ Buf = std::make_unique<char []>(BufSize);
errno = 0;
int Ret = loadquery(L_GETXINFO, Buf.get(), (unsigned int)BufSize);
if (Ret != -1)
Modified: cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp (original)
+++ cfe/trunk/tools/libclang/CXLoadedDiagnostic.cpp Wed Aug 14 16:04:18 2019
@@ -247,7 +247,7 @@ public:
} // end anonymous namespace
CXDiagnosticSet DiagLoader::load(const char *file) {
- TopDiags = llvm::make_unique<CXLoadedDiagnosticSetImpl>();
+ TopDiags = std::make_unique<CXLoadedDiagnosticSetImpl>();
std::error_code EC = readDiagnostics(file);
if (EC) {
@@ -306,7 +306,7 @@ DiagLoader::readRange(const serialized_d
}
std::error_code DiagLoader::visitStartOfDiagnostic() {
- CurrentDiags.push_back(llvm::make_unique<CXLoadedDiagnostic>());
+ CurrentDiags.push_back(std::make_unique<CXLoadedDiagnostic>());
return std::error_code();
}
Modified: cfe/trunk/tools/libclang/Indexing.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/Indexing.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/Indexing.cpp (original)
+++ cfe/trunk/tools/libclang/Indexing.cpp Wed Aug 14 16:04:18 2019
@@ -368,16 +368,16 @@ public:
DataConsumer->setASTContext(CI.getASTContext());
Preprocessor &PP = CI.getPreprocessor();
- PP.addPPCallbacks(llvm::make_unique<IndexPPCallbacks>(PP, *DataConsumer));
+ PP.addPPCallbacks(std::make_unique<IndexPPCallbacks>(PP, *DataConsumer));
DataConsumer->setPreprocessor(CI.getPreprocessorPtr());
if (SKData) {
auto *PPRec = new PPConditionalDirectiveRecord(PP.getSourceManager());
PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(PPRec));
- SKCtrl = llvm::make_unique<TUSkipBodyControl>(*SKData, *PPRec, PP);
+ SKCtrl = std::make_unique<TUSkipBodyControl>(*SKData, *PPRec, PP);
}
- return llvm::make_unique<IndexingConsumer>(*DataConsumer, SKCtrl.get());
+ return std::make_unique<IndexingConsumer>(*DataConsumer, SKCtrl.get());
}
TranslationUnitKind getTranslationUnitKind() override {
@@ -547,7 +547,7 @@ static CXErrorCode clang_indexSourceFile
auto DataConsumer =
std::make_shared<CXIndexDataConsumer>(client_data, CB, index_options,
CXTU->getTU());
- auto InterAction = llvm::make_unique<IndexingFrontendAction>(DataConsumer,
+ auto InterAction = std::make_unique<IndexingFrontendAction>(DataConsumer,
SkipBodies ? IdxSession->SkipBodyData.get() : nullptr);
std::unique_ptr<FrontendAction> IndexAction;
IndexAction = createIndexingAction(DataConsumer,
Modified: cfe/trunk/unittests/AST/EvaluateAsRValueTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/EvaluateAsRValueTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/EvaluateAsRValueTest.cpp (original)
+++ cfe/trunk/unittests/AST/EvaluateAsRValueTest.cpp Wed Aug 14 16:04:18 2019
@@ -59,7 +59,7 @@ class EvaluateConstantInitializersAction
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &Compiler,
llvm::StringRef FilePath) override {
- return llvm::make_unique<Consumer>();
+ return std::make_unique<Consumer>();
}
private:
Modified: cfe/trunk/unittests/AST/ExternalASTSourceTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/ExternalASTSourceTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/ExternalASTSourceTest.cpp (original)
+++ cfe/trunk/unittests/AST/ExternalASTSourceTest.cpp Wed Aug 14 16:04:18 2019
@@ -37,7 +37,7 @@ private:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) override {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
IntrusiveRefCntPtr<ExternalASTSource> Source;
Modified: cfe/trunk/unittests/AST/RecursiveASTVisitorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/RecursiveASTVisitorTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/RecursiveASTVisitorTest.cpp (original)
+++ cfe/trunk/unittests/AST/RecursiveASTVisitorTest.cpp Wed Aug 14 16:04:18 2019
@@ -42,7 +42,7 @@ public:
llvm::function_ref<void(ASTContext &CTx)> Process;
};
- return llvm::make_unique<Consumer>(Process);
+ return std::make_unique<Consumer>(Process);
}
private:
Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersInternalTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersInternalTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/ASTMatchersInternalTest.cpp (original)
+++ cfe/trunk/unittests/ASTMatchers/ASTMatchersInternalTest.cpp Wed Aug 14 16:04:18 2019
@@ -55,13 +55,13 @@ TEST(AstMatcherPMacro, Works) {
DeclarationMatcher HasClassB = just(has(recordDecl(hasName("B")).bind("b")));
EXPECT_TRUE(matchAndVerifyResultTrue("class A { class B {}; };",
- HasClassB, llvm::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
+ HasClassB, std::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
EXPECT_TRUE(matchAndVerifyResultFalse("class A { class B {}; };",
- HasClassB, llvm::make_unique<VerifyIdIsBoundTo<Decl>>("a")));
+ HasClassB, std::make_unique<VerifyIdIsBoundTo<Decl>>("a")));
EXPECT_TRUE(matchAndVerifyResultFalse("class A { class C {}; };",
- HasClassB, llvm::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
+ HasClassB, std::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
}
AST_POLYMORPHIC_MATCHER_P(polymorphicHas,
@@ -78,13 +78,13 @@ TEST(AstPolymorphicMatcherPMacro, Works)
polymorphicHas(recordDecl(hasName("B")).bind("b"));
EXPECT_TRUE(matchAndVerifyResultTrue("class A { class B {}; };",
- HasClassB, llvm::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
+ HasClassB, std::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
EXPECT_TRUE(matchAndVerifyResultFalse("class A { class B {}; };",
- HasClassB, llvm::make_unique<VerifyIdIsBoundTo<Decl>>("a")));
+ HasClassB, std::make_unique<VerifyIdIsBoundTo<Decl>>("a")));
EXPECT_TRUE(matchAndVerifyResultFalse("class A { class C {}; };",
- HasClassB, llvm::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
+ HasClassB, std::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
StatementMatcher StatementHasClassB =
polymorphicHas(recordDecl(hasName("B")));
Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp (original)
+++ cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp Wed Aug 14 16:04:18 2019
@@ -688,24 +688,24 @@ TEST(Matcher, BindMatchedNodes) {
DeclarationMatcher ClassX = has(recordDecl(hasName("::X")).bind("x"));
EXPECT_TRUE(matchAndVerifyResultTrue("class X {};",
- ClassX, llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("x")));
+ ClassX, std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("x")));
EXPECT_TRUE(matchAndVerifyResultFalse("class X {};",
- ClassX, llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("other-id")));
+ ClassX, std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("other-id")));
TypeMatcher TypeAHasClassB = hasDeclaration(
recordDecl(hasName("A"), has(recordDecl(hasName("B")).bind("b"))));
EXPECT_TRUE(matchAndVerifyResultTrue("class A { public: A *a; class B {}; };",
TypeAHasClassB,
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("b")));
StatementMatcher MethodX =
callExpr(callee(cxxMethodDecl(hasName("x")))).bind("x");
EXPECT_TRUE(matchAndVerifyResultTrue("class A { void x() { x(); } };",
MethodX,
- llvm::make_unique<VerifyIdIsBoundTo<CXXMemberCallExpr>>("x")));
+ std::make_unique<VerifyIdIsBoundTo<CXXMemberCallExpr>>("x")));
}
TEST(Matcher, BindTheSameNameInAlternatives) {
@@ -722,7 +722,7 @@ TEST(Matcher, BindTheSameNameInAlternati
// The second branch binds x to f() and succeeds.
"int f() { return 0 + f(); }",
matcher,
- llvm::make_unique<VerifyIdIsBoundTo<CallExpr>>("x")));
+ std::make_unique<VerifyIdIsBoundTo<CallExpr>>("x")));
}
TEST(Matcher, BindsIDForMemoizedResults) {
@@ -734,7 +734,7 @@ TEST(Matcher, BindsIDForMemoizedResults)
DeclarationMatcher(anyOf(
recordDecl(hasName("A"), hasDescendant(ClassX)),
recordDecl(hasName("B"), hasDescendant(ClassX)))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 2)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 2)));
}
TEST(HasType, MatchesAsString) {
@@ -784,7 +784,7 @@ TEST(Matcher, NestedOverloadedOperatorCa
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;",
cxxOperatorCallExpr(hasOverloadedOperatorName("&&")).bind("x"),
- llvm::make_unique<VerifyIdIsBoundTo<CXXOperatorCallExpr>>("x", 2)));
+ std::make_unique<VerifyIdIsBoundTo<CXXOperatorCallExpr>>("x", 2)));
EXPECT_TRUE(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;",
@@ -1817,7 +1817,7 @@ TEST(EachOf, TriggersForEachMatch) {
"class A { int a; int b; };",
recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
has(fieldDecl(hasName("b")).bind("v")))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 2)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 2)));
}
TEST(EachOf, BehavesLikeAnyOfUnlessBothMatch) {
@@ -1825,12 +1825,12 @@ TEST(EachOf, BehavesLikeAnyOfUnlessBothM
"class A { int a; int c; };",
recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
has(fieldDecl(hasName("b")).bind("v")))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 1)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A { int c; int b; };",
recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
has(fieldDecl(hasName("b")).bind("v")))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 1)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 1)));
EXPECT_TRUE(notMatches(
"class A { int c; int d; };",
recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
@@ -2337,7 +2337,7 @@ TEST(EqualsBoundNodeMatcher, UsingForEac
forEachDescendant(varDecl(hasType(
qualType(equalsBoundNode("type")))).bind("decl"))),
// Only i and j should match, not k.
- llvm::make_unique<VerifyIdIsBoundTo<VarDecl>>("decl", 2)));
+ std::make_unique<VerifyIdIsBoundTo<VarDecl>>("decl", 2)));
}
TEST(EqualsBoundNodeMatcher, FiltersMatchedCombinations) {
@@ -2350,7 +2350,7 @@ TEST(EqualsBoundNodeMatcher, FiltersMatc
functionDecl(
hasName("f"), forEachDescendant(varDecl().bind("d")),
forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d")))))),
- llvm::make_unique<VerifyIdIsBoundTo<VarDecl>>("d", 5)));
+ std::make_unique<VerifyIdIsBoundTo<VarDecl>>("d", 5)));
}
TEST(EqualsBoundNodeMatcher, UnlessDescendantsOfAncestorsMatch) {
@@ -2367,7 +2367,7 @@ TEST(EqualsBoundNodeMatcher, UnlessDesce
callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),
on(declRefExpr(to(varDecl(equalsBoundNode("var")))))))))))
.bind("data"),
- llvm::make_unique<VerifyIdIsBoundTo<Expr>>("data", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Expr>>("data", 1)));
EXPECT_FALSE(matches(
"struct StringRef { int size() const; const char* data() const; };"
Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersNodeTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/ASTMatchersNodeTest.cpp (original)
+++ cfe/trunk/unittests/ASTMatchers/ASTMatchersNodeTest.cpp Wed Aug 14 16:04:18 2019
@@ -1313,11 +1313,11 @@ TEST(TypeMatching, PointerTypes) {
//EXPECT_TRUE(matchAndVerifyResultTrue(
// "int* a;",
// pointerTypeLoc(pointeeLoc(typeLoc().bind("loc"))),
- // llvm::make_unique<VerifyIdIsBoundTo<TypeLoc>>("loc", 1)));
+ // std::make_unique<VerifyIdIsBoundTo<TypeLoc>>("loc", 1)));
//EXPECT_TRUE(matchAndVerifyResultTrue(
// "int* a;",
// pointerTypeLoc().bind("loc"),
- // llvm::make_unique<VerifyIdIsBoundTo<TypeLoc>>("loc", 1)));
+ // std::make_unique<VerifyIdIsBoundTo<TypeLoc>>("loc", 1)));
EXPECT_TRUE(matches(
"int** a;",
loc(pointerType(pointee(qualType())))));
@@ -1576,14 +1576,14 @@ public:
TEST(IsEqualTo, MatchesNodesByIdentity) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X { class Y {}; };", recordDecl(hasName("::X::Y")).bind(""),
- llvm::make_unique<VerifyAncestorHasChildIsEqual<CXXRecordDecl>>()));
+ std::make_unique<VerifyAncestorHasChildIsEqual<CXXRecordDecl>>()));
EXPECT_TRUE(matchAndVerifyResultTrue(
"void f() { if (true) if(true) {} }", ifStmt().bind(""),
- llvm::make_unique<VerifyAncestorHasChildIsEqual<IfStmt>>()));
+ std::make_unique<VerifyAncestorHasChildIsEqual<IfStmt>>()));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X { class Y {} y; };",
fieldDecl(hasName("y"), hasType(type().bind(""))).bind("decl"),
- llvm::make_unique<VerifyAncestorHasChildIsEqual<Type>>()));
+ std::make_unique<VerifyAncestorHasChildIsEqual<Type>>()));
}
TEST(TypedefDeclMatcher, Match) {
Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp (original)
+++ cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Wed Aug 14 16:04:18 2019
@@ -80,7 +80,7 @@ TEST(HasDescendant, MatchesDescendantTyp
"void f() { int a; float c; int d; int e; }",
functionDecl(forEachDescendant(
varDecl(hasDescendant(isInteger())).bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 3)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 3)));
}
TEST(HasDescendant, MatchesDescendantsOfTypes) {
@@ -95,7 +95,7 @@ TEST(HasDescendant, MatchesDescendantsOf
EXPECT_TRUE(matchAndVerifyResultTrue(
"void f() { int*** i; }",
qualType(asString("int ***"), forEachDescendant(pointerType().bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<Type>>("x", 2)));
+ std::make_unique<VerifyIdIsBoundTo<Type>>("x", 2)));
}
@@ -107,7 +107,7 @@ TEST(Has, MatchesChildrenOfTypes) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"int (*f)(float, int);",
qualType(functionType(), forEach(qualType(isInteger()).bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<QualType>>("x", 2)));
+ std::make_unique<VerifyIdIsBoundTo<QualType>>("x", 2)));
}
TEST(Has, MatchesChildTypes) {
@@ -642,7 +642,7 @@ TEST(ForEachArgumentWithParam, MatchesCX
" int y = 1;"
" S1[y];"
"}",
- CallExpr, llvm::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param", 1)));
+ CallExpr, std::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param", 1)));
StatementMatcher CallExpr2 =
callExpr(forEachArgumentWithParam(ArgumentY, IntParam));
@@ -654,7 +654,7 @@ TEST(ForEachArgumentWithParam, MatchesCX
" int y = 1;"
" S::g(y);"
"}",
- CallExpr2, llvm::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param", 1)));
+ CallExpr2, std::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param", 1)));
}
TEST(ForEachArgumentWithParam, MatchesCallExpr) {
@@ -666,19 +666,19 @@ TEST(ForEachArgumentWithParam, MatchesCa
EXPECT_TRUE(
matchAndVerifyResultTrue("void f(int i) { int y; f(y); }", CallExpr,
- llvm::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>(
+ std::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>(
"param")));
EXPECT_TRUE(
matchAndVerifyResultTrue("void f(int i) { int y; f(y); }", CallExpr,
- llvm::make_unique<VerifyIdIsBoundTo<DeclRefExpr>>(
+ std::make_unique<VerifyIdIsBoundTo<DeclRefExpr>>(
"arg")));
EXPECT_TRUE(matchAndVerifyResultTrue(
"void f(int i, int j) { int y; f(y, y); }", CallExpr,
- llvm::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param", 2)));
+ std::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param", 2)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"void f(int i, int j) { int y; f(y, y); }", CallExpr,
- llvm::make_unique<VerifyIdIsBoundTo<DeclRefExpr>>("arg", 2)));
+ std::make_unique<VerifyIdIsBoundTo<DeclRefExpr>>("arg", 2)));
}
TEST(ForEachArgumentWithParam, MatchesConstructExpr) {
@@ -695,7 +695,7 @@ TEST(ForEachArgumentWithParam, MatchesCo
"int y = 0;"
"C Obj(y);",
ConstructExpr,
- llvm::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param")));
+ std::make_unique<VerifyIdIsBoundTo<ParmVarDecl>>("param")));
}
TEST(ForEachArgumentWithParam, HandlesBoundNodesForNonMatches) {
@@ -712,7 +712,7 @@ TEST(ForEachArgumentWithParam, HandlesBo
forEachDescendant(varDecl().bind("v")),
forEachDescendant(callExpr(forEachArgumentWithParam(
declRefExpr(to(decl(equalsBoundNode("v")))), parmVarDecl())))),
- llvm::make_unique<VerifyIdIsBoundTo<VarDecl>>("v", 4)));
+ std::make_unique<VerifyIdIsBoundTo<VarDecl>>("v", 4)));
}
TEST(QualType, hasCanonicalType) {
@@ -1817,7 +1817,7 @@ TEST(SwitchCase, MatchesEachCase) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"void x() { switch (42) { case 1: case 2: case 3: default:; } }",
switchStmt(forEachSwitchCase(caseStmt().bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<CaseStmt>>("x", 3)));
+ std::make_unique<VerifyIdIsBoundTo<CaseStmt>>("x", 3)));
}
TEST(Declaration, HasExplicitSpecifier) {
@@ -1894,13 +1894,13 @@ TEST(HasConditionVariableStatement, Matc
TEST(ForEach, BindsOneNode) {
EXPECT_TRUE(matchAndVerifyResultTrue("class C { int x; };",
recordDecl(hasName("C"), forEach(fieldDecl(hasName("x")).bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("x", 1)));
}
TEST(ForEach, BindsMultipleNodes) {
EXPECT_TRUE(matchAndVerifyResultTrue("class C { int x; int y; int z; };",
recordDecl(hasName("C"), forEach(fieldDecl().bind("f"))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 3)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 3)));
}
TEST(ForEach, BindsRecursiveCombinations) {
@@ -1908,14 +1908,14 @@ TEST(ForEach, BindsRecursiveCombinations
"class C { class D { int x; int y; }; class E { int y; int z; }; };",
recordDecl(hasName("C"),
forEach(recordDecl(forEach(fieldDecl().bind("f"))))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 4)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 4)));
}
TEST(ForEachDescendant, BindsOneNode) {
EXPECT_TRUE(matchAndVerifyResultTrue("class C { class D { int x; }; };",
recordDecl(hasName("C"),
forEachDescendant(fieldDecl(hasName("x")).bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("x", 1)));
}
TEST(ForEachDescendant, NestedForEachDescendant) {
@@ -1924,7 +1924,7 @@ TEST(ForEachDescendant, NestedForEachDes
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A { class B { class C {}; }; };",
recordDecl(hasName("A"), anyOf(m, forEachDescendant(m))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", "C")));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", "C")));
// Check that a partial match of 'm' that binds 'x' in the
// first part of anyOf(m, anything()) will not overwrite the
@@ -1932,7 +1932,7 @@ TEST(ForEachDescendant, NestedForEachDes
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A { class B { class C {}; }; };",
recordDecl(hasName("A"), allOf(hasDescendant(m), anyOf(m, anything()))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", "C")));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", "C")));
}
TEST(ForEachDescendant, BindsMultipleNodes) {
@@ -1940,7 +1940,7 @@ TEST(ForEachDescendant, BindsMultipleNod
"class C { class D { int x; int y; }; "
" class E { class F { int y; int z; }; }; };",
recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind("f"))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 4)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 4)));
}
TEST(ForEachDescendant, BindsRecursiveCombinations) {
@@ -1949,7 +1949,7 @@ TEST(ForEachDescendant, BindsRecursiveCo
" class E { class F { class G { int y; int z; }; }; }; }; };",
recordDecl(hasName("C"), forEachDescendant(recordDecl(
forEachDescendant(fieldDecl().bind("f"))))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 8)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("f", 8)));
}
TEST(ForEachDescendant, BindsCombinations) {
@@ -1958,13 +1958,13 @@ TEST(ForEachDescendant, BindsCombination
"(true) {} }",
compoundStmt(forEachDescendant(ifStmt().bind("if")),
forEachDescendant(whileStmt().bind("while"))),
- llvm::make_unique<VerifyIdIsBoundTo<IfStmt>>("if", 6)));
+ std::make_unique<VerifyIdIsBoundTo<IfStmt>>("if", 6)));
}
TEST(Has, DoesNotDeleteBindings) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X { int a; };", recordDecl(decl().bind("x"), has(fieldDecl())),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
}
TEST(LoopingMatchers, DoNotOverwritePreviousMatchResultOnFailure) {
@@ -1992,100 +1992,100 @@ TEST(LoopingMatchers, DoNotOverwritePrev
recordDecl(
recordDecl().bind("x"), hasName("::X"),
anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything())),
- llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X {};", recordDecl(recordDecl().bind("x"), hasName("::X"),
anyOf(unless(anything()), anything())),
- llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"template<typename T1, typename T2> class X {}; X<float, int> x;",
classTemplateSpecializationDecl(
decl().bind("x"),
hasAnyTemplateArgument(refersToType(asString("int")))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X { void f(); void g(); };",
cxxRecordDecl(decl().bind("x"), hasMethod(hasName("g"))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X { X() : a(1), b(2) {} double a; int b; };",
recordDecl(decl().bind("x"),
has(cxxConstructorDecl(
hasAnyConstructorInitializer(forField(hasName("b")))))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"void x(int, int) { x(0, 42); }",
callExpr(expr().bind("x"), hasAnyArgument(integerLiteral(equals(42)))),
- llvm::make_unique<VerifyIdIsBoundTo<Expr>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Expr>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"void x(int, int y) {}",
functionDecl(decl().bind("x"), hasAnyParameter(hasName("y"))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"void x() { return; if (true) {} }",
functionDecl(decl().bind("x"),
has(compoundStmt(hasAnySubstatement(ifStmt())))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"namespace X { void b(int); void b(); }"
"using X::b;",
usingDecl(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl(
functionDecl(parameterCountIs(1))))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A{}; class B{}; class C : B, A {};",
cxxRecordDecl(decl().bind("x"), isDerivedFrom("::A")),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A{}; typedef A B; typedef A C; typedef A D;"
"class E : A {};",
cxxRecordDecl(decl().bind("x"), isDerivedFrom("C")),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A { class B { void f() {} }; };",
functionDecl(decl().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"template <typename T> struct A { struct B {"
" void f() { if(true) {} }"
"}; };"
"void t() { A<int>::B b; b.f(); }",
ifStmt(stmt().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
- llvm::make_unique<VerifyIdIsBoundTo<Stmt>>("x", 2)));
+ std::make_unique<VerifyIdIsBoundTo<Stmt>>("x", 2)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A {};",
recordDecl(hasName("::A"), decl().bind("x"), unless(hasName("fooble"))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A { A() : s(), i(42) {} const char *s; int i; };",
cxxConstructorDecl(hasName("::A::A"), decl().bind("x"),
forEachConstructorInitializer(forField(hasName("i")))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("x", 1)));
}
TEST(ForEachDescendant, BindsCorrectNodes) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"class C { void f(); int i; };",
recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("decl", 1)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("decl", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class C { void f() {} int i; };",
recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),
- llvm::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("decl", 1)));
+ std::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("decl", 1)));
}
TEST(FindAll, BindsNodeOnMatch) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A {};",
recordDecl(hasName("::A"), findAll(recordDecl(hasName("::A")).bind("v"))),
- llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("v", 1)));
+ std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("v", 1)));
}
TEST(FindAll, BindsDescendantNodeOnMatch) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A { int a; int b; };",
recordDecl(hasName("::A"), findAll(fieldDecl().bind("v"))),
- llvm::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 2)));
+ std::make_unique<VerifyIdIsBoundTo<FieldDecl>>("v", 2)));
}
TEST(FindAll, BindsNodeAndDescendantNodesOnOneMatch) {
@@ -2094,12 +2094,12 @@ TEST(FindAll, BindsNodeAndDescendantNode
recordDecl(hasName("::A"),
findAll(decl(anyOf(recordDecl(hasName("::A")).bind("v"),
fieldDecl().bind("v"))))),
- llvm::make_unique<VerifyIdIsBoundTo<Decl>>("v", 3)));
+ std::make_unique<VerifyIdIsBoundTo<Decl>>("v", 3)));
EXPECT_TRUE(matchAndVerifyResultTrue(
"class A { class B {}; class C {}; };",
recordDecl(hasName("::A"), findAll(recordDecl(isDefinition()).bind("v"))),
- llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("v", 3)));
+ std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("v", 3)));
}
TEST(HasAncenstor, MatchesDeclarationAncestors) {
@@ -2137,7 +2137,7 @@ TEST(HasAncestor, BindsRecursiveCombinat
EXPECT_TRUE(matchAndVerifyResultTrue(
"class C { class D { class E { class F { int y; }; }; }; };",
fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind("r"))))),
- llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("r", 1)));
+ std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("r", 1)));
}
TEST(HasAncestor, BindsCombinationsWithHasDescendant) {
@@ -2149,7 +2149,7 @@ TEST(HasAncestor, BindsCombinationsWithH
hasAncestor(recordDecl())))
).bind("d")
)),
- llvm::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("d", "E")));
+ std::make_unique<VerifyIdIsBoundTo<CXXRecordDecl>>("d", "E")));
}
TEST(HasAncestor, MatchesClosestAncestor) {
@@ -2163,7 +2163,7 @@ TEST(HasAncestor, MatchesClosestAncestor
varDecl(hasName("x"),
hasAncestor(functionDecl(hasParameter(
0, varDecl(hasType(asString("int"))))).bind("f"))).bind("v"),
- llvm::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("f", "g", 2)));
+ std::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("f", "g", 2)));
}
TEST(HasAncestor, MatchesInTemplateInstantiations) {
@@ -2300,7 +2300,7 @@ TEST(HasParent, NoDuplicateParents) {
EXPECT_FALSE(matchAndVerifyResultTrue(
"template <typename T> int Foo() { return 1 + 2; }\n"
"int x = Foo<int>() + Foo<unsigned>();",
- stmt().bind("node"), llvm::make_unique<HasDuplicateParents>()));
+ stmt().bind("node"), std::make_unique<HasDuplicateParents>()));
}
TEST(TypeMatching, PointeeTypes) {
@@ -2362,7 +2362,7 @@ TEST(NNS, BindsNestedNameSpecifiers) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"namespace ns { struct E { struct B {}; }; } ns::E::B b;",
nestedNameSpecifier(specifiesType(asString("struct ns::E"))).bind("nns"),
- llvm::make_unique<VerifyIdIsBoundTo<NestedNameSpecifier>>(
+ std::make_unique<VerifyIdIsBoundTo<NestedNameSpecifier>>(
"nns", "ns::struct E::")));
}
@@ -2370,7 +2370,7 @@ TEST(NNS, BindsNestedNameSpecifierLocs)
EXPECT_TRUE(matchAndVerifyResultTrue(
"namespace ns { struct B {}; } ns::B b;",
loc(nestedNameSpecifier()).bind("loc"),
- llvm::make_unique<VerifyIdIsBoundTo<NestedNameSpecifierLoc>>("loc", 1)));
+ std::make_unique<VerifyIdIsBoundTo<NestedNameSpecifierLoc>>("loc", 1)));
}
TEST(NNS, DescendantsOfNestedNameSpecifiers) {
@@ -2399,7 +2399,7 @@ TEST(NNS, DescendantsOfNestedNameSpecifi
Fragment,
nestedNameSpecifier(specifiesType(asString("struct a::A::B")),
forEach(nestedNameSpecifier().bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<NestedNameSpecifier>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<NestedNameSpecifier>>("x", 1)));
}
TEST(NNS, NestedNameSpecifiersAsDescendants) {
@@ -2415,7 +2415,7 @@ TEST(NNS, NestedNameSpecifiersAsDescenda
functionDecl(hasName("f"),
forEachDescendant(nestedNameSpecifier().bind("x"))),
// Nested names: a, a::A and a::A::B.
- llvm::make_unique<VerifyIdIsBoundTo<NestedNameSpecifier>>("x", 3)));
+ std::make_unique<VerifyIdIsBoundTo<NestedNameSpecifier>>("x", 3)));
}
TEST(NNSLoc, DescendantsOfNestedNameSpecifierLocs) {
@@ -2442,7 +2442,7 @@ TEST(NNSLoc, DescendantsOfNestedNameSpec
Fragment,
nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"))),
forEach(nestedNameSpecifierLoc().bind("x"))),
- llvm::make_unique<VerifyIdIsBoundTo<NestedNameSpecifierLoc>>("x", 1)));
+ std::make_unique<VerifyIdIsBoundTo<NestedNameSpecifierLoc>>("x", 1)));
}
TEST(NNSLoc, NestedNameSpecifierLocsAsDescendants) {
@@ -2458,7 +2458,7 @@ TEST(NNSLoc, NestedNameSpecifierLocsAsDe
functionDecl(hasName("f"),
forEachDescendant(nestedNameSpecifierLoc().bind("x"))),
// Nested names: a, a::A and a::A::B.
- llvm::make_unique<VerifyIdIsBoundTo<NestedNameSpecifierLoc>>("x", 3)));
+ std::make_unique<VerifyIdIsBoundTo<NestedNameSpecifierLoc>>("x", 3)));
}
template <typename T> class VerifyMatchOnNode : public BoundNodesCallback {
public:
@@ -2483,12 +2483,12 @@ private:
TEST(MatchFinder, CanMatchDeclarationsRecursively) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
- llvm::make_unique<VerifyMatchOnNode<Decl>>(
+ std::make_unique<VerifyMatchOnNode<Decl>>(
"X", decl(hasDescendant(recordDecl(hasName("X::Y")).bind("Y"))),
"Y")));
EXPECT_TRUE(matchAndVerifyResultFalse(
"class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
- llvm::make_unique<VerifyMatchOnNode<Decl>>(
+ std::make_unique<VerifyMatchOnNode<Decl>>(
"X", decl(hasDescendant(recordDecl(hasName("X::Z")).bind("Z"))),
"Z")));
}
@@ -2496,22 +2496,22 @@ TEST(MatchFinder, CanMatchDeclarationsRe
TEST(MatchFinder, CanMatchStatementsRecursively) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"void f() { if (1) { for (;;) { } } }", ifStmt().bind("if"),
- llvm::make_unique<VerifyMatchOnNode<Stmt>>(
+ std::make_unique<VerifyMatchOnNode<Stmt>>(
"if", stmt(hasDescendant(forStmt().bind("for"))), "for")));
EXPECT_TRUE(matchAndVerifyResultFalse(
"void f() { if (1) { for (;;) { } } }", ifStmt().bind("if"),
- llvm::make_unique<VerifyMatchOnNode<Stmt>>(
+ std::make_unique<VerifyMatchOnNode<Stmt>>(
"if", stmt(hasDescendant(declStmt().bind("decl"))), "decl")));
}
TEST(MatchFinder, CanMatchSingleNodesRecursively) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
- llvm::make_unique<VerifyMatchOnNode<Decl>>(
+ std::make_unique<VerifyMatchOnNode<Decl>>(
"X", recordDecl(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")));
EXPECT_TRUE(matchAndVerifyResultFalse(
"class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),
- llvm::make_unique<VerifyMatchOnNode<Decl>>(
+ std::make_unique<VerifyMatchOnNode<Decl>>(
"X", recordDecl(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")));
}
@@ -2569,18 +2569,18 @@ TEST(Matcher, ForEachOverriden) {
// C::f overrides A::f.
EXPECT_TRUE(matchAndVerifyResultTrue(
Code1, ForEachOverriddenInClass("C"),
- llvm::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("override", "f", 1)));
+ std::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("override", "f", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
Code1, ForEachOverriddenInClass("C"),
- llvm::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("overridden", "f",
+ std::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("overridden", "f",
1)));
// B::f overrides A::f.
EXPECT_TRUE(matchAndVerifyResultTrue(
Code1, ForEachOverriddenInClass("B"),
- llvm::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("override", "f", 1)));
+ std::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("override", "f", 1)));
EXPECT_TRUE(matchAndVerifyResultTrue(
Code1, ForEachOverriddenInClass("B"),
- llvm::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("overridden", "f",
+ std::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("overridden", "f",
1)));
// A::f overrides nothing.
EXPECT_TRUE(notMatches(Code1, ForEachOverriddenInClass("A")));
@@ -2592,10 +2592,10 @@ TEST(Matcher, ForEachOverriden) {
// B::f overrides A1::f and A2::f. This produces two matches.
EXPECT_TRUE(matchAndVerifyResultTrue(
Code2, ForEachOverriddenInClass("B"),
- llvm::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("override", "f", 2)));
+ std::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("override", "f", 2)));
EXPECT_TRUE(matchAndVerifyResultTrue(
Code2, ForEachOverriddenInClass("B"),
- llvm::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("overridden", "f",
+ std::make_unique<VerifyIdIsBoundTo<CXXMethodDecl>>("overridden", "f",
2)));
// A1::f overrides nothing.
EXPECT_TRUE(notMatches(Code2, ForEachOverriddenInClass("A1")));
Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/ParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/ASTMatchers/Dynamic/ParserTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/ASTMatchers/Dynamic/ParserTest.cpp (original)
+++ cfe/trunk/unittests/ASTMatchers/Dynamic/ParserTest.cpp Wed Aug 14 16:04:18 2019
@@ -388,10 +388,10 @@ TEST(ParserTest, ParseBindOnLet) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"void foo(int a);", M,
- llvm::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
+ std::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
EXPECT_TRUE(matchAndVerifyResultFalse(
"void foo(int b);", M,
- llvm::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
+ std::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
}
{
@@ -404,10 +404,10 @@ TEST(ParserTest, ParseBindOnLet) {
EXPECT_TRUE(matchAndVerifyResultTrue(
"void foo(int a);", M,
- llvm::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
+ std::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
EXPECT_TRUE(matchAndVerifyResultFalse(
"void foo(int b);", M,
- llvm::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
+ std::make_unique<VerifyIdIsBoundTo<FunctionDecl>>("parmABinding")));
}
}
Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/FileManagerTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/FileManagerTest.cpp (original)
+++ cfe/trunk/unittests/Basic/FileManagerTest.cpp Wed Aug 14 16:04:18 2019
@@ -110,7 +110,7 @@ TEST_F(FileManagerTest, NoVirtualDirecto
// FileManager to report "file/directory doesn't exist". This
// avoids the possibility of the result of this test being affected
// by what's in the real file system.
- manager.setStatCache(llvm::make_unique<FakeStatCache>());
+ manager.setStatCache(std::make_unique<FakeStatCache>());
ASSERT_FALSE(manager.getDirectory("virtual/dir/foo"));
ASSERT_FALSE(manager.getDirectory("virtual/dir"));
@@ -120,7 +120,7 @@ TEST_F(FileManagerTest, NoVirtualDirecto
// When a virtual file is added, all of its ancestors should be created.
TEST_F(FileManagerTest, getVirtualFileCreatesDirectoryEntriesForAncestors) {
// Fake an empty real file system.
- manager.setStatCache(llvm::make_unique<FakeStatCache>());
+ manager.setStatCache(std::make_unique<FakeStatCache>());
manager.getVirtualFile("virtual/dir/bar.h", 100, 0);
ASSERT_FALSE(manager.getDirectory("virtual/dir/foo"));
@@ -137,7 +137,7 @@ TEST_F(FileManagerTest, getVirtualFileCr
// getFile() returns non-NULL if a real file exists at the given path.
TEST_F(FileManagerTest, getFileReturnsValidFileEntryForExistingRealFile) {
// Inject fake files into the file system.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory("/tmp", 42);
statCache->InjectFile("/tmp/test", 43);
@@ -172,7 +172,7 @@ TEST_F(FileManagerTest, getFileReturnsVa
// getFile() returns non-NULL if a virtual file exists at the given path.
TEST_F(FileManagerTest, getFileReturnsValidFileEntryForExistingVirtualFile) {
// Fake an empty real file system.
- manager.setStatCache(llvm::make_unique<FakeStatCache>());
+ manager.setStatCache(std::make_unique<FakeStatCache>());
manager.getVirtualFile("virtual/dir/bar.h", 100, 0);
auto file = manager.getFile("virtual/dir/bar.h");
@@ -190,7 +190,7 @@ TEST_F(FileManagerTest, getFileReturnsVa
TEST_F(FileManagerTest, getFileReturnsDifferentFileEntriesForDifferentFiles) {
// Inject two fake files into the file system. Different inodes
// mean the files are not symlinked together.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory(".", 41);
statCache->InjectFile("foo.cpp", 42);
statCache->InjectFile("bar.cpp", 43);
@@ -209,7 +209,7 @@ TEST_F(FileManagerTest, getFileReturnsDi
// exists at the given path.
TEST_F(FileManagerTest, getFileReturnsErrorForNonexistentFile) {
// Inject a fake foo.cpp into the file system.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory(".", 41);
statCache->InjectFile("foo.cpp", 42);
statCache->InjectDirectory("MyDirectory", 49);
@@ -238,7 +238,7 @@ TEST_F(FileManagerTest, getFileReturnsEr
// getFile() returns the same FileEntry for real files that are aliases.
TEST_F(FileManagerTest, getFileReturnsSameFileEntryForAliasedRealFiles) {
// Inject two real files with the same inode.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory("abc", 41);
statCache->InjectFile("abc/foo.cpp", 42);
statCache->InjectFile("abc/bar.cpp", 42);
@@ -255,7 +255,7 @@ TEST_F(FileManagerTest, getFileReturnsSa
// corresponding real files that are aliases.
TEST_F(FileManagerTest, getFileReturnsSameFileEntryForAliasedVirtualFiles) {
// Inject two real files with the same inode.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory("abc", 41);
statCache->InjectFile("abc/foo.cpp", 42);
statCache->InjectFile("abc/bar.cpp", 42);
@@ -277,7 +277,7 @@ TEST_F(FileManagerTest, getFileReturnsSa
// here by checking the size.
TEST_F(FileManagerTest, getVirtualFileWithDifferentName) {
// Inject fake files into the file system.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory("c:\\tmp", 42);
statCache->InjectFile("c:\\tmp\\test", 43);
@@ -348,7 +348,7 @@ TEST_F(FileManagerTest, getVirtualFileFi
FileManager Manager(Opts, FS);
// Inject fake files into the file system.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory("/tmp", 42);
statCache->InjectFile("/tmp/test", 43);
@@ -381,7 +381,7 @@ TEST_F(FileManagerTest, getFileDontOpenR
FileManager Manager(Opts, FS);
// Inject fake files into the file system.
- auto statCache = llvm::make_unique<FakeStatCache>();
+ auto statCache = std::make_unique<FakeStatCache>();
statCache->InjectDirectory("/tmp", 42);
statCache->InjectFile("/tmp/test", 43);
Modified: cfe/trunk/unittests/Basic/SourceManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/SourceManagerTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/SourceManagerTest.cpp (original)
+++ cfe/trunk/unittests/Basic/SourceManagerTest.cpp Wed Aug 14 16:04:18 2019
@@ -354,7 +354,7 @@ TEST_F(SourceManagerTest, isBeforeInTran
PP.Initialize(*Target);
std::vector<MacroAction> Macros;
- PP.addPPCallbacks(llvm::make_unique<MacroTracker>(Macros));
+ PP.addPPCallbacks(std::make_unique<MacroTracker>(Macros));
PP.EnterMainSourceFile();
Modified: cfe/trunk/unittests/CrossTU/CrossTranslationUnitTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CrossTU/CrossTranslationUnitTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/CrossTU/CrossTranslationUnitTest.cpp (original)
+++ cfe/trunk/unittests/CrossTU/CrossTranslationUnitTest.cpp Wed Aug 14 16:04:18 2019
@@ -122,7 +122,7 @@ protected:
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &CI, StringRef) override {
CI.getAnalyzerOpts()->CTUImportThreshold = OverrideLimit;
- return llvm::make_unique<CTUASTConsumer>(CI, Success);
+ return std::make_unique<CTUASTConsumer>(CI, Success);
}
private:
Modified: cfe/trunk/unittests/Frontend/ASTUnitTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/ASTUnitTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Frontend/ASTUnitTest.cpp (original)
+++ cfe/trunk/unittests/Frontend/ASTUnitTest.cpp Wed Aug 14 16:04:18 2019
@@ -34,7 +34,7 @@ protected:
std::unique_ptr<ASTUnit> createASTUnit(bool isVolatile) {
EXPECT_FALSE(llvm::sys::fs::createTemporaryFile("ast-unit", "cpp", FD,
InputFileName));
- input_file = llvm::make_unique<ToolOutputFile>(InputFileName, FD);
+ input_file = std::make_unique<ToolOutputFile>(InputFileName, FD);
input_file->os() << "";
const char *Args[] = {"clang", "-xc++", InputFileName.c_str()};
Modified: cfe/trunk/unittests/Frontend/CompilerInstanceTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/CompilerInstanceTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Frontend/CompilerInstanceTest.cpp (original)
+++ cfe/trunk/unittests/Frontend/CompilerInstanceTest.cpp Wed Aug 14 16:04:18 2019
@@ -81,7 +81,7 @@ TEST(CompilerInstance, AllowDiagnosticLo
// Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput;
llvm::raw_string_ostream DiagnosticsOS(DiagnosticOutput);
- auto DiagPrinter = llvm::make_unique<TextDiagnosticPrinter>(
+ auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
DiagnosticsOS, new DiagnosticOptions());
CompilerInstance Instance;
IntrusiveRefCntPtr<DiagnosticsEngine> Diags = Instance.createDiagnostics(
Modified: cfe/trunk/unittests/Frontend/FrontendActionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Frontend/FrontendActionTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Frontend/FrontendActionTest.cpp (original)
+++ cfe/trunk/unittests/Frontend/FrontendActionTest.cpp Wed Aug 14 16:04:18 2019
@@ -48,7 +48,7 @@ public:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) override {
- return llvm::make_unique<Visitor>(CI, ActOnEndOfTranslationUnit,
+ return std::make_unique<Visitor>(CI, ActOnEndOfTranslationUnit,
decl_names);
}
Modified: cfe/trunk/unittests/Index/IndexTests.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Index/IndexTests.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Index/IndexTests.cpp (original)
+++ cfe/trunk/unittests/Index/IndexTests.cpp Wed Aug 14 16:04:18 2019
@@ -134,7 +134,7 @@ protected:
indexTopLevelDecls(Ctx, *PP, DeclsToIndex, *Index, Opts);
}
};
- return llvm::make_unique<Consumer>(Index, CI.getPreprocessorPtr(), Opts);
+ return std::make_unique<Consumer>(Index, CI.getPreprocessorPtr(), Opts);
}
private:
Modified: cfe/trunk/unittests/Lex/LexerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/LexerTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Lex/LexerTest.cpp (original)
+++ cfe/trunk/unittests/Lex/LexerTest.cpp Wed Aug 14 16:04:18 2019
@@ -49,7 +49,7 @@ protected:
HeaderSearch HeaderInfo(std::make_shared<HeaderSearchOptions>(), SourceMgr,
Diags, LangOpts, Target.get());
- std::unique_ptr<Preprocessor> PP = llvm::make_unique<Preprocessor>(
+ std::unique_ptr<Preprocessor> PP = std::make_unique<Preprocessor>(
std::make_shared<PreprocessorOptions>(), Diags, LangOpts, SourceMgr,
HeaderInfo, ModLoader,
/*IILookup =*/nullptr,
Modified: cfe/trunk/unittests/Sema/CodeCompleteTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/CodeCompleteTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Sema/CodeCompleteTest.cpp (original)
+++ cfe/trunk/unittests/Sema/CodeCompleteTest.cpp Wed Aug 14 16:04:18 2019
@@ -101,7 +101,7 @@ ParsedSourceLocation offsetToPosition(ll
CompletionContext runCompletion(StringRef Code, size_t Offset) {
CompletionContext ResultCtx;
- auto Action = llvm::make_unique<CodeCompleteAction>(
+ auto Action = std::make_unique<CodeCompleteAction>(
offsetToPosition(Code, Offset), ResultCtx);
clang::tooling::runToolOnCodeWithArgs(Action.release(), Code, {"-std=c++11"},
TestCCName);
Modified: cfe/trunk/unittests/Sema/ExternalSemaSourceTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Sema/ExternalSemaSourceTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Sema/ExternalSemaSourceTest.cpp (original)
+++ cfe/trunk/unittests/Sema/ExternalSemaSourceTest.cpp Wed Aug 14 16:04:18 2019
@@ -187,7 +187,7 @@ protected:
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &Compiler,
llvm::StringRef /* dummy */) override {
- return llvm::make_unique<clang::ASTConsumer>();
+ return std::make_unique<clang::ASTConsumer>();
}
void ExecuteAction() override {
Modified: cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cpp (original)
+++ cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cpp Wed Aug 14 16:04:18 2019
@@ -93,7 +93,7 @@ public:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &Compiler,
StringRef File) override {
- return llvm::make_unique<CallDescriptionConsumer>(Compiler, RM);
+ return std::make_unique<CallDescriptionConsumer>(Compiler, RM);
}
};
Modified: cfe/trunk/unittests/StaticAnalyzer/StoreTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/StoreTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/StoreTest.cpp (original)
+++ cfe/trunk/unittests/StaticAnalyzer/StoreTest.cpp Wed Aug 14 16:04:18 2019
@@ -91,7 +91,7 @@ class VariableBindAction : public ASTFro
public:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &Compiler,
StringRef File) override {
- return llvm::make_unique<VariableBindConsumer>(Compiler);
+ return std::make_unique<VariableBindConsumer>(Compiler);
}
};
Modified: cfe/trunk/unittests/StaticAnalyzer/SymbolReaperTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/SymbolReaperTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/SymbolReaperTest.cpp (original)
+++ cfe/trunk/unittests/StaticAnalyzer/SymbolReaperTest.cpp Wed Aug 14 16:04:18 2019
@@ -55,7 +55,7 @@ public:
SuperRegionLivenessAction() {}
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &Compiler,
StringRef File) override {
- return llvm::make_unique<SuperRegionLivenessConsumer>(Compiler);
+ return std::make_unique<SuperRegionLivenessConsumer>(Compiler);
}
};
Modified: cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp Wed Aug 14 16:04:18 2019
@@ -696,7 +696,7 @@ protected:
// The input file is not included in the returned command.
std::string getCommand(llvm::StringRef F) {
auto Results =
- inferMissingCompileCommands(llvm::make_unique<MemCDB>(Entries))
+ inferMissingCompileCommands(std::make_unique<MemCDB>(Entries))
->getCompileCommands(path(F));
if (Results.empty())
return "none";
@@ -710,7 +710,7 @@ protected:
// Parse the file whose command was used out of the Heuristic string.
std::string getProxy(llvm::StringRef F) {
auto Results =
- inferMissingCompileCommands(llvm::make_unique<MemCDB>(Entries))
+ inferMissingCompileCommands(std::make_unique<MemCDB>(Entries))
->getCompileCommands(path(F));
if (Results.empty())
return "none";
@@ -843,7 +843,7 @@ public:
protected:
// Look up the command from a relative path, and return it in string form.
std::string getCommand(llvm::StringRef F) {
- auto Results = inferTargetAndDriverMode(llvm::make_unique<MemCDB>(Entries))
+ auto Results = inferTargetAndDriverMode(std::make_unique<MemCDB>(Entries))
->getCompileCommands(path(F));
if (Results.empty())
return "none";
Modified: cfe/trunk/unittests/Tooling/ExecutionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/ExecutionTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/ExecutionTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/ExecutionTest.cpp Wed Aug 14 16:04:18 2019
@@ -125,7 +125,7 @@ class TestToolExecutorPlugin : public To
public:
llvm::Expected<std::unique_ptr<ToolExecutor>>
create(CommonOptionsParser &OptionsParser) override {
- return llvm::make_unique<TestToolExecutor>(std::move(OptionsParser));
+ return std::make_unique<TestToolExecutor>(std::move(OptionsParser));
}
};
Modified: cfe/trunk/unittests/Tooling/RefactoringTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RefactoringTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/RefactoringTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/RefactoringTest.cpp Wed Aug 14 16:04:18 2019
@@ -680,7 +680,7 @@ private:
Visitor->SM = &compiler.getSourceManager();
Visitor->Context = &compiler.getASTContext();
/// TestConsumer will be deleted by the framework calling us.
- return llvm::make_unique<FindConsumer>(Visitor);
+ return std::make_unique<FindConsumer>(Visitor);
}
private:
Modified: cfe/trunk/unittests/Tooling/Syntax/TokensTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/Syntax/TokensTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/Syntax/TokensTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/Syntax/TokensTest.cpp Wed Aug 14 16:04:18 2019
@@ -106,7 +106,7 @@ public:
std::unique_ptr<ASTConsumer>
CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
private:
Modified: cfe/trunk/unittests/Tooling/Syntax/TreeTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/Syntax/TreeTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/Syntax/TreeTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/Syntax/TreeTest.cpp Wed Aug 14 16:04:18 2019
@@ -40,7 +40,7 @@ protected:
}
void HandleTranslationUnit(ASTContext &Ctx) override {
- Arena = llvm::make_unique<syntax::Arena>(Ctx.getSourceManager(),
+ Arena = std::make_unique<syntax::Arena>(Ctx.getSourceManager(),
Ctx.getLangOpts(),
std::move(*Tokens).consume());
Tokens = nullptr; // make sure we fail if this gets called twice.
@@ -63,8 +63,8 @@ protected:
CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
// We start recording the tokens, ast consumer will take on the result.
auto Tokens =
- llvm::make_unique<syntax::TokenCollector>(CI.getPreprocessor());
- return llvm::make_unique<BuildSyntaxTree>(Root, Arena,
+ std::make_unique<syntax::TokenCollector>(CI.getPreprocessor());
+ return std::make_unique<BuildSyntaxTree>(Root, Arena,
std::move(Tokens));
}
Modified: cfe/trunk/unittests/Tooling/TestVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/TestVisitor.h?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/TestVisitor.h (original)
+++ cfe/trunk/unittests/Tooling/TestVisitor.h Wed Aug 14 16:04:18 2019
@@ -109,7 +109,7 @@ protected:
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(CompilerInstance &, llvm::StringRef dummy) override {
/// TestConsumer will be deleted by the framework calling us.
- return llvm::make_unique<FindConsumer>(Visitor);
+ return std::make_unique<FindConsumer>(Visitor);
}
protected:
Modified: cfe/trunk/unittests/Tooling/ToolingTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/ToolingTest.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/ToolingTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/ToolingTest.cpp Wed Aug 14 16:04:18 2019
@@ -63,7 +63,7 @@ class FindTopLevelDeclConsumer : public
TEST(runToolOnCode, FindsNoTopLevelDeclOnEmptyCode) {
bool FoundTopLevelDecl = false;
EXPECT_TRUE(
- runToolOnCode(new TestAction(llvm::make_unique<FindTopLevelDeclConsumer>(
+ runToolOnCode(new TestAction(std::make_unique<FindTopLevelDeclConsumer>(
&FoundTopLevelDecl)),
""));
EXPECT_FALSE(FoundTopLevelDecl);
@@ -103,14 +103,14 @@ bool FindClassDeclX(ASTUnit *AST) {
TEST(runToolOnCode, FindsClassDecl) {
bool FoundClassDeclX = false;
EXPECT_TRUE(
- runToolOnCode(new TestAction(llvm::make_unique<FindClassDeclXConsumer>(
+ runToolOnCode(new TestAction(std::make_unique<FindClassDeclXConsumer>(
&FoundClassDeclX)),
"class X;"));
EXPECT_TRUE(FoundClassDeclX);
FoundClassDeclX = false;
EXPECT_TRUE(
- runToolOnCode(new TestAction(llvm::make_unique<FindClassDeclXConsumer>(
+ runToolOnCode(new TestAction(std::make_unique<FindClassDeclXConsumer>(
&FoundClassDeclX)),
"class Y;"));
EXPECT_FALSE(FoundClassDeclX);
@@ -135,7 +135,7 @@ TEST(newFrontendActionFactory, CreatesFr
struct IndependentFrontendActionCreator {
std::unique_ptr<ASTConsumer> newASTConsumer() {
- return llvm::make_unique<FindTopLevelDeclConsumer>(nullptr);
+ return std::make_unique<FindTopLevelDeclConsumer>(nullptr);
}
};
@@ -207,7 +207,7 @@ struct VerifyEndCallback : public Source
}
void handleEndSource() override { ++EndCalled; }
std::unique_ptr<ASTConsumer> newASTConsumer() {
- return llvm::make_unique<FindTopLevelDeclConsumer>(&Matched);
+ return std::make_unique<FindTopLevelDeclConsumer>(&Matched);
}
unsigned BeginCalled;
unsigned EndCalled;
@@ -249,7 +249,7 @@ struct SkipBodyAction : public clang::AS
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &Compiler,
StringRef) override {
Compiler.getFrontendOpts().SkipFunctionBodies = true;
- return llvm::make_unique<SkipBodyConsumer>();
+ return std::make_unique<SkipBodyConsumer>();
}
};
@@ -340,7 +340,7 @@ struct CheckColoredDiagnosticsAction : p
Compiler.getDiagnostics().getCustomDiagID(
DiagnosticsEngine::Fatal,
"getDiagnosticOpts().ShowColors != ShouldShowColor"));
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
private:
@@ -651,7 +651,7 @@ TEST(runToolOnCode, TestResetDiagnostics
return true;
}
};
- return llvm::make_unique<Consumer>();
+ return std::make_unique<Consumer>();
}
};
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Wed Aug 14 16:04:18 2019
@@ -1255,51 +1255,51 @@ createArgument(const Record &Arg, String
llvm::StringRef ArgName = Search->getName();
if (ArgName == "AlignedArgument")
- Ptr = llvm::make_unique<AlignedArgument>(Arg, Attr);
+ Ptr = std::make_unique<AlignedArgument>(Arg, Attr);
else if (ArgName == "EnumArgument")
- Ptr = llvm::make_unique<EnumArgument>(Arg, Attr);
+ Ptr = std::make_unique<EnumArgument>(Arg, Attr);
else if (ArgName == "ExprArgument")
- Ptr = llvm::make_unique<ExprArgument>(Arg, Attr);
+ Ptr = std::make_unique<ExprArgument>(Arg, Attr);
else if (ArgName == "FunctionArgument")
- Ptr = llvm::make_unique<SimpleArgument>(Arg, Attr, "FunctionDecl *");
+ Ptr = std::make_unique<SimpleArgument>(Arg, Attr, "FunctionDecl *");
else if (ArgName == "NamedArgument")
- Ptr = llvm::make_unique<SimpleArgument>(Arg, Attr, "NamedDecl *");
+ Ptr = std::make_unique<SimpleArgument>(Arg, Attr, "NamedDecl *");
else if (ArgName == "IdentifierArgument")
- Ptr = llvm::make_unique<SimpleArgument>(Arg, Attr, "IdentifierInfo *");
+ Ptr = std::make_unique<SimpleArgument>(Arg, Attr, "IdentifierInfo *");
else if (ArgName == "DefaultBoolArgument")
- Ptr = llvm::make_unique<DefaultSimpleArgument>(
+ Ptr = std::make_unique<DefaultSimpleArgument>(
Arg, Attr, "bool", Arg.getValueAsBit("Default"));
else if (ArgName == "BoolArgument")
- Ptr = llvm::make_unique<SimpleArgument>(Arg, Attr, "bool");
+ Ptr = std::make_unique<SimpleArgument>(Arg, Attr, "bool");
else if (ArgName == "DefaultIntArgument")
- Ptr = llvm::make_unique<DefaultSimpleArgument>(
+ Ptr = std::make_unique<DefaultSimpleArgument>(
Arg, Attr, "int", Arg.getValueAsInt("Default"));
else if (ArgName == "IntArgument")
- Ptr = llvm::make_unique<SimpleArgument>(Arg, Attr, "int");
+ Ptr = std::make_unique<SimpleArgument>(Arg, Attr, "int");
else if (ArgName == "StringArgument")
- Ptr = llvm::make_unique<StringArgument>(Arg, Attr);
+ Ptr = std::make_unique<StringArgument>(Arg, Attr);
else if (ArgName == "TypeArgument")
- Ptr = llvm::make_unique<TypeArgument>(Arg, Attr);
+ Ptr = std::make_unique<TypeArgument>(Arg, Attr);
else if (ArgName == "UnsignedArgument")
- Ptr = llvm::make_unique<SimpleArgument>(Arg, Attr, "unsigned");
+ Ptr = std::make_unique<SimpleArgument>(Arg, Attr, "unsigned");
else if (ArgName == "VariadicUnsignedArgument")
- Ptr = llvm::make_unique<VariadicArgument>(Arg, Attr, "unsigned");
+ Ptr = std::make_unique<VariadicArgument>(Arg, Attr, "unsigned");
else if (ArgName == "VariadicStringArgument")
- Ptr = llvm::make_unique<VariadicStringArgument>(Arg, Attr);
+ Ptr = std::make_unique<VariadicStringArgument>(Arg, Attr);
else if (ArgName == "VariadicEnumArgument")
- Ptr = llvm::make_unique<VariadicEnumArgument>(Arg, Attr);
+ Ptr = std::make_unique<VariadicEnumArgument>(Arg, Attr);
else if (ArgName == "VariadicExprArgument")
- Ptr = llvm::make_unique<VariadicExprArgument>(Arg, Attr);
+ Ptr = std::make_unique<VariadicExprArgument>(Arg, Attr);
else if (ArgName == "VariadicParamIdxArgument")
- Ptr = llvm::make_unique<VariadicParamIdxArgument>(Arg, Attr);
+ Ptr = std::make_unique<VariadicParamIdxArgument>(Arg, Attr);
else if (ArgName == "VariadicParamOrParamIdxArgument")
- Ptr = llvm::make_unique<VariadicParamOrParamIdxArgument>(Arg, Attr);
+ Ptr = std::make_unique<VariadicParamOrParamIdxArgument>(Arg, Attr);
else if (ArgName == "ParamIdxArgument")
- Ptr = llvm::make_unique<SimpleArgument>(Arg, Attr, "ParamIdx");
+ Ptr = std::make_unique<SimpleArgument>(Arg, Attr, "ParamIdx");
else if (ArgName == "VariadicIdentifierArgument")
- Ptr = llvm::make_unique<VariadicIdentifierArgument>(Arg, Attr);
+ Ptr = std::make_unique<VariadicIdentifierArgument>(Arg, Attr);
else if (ArgName == "VersionArgument")
- Ptr = llvm::make_unique<VersionArgument>(Arg, Attr);
+ Ptr = std::make_unique<VersionArgument>(Arg, Attr);
if (!Ptr) {
// Search in reverse order so that the most-derived type is handled first.
Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=368942&r1=368941&r2=368942&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Wed Aug 14 16:04:18 2019
@@ -1732,12 +1732,12 @@ std::pair<Type, std::string> Intrinsic::
SetTheory ST;
SetTheory::RecSet Elts;
- ST.addOperator("lowhalf", llvm::make_unique<LowHalf>());
- ST.addOperator("highhalf", llvm::make_unique<HighHalf>());
+ ST.addOperator("lowhalf", std::make_unique<LowHalf>());
+ ST.addOperator("highhalf", std::make_unique<HighHalf>());
ST.addOperator("rev",
- llvm::make_unique<Rev>(Arg1.first.getElementSizeInBits()));
+ std::make_unique<Rev>(Arg1.first.getElementSizeInBits()));
ST.addExpander("MaskExpand",
- llvm::make_unique<MaskExpander>(Arg1.first.getNumElements()));
+ std::make_unique<MaskExpander>(Arg1.first.getNumElements()));
ST.evaluate(DI->getArg(2), Elts, None);
std::string S = "__builtin_shufflevector(" + Arg1.second + ", " + Arg2.second;
More information about the cfe-commits
mailing list