<div dir="ltr">You might want to factor out TOOLING_COMPILE_ASSERT in ASTMatchersInternal.h</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 8:10 PM, Argyrios Kyrtzidis <span dir="ltr"><<a href="mailto:akyrtzi@gmail.com" target="_blank">akyrtzi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: akirtzidis<br>
Date: Thu Mar 21 22:10:51 2013<br>
New Revision: 177699<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=177699&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=177699&view=rev</a><br>
Log:<br>
Introduce LLVM_STATIC_ASSERT macro, which expands to C/C++'s static_assert on compilers which support it.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/Support/Compiler.h<br>
<br>
Modified: llvm/trunk/include/llvm/Support/Compiler.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=177699&r1=177698&r2=177699&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=177699&r1=177698&r2=177699&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/Support/Compiler.h (original)<br>
+++ llvm/trunk/include/llvm/Support/Compiler.h Thu Mar 21 22:10:51 2013<br>
@@ -351,4 +351,14 @@<br>
 #define LLVM_EXPLICIT<br>
 #endif<br>
<br>
+/// \macro LLVM_STATIC_ASSERT<br>
+/// \brief Expands to C/C++'s static_assert on compilers which support it.<br>
+#if __has_feature(cxx_static_assert)<br>
+# define LLVM_STATIC_ASSERT(expr, msg) static_assert(expr, msg)<br>
+#elif __has_feature(c_static_assert)<br>
+# define LLVM_STATIC_ASSERT(expr, msg) _Static_assert(expr, msg)<br>
+#else<br>
+# define LLVM_STATIC_ASSERT(expr, msg)<br>
+#endif<br>
+<br>
 #endif<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>