зеркало из https://github.com/github/codeql.git
Swift: cache some predicated.
This commit is contained in:
Родитель
a32b08f56a
Коммит
d0f45180ab
|
@ -26,7 +26,7 @@ class MethodDecl extends AbstractFunctionDecl {
|
|||
* Holds if this function is called `funcName` and its a member of a
|
||||
* class, struct, extension, enum or protocol call `typeName`.
|
||||
*/
|
||||
predicate hasQualifiedName(string typeName, string funcName) {
|
||||
cached predicate hasQualifiedName(string typeName, string funcName) {
|
||||
this.getName() = funcName and
|
||||
(
|
||||
exists(NominalTypeDecl c |
|
||||
|
|
|
@ -26,7 +26,7 @@ class TypeDecl extends TypeDeclBase {
|
|||
* The name and full name of `A` is `A`. The name of `B` is `B`, but the
|
||||
* full name of `B` is `A.B`.
|
||||
*/
|
||||
string getFullName() {
|
||||
cached string getFullName() {
|
||||
not this.getEnclosingDecl() instanceof TypeDecl and
|
||||
result = this.getName()
|
||||
or
|
||||
|
|
Загрузка…
Ссылка в новой задаче