Skip to content

Commit 7807804

Browse files
authored
Merge pull request #20573 from MathiasVP/fix-bad-magic-on-get-file
C++: Fix bad magic on `Element.getFile`
2 parents 218c2a5 + bc0b876 commit 7807804

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/ql/lib/semmle/code/cpp/Element.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class ElementBase extends @element {
8787
*/
8888
class Element extends ElementBase {
8989
/** Gets the primary file where this element occurs. */
90+
pragma[nomagic]
9091
File getFile() { result = this.getLocation().getFile() }
9192

9293
/**

0 commit comments

Comments
 (0)