diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-22 17:48:11 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-22 17:48:11 +0000 |
commit | 979eefe3686b1845d8ecd7be814863a5150c8728 (patch) | |
tree | 54a6f75ff3a365fbf2eeba6a839812704dc96ff5 /unittests | |
parent | 0693d434731f0275cd8045f6e13f02dc867622d6 (diff) | |
download | clang-979eefe3686b1845d8ecd7be814863a5150c8728.tar.gz |
Revert "[LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)"
This reverts commit r369591, because it causes the formerly-reliable
-Wreturn-stack-address warning to start issuing false positives.
Testcase provided on the commit thread.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Sema/CMakeLists.txt | 2 | ||||
-rw-r--r-- | unittests/Sema/GslOwnerPointerInference.cpp | 61 |
2 files changed, 0 insertions, 63 deletions
diff --git a/unittests/Sema/CMakeLists.txt b/unittests/Sema/CMakeLists.txt index 6832908e7f..51e8d6c5b4 100644 --- a/unittests/Sema/CMakeLists.txt +++ b/unittests/Sema/CMakeLists.txt @@ -5,13 +5,11 @@ set(LLVM_LINK_COMPONENTS add_clang_unittest(SemaTests ExternalSemaSourceTest.cpp CodeCompleteTest.cpp - GslOwnerPointerInference.cpp ) clang_target_link_libraries(SemaTests PRIVATE clangAST - clangASTMatchers clangBasic clangFrontend clangParse diff --git a/unittests/Sema/GslOwnerPointerInference.cpp b/unittests/Sema/GslOwnerPointerInference.cpp deleted file mode 100644 index e340ccb412..0000000000 --- a/unittests/Sema/GslOwnerPointerInference.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//== unittests/Sema/GslOwnerPointerInference.cpp - gsl::Owner/Pointer ========// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "../ASTMatchers/ASTMatchersTest.h" -#include "clang/ASTMatchers/ASTMatchers.h" -#include "gtest/gtest.h" - -namespace clang { -using namespace ast_matchers; - -TEST(OwnerPointer, BothHaveAttributes) { - EXPECT_TRUE(matches( - R"cpp( - template<class T> - class [[gsl::Owner]] C; - - template<class T> - class [[gsl::Owner]] C {}; - - C<int> c; - )cpp", - classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner)))); -} - -TEST(OwnerPointer, ForwardDeclOnly) { - EXPECT_TRUE(matches( - R"cpp( - template<class T> - class [[gsl::Owner]] C; - - template<class T> - class C {}; - - C<int> c; - )cpp", - classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner)))); -} - -TEST(OwnerPointer, LateForwardDeclOnly) { - EXPECT_TRUE(matches( - R"cpp( - template<class T> - class C; - - template<class T> - class C {}; - - template<class T> - class [[gsl::Owner]] C; - - C<int> c; - )cpp", - classTemplateSpecializationDecl(hasName("C"), hasAttr(clang::attr::Owner)))); -} - -} // namespace clang |