updated C/C++ keywords (#2926)

This commit is contained in:
Oliver Stöneberg 2020-11-29 15:01:29 +01:00 committed by GitHub
parent 873aa075b4
commit 3eaa76e832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -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<std::string> c_keywords = { C_KEYWORDS };
const std::set<std::string> c_keywords = { C_KEYWORDS, "restrict" };
const std::set<std::string> 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",