diff --git a/cpp/ql/lib/semmle/code/cpp/Element.qll b/cpp/ql/lib/semmle/code/cpp/Element.qll index 1cf75aa8a842..b30503d2c94c 100644 --- a/cpp/ql/lib/semmle/code/cpp/Element.qll +++ b/cpp/ql/lib/semmle/code/cpp/Element.qll @@ -87,6 +87,7 @@ class ElementBase extends @element { */ class Element extends ElementBase { /** Gets the primary file where this element occurs. */ + pragma[nomagic] File getFile() { result = this.getLocation().getFile() } /**