summaryrefslogtreecommitdiffstats
path: root/test/cc-msvc.c
Commit message (Collapse)AuthorAgeFilesLines
* Detect: Add __STDCPP_DEFAULT_NEW_ALIGNMENT__ predefined VS macroBrad King2018-08-061-1/+9
| | | | | | | | | | | This macro is missing from the main MSVC predefined macro list but is documented by [1] and [2]. Also add `__STDCPP_STRICT_POINTER_SAFETY__` as documented by [2] in case MSVC ever starts defining it. [1] https://docs.microsoft.com/en-us/cpp/build/reference/zc-alignednew [2] https://en.cppreference.com/w/cpp/preprocessor/replace Fixes: #125
* RunClang: Detect -std=c++17 from --castxml-cc-msvcBrad King2017-12-051-0/+8
| | | | | | | Updates to VS 2015 and VS 2017 added support for `-std:` flags specifying the language standard level for MSVC. The level is reported in the `_MSVC_LANG` preprocessor definition instead of `__cplusplus`. Detect MSVC standard C++ level from `_MSVC_LANG`.
* RunClang: Detect C and C++ std level from --castxml-cc-<id>Brad King2015-09-181-1/+6
| | | | | | | | If no -std= option is explicitly given then parse the __cplusplus or __STDC_VERSION__ preprocessor definition from the compiler output and add the corresponding -std= flag. For MSVC we need to map _MSC_VER to -std= ourselves because the compiler does not define __cplusplus to standard values and each version hard-codes its C++ standard level.
* castxml: Allow --castxml-cc-<id> to detect C language settingsBrad King2015-09-181-1/+10
| | | | | | If the "<id>" is "gnu-c" or "msvc-c" then run the given compiler command line on a C source file instead of C++. This allows C language settings of the given compiler to be detected.
* test: Use more realistic macros in --castxml-cc-<id> casesBrad King2015-09-181-2/+3
| | | | | Define some of the compiler-identifying macros actually defined by GNU and MSVC compilers.
* test: Add cases covering --castxml-cc-<id> target triple detectionBrad King2015-05-281-1/+8
| | | | | Add test cases for the changes in commit 3c777ef360 (Detect: Improve target triple selection, 2015-04-16).
* Detect: Drop detected predefined macros starting in '__has'Brad King2015-02-041-0/+4
| | | | | These macros are builtin to Clang so we should not try to use any such definitions detected from the compiler.
* test: Add cases for --castxml-cc-(gnu|msvc) detectionBrad King2014-04-161-0/+10
Create dummy gnu-like and msvc-like compiler binaries. Use them with the --castxml-cc-<id> options to verify that the preprocessor definitions and include directories are detected as expected.