Skip to content

Commit e0ca4da

Browse files
author
Matthew Gretton-Dann
committed
Add support for Variable.is_constinit()
1 parent 060c19a commit e0ca4da

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cpp/ql/src/semmle/code/cpp/Variable.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ class Variable extends Declaration, @variable {
144144
*/
145145
predicate isConstexpr() { this.hasSpecifier("is_constexpr") }
146146

147+
/**
148+
* Holds if this variable is declared `constinit`.
149+
*/
150+
predicate isConstinit() { this.hasSpecifier("declared_constinit") }
151+
147152
/**
148153
* Holds if this variable is `thread_local`.
149154
*/

0 commit comments

Comments
 (0)