Export of internal Abseil changes

--
ea0cfebeb69b25bec343652bbe1a203f5476c51a by Mark Barolak <mbar@google.com>:

Change "std::string" to "string" in places where a "std::" qualification was incorrectly inserted by automation.

PiperOrigin-RevId: 300108520
GitOrigin-RevId: ea0cfebeb69b25bec343652bbe1a203f5476c51a
Change-Id: Ie3621e63a6ebad67b9fe56a3ebe33e1d50dac602
This commit is contained in:
Abseil Team 2020-03-10 09:28:06 -07:00 committed by Derek Mauro
parent d936052d32
commit a877af1f29
68 changed files with 191 additions and 191 deletions

View file

@ -88,7 +88,7 @@ struct FailureSignalHandlerOptions {
bool call_previous_handler = false;
// If non-null, indicates a pointer to a callback function that will be called
// upon failure, with a std::string argument containing failure data. This function
// upon failure, with a string argument containing failure data. This function
// may be used as a hook to write failure data to a secondary location, such
// as a log file. This function may also be called with null data, as a hint
// to flush any buffered data before the program may be terminated. Consider

View file

@ -151,7 +151,7 @@ static const AbbrevPair kSubstitutionList[] = {
// frame, so every byte counts.
typedef struct {
int mangled_idx; // Cursor of mangled name.
int out_cur_idx; // Cursor of output std::string.
int out_cur_idx; // Cursor of output string.
int prev_name_idx; // For constructors/destructors.
signed int prev_name_length : 16; // For constructors/destructors.
signed int nest_level : 15; // For nested names.
@ -172,8 +172,8 @@ static_assert(sizeof(ParseState) == 4 * sizeof(int),
// Only one copy of this exists for each call to Demangle, so the size of this
// struct is nearly inconsequential.
typedef struct {
const char *mangled_begin; // Beginning of input std::string.
char *out; // Beginning of output std::string.
const char *mangled_begin; // Beginning of input string.
char *out; // Beginning of output string.
int out_end_idx; // One past last allowed output character.
int recursion_depth; // For stack exhaustion prevention.
int steps; // Cap how much work we'll do, regardless of depth.

View file

@ -25,7 +25,7 @@ TEST(LeakCheckTest, LeakMemory) {
// failed exit code.
char* foo = strdup("lsan should complain about this leaked string");
ABSL_RAW_LOG(INFO, "Should detect leaked std::string %s", foo);
ABSL_RAW_LOG(INFO, "Should detect leaked string %s", foo);
}
TEST(LeakCheckTest, LeakMemoryAfterDisablerScope) {
@ -34,7 +34,7 @@ TEST(LeakCheckTest, LeakMemoryAfterDisablerScope) {
// failed exit code.
{ absl::LeakCheckDisabler disabler; }
char* foo = strdup("lsan should also complain about this leaked string");
ABSL_RAW_LOG(INFO, "Re-enabled leak detection.Should detect leaked std::string %s",
ABSL_RAW_LOG(INFO, "Re-enabled leak detection.Should detect leaked string %s",
foo);
}

View file

@ -30,13 +30,13 @@ TEST(LeakCheckTest, DetectLeakSanitizer) {
TEST(LeakCheckTest, IgnoreLeakSuppressesLeakedMemoryErrors) {
auto foo = absl::IgnoreLeak(new std::string("some ignored leaked string"));
ABSL_RAW_LOG(INFO, "Ignoring leaked std::string %s", foo->c_str());
ABSL_RAW_LOG(INFO, "Ignoring leaked string %s", foo->c_str());
}
TEST(LeakCheckTest, LeakCheckDisablerIgnoresLeak) {
absl::LeakCheckDisabler disabler;
auto foo = new std::string("some std::string leaked while checks are disabled");
ABSL_RAW_LOG(INFO, "Ignoring leaked std::string %s", foo->c_str());
auto foo = new std::string("some string leaked while checks are disabled");
ABSL_RAW_LOG(INFO, "Ignoring leaked string %s", foo->c_str());
}
} // namespace

View file

@ -1402,7 +1402,7 @@ bool RegisterFileMappingHint(const void *start, const void *end, uint64_t offset
if (g_num_file_mapping_hints >= kMaxFileMappingHints) {
ret = false;
} else {
// TODO(ckennelly): Move this into a std::string copy routine.
// TODO(ckennelly): Move this into a string copy routine.
int len = strlen(filename);
char *dst = static_cast<char *>(
base_internal::LowLevelAlloc::AllocWithArena(len + 1, SigSafeArena()));