C++: add hasGlobalOrStdName to Declaration

This commit is contained in:
Robert Marsh
2019-07-11 13:48:51 -07:00
parent 3313af5189
commit 98b97b09be

View File

@@ -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();