mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
C++: add hasGlobalOrStdName to Declaration
This commit is contained in:
@@ -119,6 +119,11 @@ abstract class Declaration extends Locatable, @declaration {
|
||||
/** Holds if this declaration has the given name in the global namespace. */
|
||||
predicate hasGlobalName(string name) { this.hasQualifiedName("", "", name) }
|
||||
|
||||
/** Holds if this declaration has the given name in the global namespace or the `std` namespace. */
|
||||
predicate hasGlobalOrStdName(string name) {
|
||||
this.hasQualifiedName("std", "", name)
|
||||
}
|
||||
|
||||
/** Gets a specifier of this declaration. */
|
||||
abstract Specifier getASpecifier();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user