Files
rocm-systems/tests/hipify-clang/unit_tests/headers/headers_test_11.cu
T
Evgeny Mankov 25075729f9 [HIPIFY][fix][#211] Taking into account include guard controlling macro
...while including HIP main header file, which is inserted now after #indef controlling macro, or after #pragma once, if it's occurred earlier.

+ Add a couple of unit tests.
ToDo: Check backward compatibility on older clang versions.
2019-08-02 16:46:45 +03:00

15 lines
460 B
Plaintext

// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
// Checks that HIP header file is included after include guard controlling macro,
// which goes before #pragma once.
// CHECK: #ifndef HEADERS_TEST_10_H
// CHECK-NEXT: #include <hip/hip_runtime.h>
#ifndef HEADERS_TEST_10_H
// CHECK: #pragma once
#pragma once
// CHECK-NOT: #include <hip/hip_runtime.h>
#define HEADERS_TEST_10_H
#include <stdio.h>
static int counter = 0;
#endif // HEADERS_TEST_10_H