Index: test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp =================================================================== --- test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp +++ test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp @@ -85,5 +85,32 @@ auto diff = p - q; // OK, result is arithmetic - for(int ii : a) ; // OK, pointer arithmetic generated by compiler + for (int ii : a) + ; // OK, pointer arithmetic generated by compiler +} + +// Fix PR36207 +namespace std { +template +struct char_traits {}; + +template +struct allocator {}; + +template , + typename Allocator = allocator> +class basic_string {}; + +template +basic_string operator+(const basic_string &lhs, + const CharT *rhs) {} + +using string = basic_string; +} // namespace std + +std::string str_generated() {} + +void problematic_addition() { + std::string status = str_generated() + " is not found"; }