File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
cpp/ql/lib/semmle/code/cpp/exprs Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,19 @@ class Expr extends StmtParent, @expr {
152152 else result = this .getValue ( )
153153 }
154154
155- /** Holds if this expression has a value that can be determined at compile time. */
155+ /**
156+ * Holds if this expression has a value that can be determined at compile time.
157+ *
158+ * An expression has a value that can be determined at compile time when:
159+ * - it is a compile-time constant, e.g., a literal value or the result of a constexpr
160+ * compile-time constant;
161+ * - it is an address of a (member) function, an address of a constexpr variable
162+ * initialized to a constant address, or an address of an lvalue, or any of the
163+ * previous with a constant value added to or subtracted from the address;
164+ * - it is a reference to a (member) function, a reference to a constexpr variable
165+ * initialized to a constant address, or a reference to an lvalue;
166+ * - it is a non-template parameter of a uninstantiated template.
167+ */
156168 cached
157169 predicate isConstant ( ) {
158170 valuebind ( _, underlyingElement ( this ) )
You can’t perform that action at this time.
0 commit comments