[PATCH] D128663: Removed old test file.
Abraham Corea Diaz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 27 09:25:52 PDT 2022
abrahamcd created this revision.
Herald added a project: All.
abrahamcd requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128663
Files:
clang-tools-extra/test/clang-tidy/checkers/bugprone-standalone-empty.cpp
Index: clang-tools-extra/test/clang-tidy/checkers/bugprone-standalone-empty.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/checkers/bugprone-standalone-empty.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// RUN: %check_clang_tidy %s bugprone-standalone-empty %t
-
-namespace std {
-
-template <typename T>
-struct vector {
- bool empty();
- void clear();
-};
-
-template <typename T>
-bool empty(T &&);
-
-} // namespace std
-
-namespace absl {
-template <typename T>
-struct vector {
- bool empty();
- void clear();
-};
-
-template <class T>
-bool empty(T &&);
-} // namespace absl
-
-int test_member_empty() {
- std::vector<int> v;
-
- v.empty();
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: ignoring the result of 'empty()', did you mean 'clear()'? [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }}v.clear();{{$}}
-
- absl::vector<int> w;
-
- w.empty();
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: ignoring the result of 'empty()', did you mean 'clear()'? [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }}w.clear();{{$}}
-}
-
-int test_qualified_empty() {
- absl::vector<int> v;
-
- std::empty(v);
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: ignoring the result of 'std::empty' [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }}v.clear();{{$}}
-
- absl::empty(v);
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: ignoring the result of 'absl::empty' [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }}v.clear();{{$}}
-}
-
-int test_unqualified_empty() {
- std::vector<int> v;
-
- empty(v);
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: ignoring the result of 'std::empty' [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }}v.clear();{{$}}
-
- absl::vector<int> w;
-
- empty(w);
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: ignoring the result of 'absl::empty' [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }}w.clear();{{$}}
-
- {
- using std::empty;
- empty(v);
- // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: ignoring the result of 'std::empty' [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }} v.clear();{{$}}
- }
-
- {
- using absl::empty;
- empty(w);
- // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: ignoring the result of 'absl::empty' [bugprone-standalone-empty]
- // CHECK-FIXES: {{^ }} w.clear();{{$}}
- }
-}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128663.440263.patch
Type: text/x-patch
Size: 2353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220627/b8835120/attachment.bin>
More information about the cfe-commits
mailing list