From 3eaa76e832faf432a529419896727daf718fbaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Sun, 29 Nov 2020 15:01:29 +0100 Subject: [PATCH] updated C/C++ keywords (#2926) --- lib/symboldatabase.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index e49a5312a..8b9e62b16 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -5333,17 +5333,18 @@ Function * SymbolDatabase::findFunctionInScope(const Token *func, const Scope *n namespace { #define C_KEYWORDS\ - "_Bool", "auto", "break", "case", "char", "const", "continue", "default", "do",\ - "double", "else", "enum", "extern", "float", "for", "goto", "if", "inline",\ - "int", "long", "register", "restrict", "return", "short", "signed", "sizeof",\ - "static", "struct", "switch", "typedef", "union", "unsigned", "void", "volatile",\ - "while" + "_Alignas", "_Alignof", "_Atomic", "_Bool", "_Complex", "_Generic", "_Imaginary", "_Noreturn", \ + "_Static_assert", "_Thread_local", "auto", "break", "case", "char", "const", "continue", "default", \ + "do", "double", "else", "enum", "extern", "float", "for", "goto", "if", "inline", "int", "long", \ + "register", "return", "short", "signed", "sizeof", "static", "struct", "switch", "typedef", \ + "union", "unsigned", "void", "volatile", "while" - const std::set c_keywords = { C_KEYWORDS }; + const std::set c_keywords = { C_KEYWORDS, "restrict" }; const std::set cpp_keywords = { C_KEYWORDS, - "alignas", "alignof", "and", "and_eq", "asm", "bitand", "bitor", "bool", "catch", "class", "compl", - "concept", "constexpr", "const_cast", "decltype", + "alignas", "alignof", "and", "and_eq", "asm", "bitand", "bitor", "bool", "catch", "char8_t", "char16_t", + "char32_t", "class", "compl", "concept", "consteval", "constexpr", "constinit", "const_cast", "co_await", + "co_return", "co_yield", "decltype", "delete", "dynamic_cast", "explicit", "export", "false", "friend", "mutable", "namespace", "new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq", "private", "protected", "public", "reinterpret_cast",