summaryrefslogtreecommitdiff
path: root/unittests/Sema
diff options
context:
space:
mode:
authorAhmed Charles <ahmedcharles@gmail.com>2014-03-07 20:03:18 +0000
committerAhmed Charles <ahmedcharles@gmail.com>2014-03-07 20:03:18 +0000
commit70639e8de3f7232504008ae36507eb0125093907 (patch)
treef909e5aea2fab1df90f2ecae3695c0acfeb45e8c /unittests/Sema
parentcaabaa8e4b0d6d4534152852a3dfc69cfd386050 (diff)
downloadclang-70639e8de3f7232504008ae36507eb0125093907.tar.gz
clang-70639e8de3f7232504008ae36507eb0125093907.tar.bz2
clang-70639e8de3f7232504008ae36507eb0125093907.tar.xz
Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Sema')
-rw-r--r--unittests/Sema/ExternalSemaSourceTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/unittests/Sema/ExternalSemaSourceTest.cpp b/unittests/Sema/ExternalSemaSourceTest.cpp
index bc8b211755..7cb5af1f13 100644
--- a/unittests/Sema/ExternalSemaSourceTest.cpp
+++ b/unittests/Sema/ExternalSemaSourceTest.cpp
@@ -137,7 +137,7 @@ public:
class ExternalSemaSourceInstaller : public clang::ASTFrontendAction {
std::vector<NamespaceDiagnosticWatcher *> Watchers;
std::vector<clang::ExternalSemaSource *> Sources;
- llvm::OwningPtr<DiagnosticConsumer> OwnedClient;
+ std::unique_ptr<DiagnosticConsumer> OwnedClient;
protected:
virtual clang::ASTConsumer *
@@ -178,7 +178,7 @@ public:
// Make sure that the NamespaceDiagnosticWatcher is not miscounting.
TEST(ExternalSemaSource, SanityCheck) {
- llvm::OwningPtr<ExternalSemaSourceInstaller> Installer(
+ std::unique_ptr<ExternalSemaSourceInstaller> Installer(
new ExternalSemaSourceInstaller);
NamespaceDiagnosticWatcher Watcher("AAB", "BBB");
Installer->PushWatcher(&Watcher);
@@ -191,7 +191,7 @@ TEST(ExternalSemaSource, SanityCheck) {
// Check that when we add a NamespaceTypeProvider, we use that suggestion
// instead of the usual suggestion we would use above.
TEST(ExternalSemaSource, ExternalTypoCorrectionPrioritized) {
- llvm::OwningPtr<ExternalSemaSourceInstaller> Installer(
+ std::unique_ptr<ExternalSemaSourceInstaller> Installer(
new ExternalSemaSourceInstaller);
NamespaceTypoProvider Provider("AAB", "BBB");
NamespaceDiagnosticWatcher Watcher("AAB", "BBB");
@@ -207,7 +207,7 @@ TEST(ExternalSemaSource, ExternalTypoCorrectionPrioritized) {
// Check that we use the first successful TypoCorrection returned from an
// ExternalSemaSource.
TEST(ExternalSemaSource, ExternalTypoCorrectionOrdering) {
- llvm::OwningPtr<ExternalSemaSourceInstaller> Installer(
+ std::unique_ptr<ExternalSemaSourceInstaller> Installer(
new ExternalSemaSourceInstaller);
NamespaceTypoProvider First("XXX", "BBB");
NamespaceTypoProvider Second("AAB", "CCC");
@@ -229,7 +229,7 @@ TEST(ExternalSemaSource, ExternalTypoCorrectionOrdering) {
// We should only try MaybeDiagnoseMissingCompleteType if we can't otherwise
// solve the problem.
TEST(ExternalSemaSource, TryOtherTacticsBeforeDiagnosing) {
- llvm::OwningPtr<ExternalSemaSourceInstaller> Installer(
+ std::unique_ptr<ExternalSemaSourceInstaller> Installer(
new ExternalSemaSourceInstaller);
CompleteTypeDiagnoser Diagnoser(false);
Installer->PushSource(&Diagnoser);
@@ -246,7 +246,7 @@ TEST(ExternalSemaSource, TryOtherTacticsBeforeDiagnosing) {
// The first ExternalSemaSource where MaybeDiagnoseMissingCompleteType returns
// true should be the last one called.
TEST(ExternalSemaSource, FirstDiagnoserTaken) {
- llvm::OwningPtr<ExternalSemaSourceInstaller> Installer(
+ std::unique_ptr<ExternalSemaSourceInstaller> Installer(
new ExternalSemaSourceInstaller);
CompleteTypeDiagnoser First(false);
CompleteTypeDiagnoser Second(true);