1/*
2Copyright Rene Rivera 2008-2015
3Distributed under the Boost Software License, Version 1.0.
4(See accompanying file LICENSE_1_0.txt or copy at
5http://www.boost.org/LICENSE_1_0.txt)
6*/
7
8#ifndef BOOST_PREDEF_COMPILER_CLANG_H
9#define BOOST_PREDEF_COMPILER_CLANG_H
10
11#include <boost/predef/version_number.h>
12#include <boost/predef/make.h>
13
14/* tag::reference[]
15= `BOOST_COMP_CLANG`
16
17http://en.wikipedia.org/wiki/Clang[Clang] compiler.
18Version number available as major, minor, and patch.
19
20[options="header"]
21|===
22| {predef_symbol} | {predef_version}
23
24| `+__clang__+` | {predef_detection}
25
26| `+__clang_major__+`, `+__clang_minor__+`, `+__clang_patchlevel__+` | V.R.P
27|===
28*/ // end::reference[]
29
30#define BOOST_COMP_CLANG BOOST_VERSION_NUMBER_NOT_AVAILABLE
31
32#if defined(__clang__)
33# define BOOST_COMP_CLANG_DETECTION BOOST_VERSION_NUMBER(__clang_major__,__clang_minor__,__clang_patchlevel__)
34#endif
35
36#ifdef BOOST_COMP_CLANG_DETECTION
37# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
38# define BOOST_COMP_CLANG_EMULATED BOOST_COMP_CLANG_DETECTION
39# else
40# undef BOOST_COMP_CLANG
41# define BOOST_COMP_CLANG BOOST_COMP_CLANG_DETECTION
42# endif
43# define BOOST_COMP_CLANG_AVAILABLE
44# include <boost/predef/detail/comp_detected.h>
45#endif
46
47#define BOOST_COMP_CLANG_NAME "Clang"
48
49#endif
50
51#include <boost/predef/detail/test.h>
52BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG,BOOST_COMP_CLANG_NAME)
53
54#ifdef BOOST_COMP_CLANG_EMULATED
55#include <boost/predef/detail/test.h>
56BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG_EMULATED,BOOST_COMP_CLANG_NAME)
57#endif
58

source code of include/boost/predef/compiler/clang.h