summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schlick <schlick@lavabit.com>2011-04-26 15:19:04 +0200
committerRusty Russell <rusty@rustcorp.com.au>2011-04-27 15:12:57 +0930
commit9aa2e32a540e26d68be9b4c1dbca6a42ef0787c1 (patch)
treeb9cca41b3359000a9e24eed8dcdcc3f049724e62
parented7aec77da970556c0281e2c7573bf00d1390ff1 (diff)
ccanlint: Add more C++ keywords.
-rw-r--r--tools/ccanlint/tests/avoids_cpp_reserved.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/tools/ccanlint/tests/avoids_cpp_reserved.c b/tools/ccanlint/tests/avoids_cpp_reserved.c
index a1663ad5..68d4ad60 100644
--- a/tools/ccanlint/tests/avoids_cpp_reserved.c
+++ b/tools/ccanlint/tests/avoids_cpp_reserved.c
@@ -54,15 +54,37 @@ static void check_headers_no_cpp(struct manifest *m,
err(1, "Creating temporary file %s", tmpsrc);
contents = talloc_asprintf(tmpsrc,
+ "#define alignas #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
"#define class #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
- "#define private #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define constexpr #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define const_cast #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define decltype #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define delete #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define dynamic_cast #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define explicit #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define false #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define friend #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define mutable #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define namespace #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define new #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define nullptr #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define operator #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
"#define public #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define private #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
"#define protected #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define reinterpret_cast #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define static_assert #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define static_cast #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
"#define template #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
"#define this #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
- "#define new #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
- "#define delete #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
- "#define friend #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define thread_local #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define throw #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define true #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define try #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define typeid #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define typename #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define using #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
+ "#define virtual #DONT_USE_CPLUSPLUS_RESERVED_NAMES\n"
"#include <ccan/%s/%s.h>\n",
m->basename, m->basename);
if (write(fd, contents, strlen(contents)) != strlen(contents))