Merge pull request #1012 from ian-semmle/constexpr

C++: Add Variable.isConstexpr()
This commit is contained in:
Nick Rolfe
2019-03-01 14:42:35 +00:00
committed by GitHub
5 changed files with 29 additions and 0 deletions

View File

@@ -121,6 +121,13 @@ class Variable extends Declaration, @variable {
result.getLValue() = this.getAnAccess()
}
/**
* Holds if this variable is `constexpr`.
*/
predicate isConstexpr() {
this.hasSpecifier("is_constexpr")
}
/**
* Holds if this variable is constructed from `v` as a result
* of template instantiation. If so, it originates either from a template