summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-08-22 17:48:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-08-22 17:48:11 +0000
commit966eea91ad94e38a3654f154d2d5ad28ea5deb9d (patch)
treeb04c116337c9f308c479d5186d3d8819940664c6 /clang/unittests/Sema
parent1a28a06ebef290e0dafcd2d2f4ca1a817263d02b (diff)
downloadbcm5719-llvm-966eea91ad94e38a3654f154d2d5ad28ea5deb9d.tar.gz
bcm5719-llvm-966eea91ad94e38a3654f154d2d5ad28ea5deb9d.zip
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. llvm-svn: 369677
Diffstat (limited to 'clang/unittests/Sema')
-rw-r--r--clang/unittests/Sema/CMakeLists.txt2
-rw-r--r--clang/unittests/Sema/GslOwnerPointerInference.cpp61
2 files changed, 0 insertions, 63 deletions
diff --git a/clang/unittests/Sema/CMakeLists.txt b/clang/unittests/Sema/CMakeLists.txt
index 6832908e7fb..51e8d6c5b43 100644
--- a/clang/unittests/Sema/CMakeLists.txt
+++ b/clang/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/clang/unittests/Sema/GslOwnerPointerInference.cpp b/clang/unittests/Sema/GslOwnerPointerInference.cpp
deleted file mode 100644
index e340ccb4127..00000000000
--- a/clang/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
OpenPOWER on IntegriCloud