summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Toth <jonas.toth@gmail.com>2018-07-23 17:34:25 +0000
committerJonas Toth <jonas.toth@gmail.com>2018-07-23 17:34:25 +0000
commitd01ced937c42a3805b97588703f010f5be9b6171 (patch)
tree388cd999f600f77a481e2e12e93c861415d5b9bf
parenteb5112d6f64f31b36c52b8af7be701ceeabeaecc (diff)
Revert "[clang-tidy] fix PR36489 - respect deduced pointer types from auto as well"
I applied the wrong patch. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@337712 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp b/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp
index 2b7f9233..7cbc6ddf 100644
--- a/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp
+++ b/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp
@@ -85,32 +85,5 @@ void okay() {
auto diff = p - q; // OK, result is arithmetic
- for (int ii : a)
- ; // OK, pointer arithmetic generated by compiler
-}
-
-// Fix PR36207
-namespace std {
-template <typename CharT>
-struct char_traits {};
-
-template <typename T>
-struct allocator {};
-
-template <typename CharT,
- typename Traits = char_traits<CharT>,
- typename Allocator = allocator<CharT>>
-class basic_string {};
-
-template <class CharT, class Traits, class Alloc>
-basic_string<CharT, Traits, Alloc> operator+(const basic_string<CharT, Traits, Alloc> &lhs,
- const CharT *rhs) {}
-
-using string = basic_string<char>;
-} // namespace std
-
-std::string str_generated() {}
-
-void problematic_addition() {
- std::string status = str_generated() + " is not found";
+ for(int ii : a) ; // OK, pointer arithmetic generated by compiler
}