summaryrefslogtreecommitdiffstats
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
commit51540f9377f6b4cbb97fd31ff8d030c1ba70c18e (patch)
treec3f00e0dec7204761271c373cf8f844481ae9301
parentc38b40a709696c09a8d3fc7d0415aca465d4ce13 (diff)
downloadbcm5719-llvm-51540f9377f6b4cbb97fd31ff8d030c1ba70c18e.tar.gz
bcm5719-llvm-51540f9377f6b4cbb97fd31ff8d030c1ba70c18e.zip
Add section on what language features __has_feature() supports for querying if they are enabled.
llvm-svn: 90388
-rw-r--r--clang/docs/LanguageExtensions.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/docs/LanguageExtensions.html b/clang/docs/LanguageExtensions.html
index 1c892fd23a5..a8707f3f82d 100644
--- a/clang/docs/LanguageExtensions.html
+++ b/clang/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>
<!-- ======================================================================= -->
OpenPOWER on IntegriCloud