Files
clang-p2996/compiler-rt/test/msan/Linux/tcgetattr.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

22 lines
363 B
C++

// RUN: %clangxx_msan -O0 %s -o %t && %run %t %p
#include <assert.h>
#include <glob.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
int fd = getpt();
assert(fd >= 0);
struct termios t;
int res = tcgetattr(fd, &t);
assert(!res);
if (t.c_iflag == 0)
exit(0);
return 0;
}