CodeQL library for C/C++
codeql/cpp-all 2.1.1 (changelog, source)
Search

Member predicate Type::hasSpecifier

Holds if this declaration has a specifier called name, recursively looking through typedef and decltype. For example, in the context of typedef const int *restrict t, the type volatile t has specifiers volatile and restrict but not const since the const is attached to the type being pointed to rather than the pointer itself.

predicate hasSpecifier(string name)