C++: Add namespace_inline

This commit is contained in:
Ian Lynagh
2019-01-09 14:47:27 +00:00
parent 6f827140d7
commit 7a0ed57916
2 changed files with 9 additions and 0 deletions

View File

@@ -66,6 +66,11 @@ class Namespace extends NameQualifyingElement, @namespace {
/** Gets a child namespace of this namespace. */
Namespace getAChildNamespace() { namespacembrs(underlyingElement(this),unresolveElement(result)) }
/** Holds if the namespace is inline. */
predicate isInline() {
namespace_inline(underlyingElement(this))
}
/** Holds if this namespace may be from source. */
override predicate fromSource() { this.getADeclaration().fromSource() }

View File

@@ -1039,6 +1039,10 @@ namespaces(
string name: string ref
);
namespace_inline(
unique int id: @namespace ref
);
namespacembrs(
int parentid: @namespace ref,
unique int memberid: @namespacembr ref