Files
clang-p2996/compiler-rt/test/msan/Linux/strerror_r.cpp
Fangrui Song d21b3d346a compiler-rt: Rename .cc file in test/msan to .cpp
Like r367463, but for test/msan.

llvm-svn: 367653
2019-08-02 06:07:05 +00:00

19 lines
330 B
C++

// RUN: %clang_msan -O0 -g %s -o %t && %run %t
#include <assert.h>
#include <errno.h>
#include <string.h>
int main() {
char buf[1000];
char *res = strerror_r(EINVAL, buf, sizeof(buf));
assert(res);
volatile int z = strlen(res);
res = strerror_r(-1, buf, sizeof(buf));
assert(res);
z = strlen(res);
return 0;
}