build: Enable clang-tidy

Change-Id: Idbe531d78281889dd8b38b04d2e322e298f4558d
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0000000..7ecd1b9
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,2 @@
+Checks: 'clang-analyzer-*'
+WarningsAsErrors: 'clang-analyzer-*'
diff --git a/.clang-tidy-ignore b/.clang-tidy-ignore
new file mode 100644
index 0000000..a6b7f49
--- /dev/null
+++ b/.clang-tidy-ignore
@@ -0,0 +1,2 @@
+include/stdplus/str/cexpr.hpp
+test/str/cexpr.cpp
diff --git a/test/meson.build b/test/meson.build
index 8403e0f..8e5a4db 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -14,7 +14,6 @@
   'raw': [stdplus_dep, gmock_dep, gtest_main_dep],
   'signal': [stdplus_dep, gtest_main_dep],
   'str/cat': [stdplus_dep, gtest_main_dep],
-  'str/cexpr': [stdplus_dep, gtest_main_dep],
   'str/maps': [stdplus_dep, gmock_dep, gtest_main_dep],
   'util/cexec': [stdplus_dep, gtest_main_dep],
   'variant': [stdplus_dep, gtest_main_dep],
@@ -22,6 +21,12 @@
   'zstring_view': [stdplus_dep, gtest_main_dep],
 }
 
+if meson.get_compiler('cpp').get_id() != 'clang'
+  gtests += {
+    'str/cexpr': [stdplus_dep, gtest_main_dep],
+  }
+endif
+
 if has_dl
   gtests += {
     'dl': [stdplus_dl_dep, gtest_main_dep],