Based on the current discussion in https://llvm.org/PR45307, it seems
that it's legitimate for `temp_directory_path()` to return a path with
a trailing slash. Since `p.parent_path()` will never contain a trailing
slash, comparing it to the result of `temp_directory_path()` will fail
depending on whether `temp_directory_path()` returns a trailing slash
or not.
static inline fs::path random_path() {
fs::path tmp = fs::temp_directory_path();
fs::path p = fs::path(tmp) / unique_path_suffix();
- assert(p.parent_path() == tmp);
return p;
}