Skip to content
Snippets Groups Projects
Commit d3aa6c52 authored by Dmitri Gribenko's avatar Dmitri Gribenko
Browse files

Force C89 for c-index-test.c

MSVC supports only C89, so it is important to keep c-index-test.c
buildable with C89.  However, Clang defaults to C99, so while building
Clang with Clang one can introduce C99 constructs into c-index-test.c
without noticing.

Thanks to Nakamura Takumi for helping with MSVC bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167561 91177308-0d34-0410-b5e6-96231b3b80d8
parent da05df7a
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,13 @@ add_clang_executable(c-index-test ...@@ -7,6 +7,13 @@ add_clang_executable(c-index-test
c-index-test.c c-index-test.c
) )
if(NOT MSVC)
set_property(
SOURCE c-index-test.c
PROPERTY COMPILE_FLAGS "-std=c89"
)
endif()
target_link_libraries(c-index-test target_link_libraries(c-index-test
libclang libclang
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment