diff options
author | Brad King <brad.king@kitware.com> | 2019-04-11 11:40:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-11 12:40:42 (GMT) |
commit | 035d0b998925fbcf9a7abf00ca8778d45ee02f09 (patch) | |
tree | e836719928656ccfa45ff7089844771c88202cb9 /test/input | |
parent | 3ae91acdf018cb8f6e69a825fd165180d673e7b1 (diff) | |
download | CastXML-035d0b998925fbcf9a7abf00ca8778d45ee02f09.zip CastXML-035d0b998925fbcf9a7abf00ca8778d45ee02f09.tar.gz CastXML-035d0b998925fbcf9a7abf00ca8778d45ee02f09.tar.bz2 |
RunClang: Improve predefined macros identifying castxml
Provide `__castxml_{major,minor,patch}__`. Re-purpose `__castxml__` to
be for comparison with a `__castxml_check()` helper. Leave the actual
encoding of the components unspecified. Ensure the integer version
value of the encoding is larger than the only value of `1000` that
`__castxml__` had previously.
Diffstat (limited to 'test/input')
-rw-r--r-- | test/input/predefined.c | 1 | ||||
-rw-r--r-- | test/input/predefined.cxx | 1 | ||||
-rw-r--r-- | test/input/predefined.h | 30 |
3 files changed, 32 insertions, 0 deletions
diff --git a/test/input/predefined.c b/test/input/predefined.c new file mode 100644 index 0000000..318482f --- /dev/null +++ b/test/input/predefined.c @@ -0,0 +1 @@ +#include "predefined.h" diff --git a/test/input/predefined.cxx b/test/input/predefined.cxx new file mode 100644 index 0000000..318482f --- /dev/null +++ b/test/input/predefined.cxx @@ -0,0 +1 @@ +#include "predefined.h" diff --git a/test/input/predefined.h b/test/input/predefined.h new file mode 100644 index 0000000..10a3bdf --- /dev/null +++ b/test/input/predefined.h @@ -0,0 +1,30 @@ +#ifndef __castxml_major__ +# error "__castxml_major__ not defined" +#endif +#ifndef __castxml_minor__ +# error "__castxml_minor__ not defined" +#endif +#ifndef __castxml_patch__ +# error "__castxml_patch__ not defined" +#endif +#ifndef __castxml__ +# error "__castxml__ not defined" +#endif +#ifndef __castxml_check +# error "__castxml_check not defined" +#endif +#if __castxml__ < __castxml_check(0, 1, 0) +# error "__castxml__ < __castxml_check(0, 1, 0)" +#endif +#if __castxml__ < __castxml_check(0, 0, 20000000) +# error "__castxml__ < __castxml_check(0, 0, 20000000)" +#endif +#ifndef __castxml_clang_major__ +# error "__castxml_clang_major__ not defined" +#endif +#ifndef __castxml_clang_minor__ +# error "__castxml_clang_minor__ not defined" +#endif +#ifndef __castxml_clang_patchlevel__ +# error "__castxml_clang_patchlevel__ not defined" +#endif |