From 7f825c12eb55ef5ed19bed88aa16b860693c3bce Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 21 Mar 2022 10:52:10 +0000 Subject: [PATCH 1/2] C++: Make getUnderlyingType 'nomagic'. --- cpp/ql/lib/semmle/code/cpp/Type.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/lib/semmle/code/cpp/Type.qll b/cpp/ql/lib/semmle/code/cpp/Type.qll index e5fbd02d420..f6f5b3f2e30 100644 --- a/cpp/ql/lib/semmle/code/cpp/Type.qll +++ b/cpp/ql/lib/semmle/code/cpp/Type.qll @@ -94,7 +94,7 @@ class Type extends Locatable, @type { * The result of this predicate will be the type itself, except in the case of a TypedefType or a Decltype, * in which case the result will be type which results from (possibly recursively) resolving typedefs. */ - Type getUnderlyingType() { result = this } + pragma[nomagic] Type getUnderlyingType() { result = this } /** * Gets this type after specifiers have been deeply stripped and typedefs have been resolved. From 5d5904d6c8f1789e303c8f2ca382c516905dea26 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 22 Mar 2022 10:55:04 +0000 Subject: [PATCH 2/2] C++: Autoformat. --- cpp/ql/lib/semmle/code/cpp/Type.qll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/ql/lib/semmle/code/cpp/Type.qll b/cpp/ql/lib/semmle/code/cpp/Type.qll index f6f5b3f2e30..7e8cebe3c16 100644 --- a/cpp/ql/lib/semmle/code/cpp/Type.qll +++ b/cpp/ql/lib/semmle/code/cpp/Type.qll @@ -94,7 +94,8 @@ class Type extends Locatable, @type { * The result of this predicate will be the type itself, except in the case of a TypedefType or a Decltype, * in which case the result will be type which results from (possibly recursively) resolving typedefs. */ - pragma[nomagic] Type getUnderlyingType() { result = this } + pragma[nomagic] + Type getUnderlyingType() { result = this } /** * Gets this type after specifiers have been deeply stripped and typedefs have been resolved.