Author: jonastoth Date: Mon Jul 23 10:34:25 2018 New Revision: 337712 URL: http://llvm.org/viewvc/llvm-project?rev=337712&view=rev Log: Revert "[clang-tidy] fix PR36489 - respect deduced pointer types from auto as well"
I applied the wrong patch. Modified: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp?rev=337712&r1=337711&r2=337712&view=diff ============================================================================== --- clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp (original) +++ clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp Mon Jul 23 10:34:25 2018 @@ -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 } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits