aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-12-03 02:04:01 +0000
committerTed Kremenek <kremenek@apple.com>2009-12-03 02:04:01 +0000
commit87774fd486607f1d8d74701f1df6f000d6f5f73a (patch)
tree36230a9c7c166019a01bc1f6a08419b7feb094ed
parentbdd8e38385f2d2accd4b0acf98a280525990cb6c (diff)
Add section on what language features __has_feature() supports for querying if they are enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90388 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/LanguageExtensions.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/LanguageExtensions.html b/docs/LanguageExtensions.html
index 1c892fd23a..a8707f3f82 100644
--- a/docs/LanguageExtensions.html
+++ b/docs/LanguageExtensions.html
@@ -23,6 +23,7 @@ td {
<li><a href="#has_include">Include File Checking Macros</a></li>
<li><a href="#builtinmacros">Builtin Macros</a></li>
<li><a href="#vectors">Vectors and Extended Vectors</a></li>
+<li><a href="#checking_language_features">Checks for Standard Language Features</a></li>
<li><a href="#blocks">Blocks</a></li>
<li><a href="#overloading-in-c">Function Overloading in C</a></li>
<li><a href="#builtins">Builtin Functions</a>
@@ -194,6 +195,23 @@ href="#__builtin_shufflevector">__builtin_shufflevector</a>.</p>
<p>Query for this feature with __has_feature(attribute_ext_vector_type).</p>
<!-- ======================================================================= -->
+<h2 id="checking_language_features">Checks for Standard Language Features</h2>
+<!-- ======================================================================= -->
+
+<p>The <tt>__has_feature</tt> macro can be used to query if certain standard language features are
+enabled. Those features are listed here.</p>
+
+<h3>C++ exceptions</h3>
+
+Use <tt>__has_feature(cxx_exceptions)</tt> to determine if C++ exceptions have been enabled. For
+example, compiling code with <tt>-fexceptions</tt> enables C++ exceptions.
+
+<h3>C++ RTTI</h3>
+
+Use <tt>__has_feature(cxx_rtt)</tt> to determine if C++ RTTI has been enabled. For example,
+compiling code with <tt>-fno-rtti</tt> disables the use of RTTI.
+
+<!-- ======================================================================= -->
<h2 id="blocks">Blocks</h2>
<!-- ======================================================================= -->