Skip to content

Commit 48c6f34

Browse files
authored
Merge pull request #4372 from matt-gretton-dann/cpp20-constinit
Add support for Variable.is_constinit()
2 parents f7f0547 + e0ca4da commit 48c6f34

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)