зеркало из https://github.com/github/codeql.git
Merge pull request #740 from ian-semmle/inline_ns
C++: Add inline namespace support
This commit is contained in:
Коммит
371c09d4e5
|
@ -18,3 +18,5 @@
|
|||
| Resource not released in destructor (`cpp/resource-not-released-in-destructor`) | Fewer false positive results | Fix false positives where a resource is released via a virtual method call. |
|
||||
|
||||
## Changes to QL libraries
|
||||
|
||||
There is a new `Namespace.isInline()` predicate, which holds if the namespace was declared as `inline namespace`.
|
||||
|
|
|
@ -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() }
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче