File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
cpp/ql/src/semmle/code/cpp/internal Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 11private import cpp
2- private import semmle.code.cpp.dataflow.EscapesTree
32
43predicate addressConstantExpression ( Expr e ) {
54 constantAddressPointer ( e )
@@ -14,10 +13,7 @@ predicate addressConstantExpression(Expr e) {
1413/** Holds if `v` is a constexpr variable initialized to a constant address. */
1514private predicate addressConstantVariable ( Variable v ) {
1615 addressConstantExpression ( v .getInitializer ( ) .getExpr ( ) .getFullyConverted ( ) ) and
17- // Here we should also require that `v` is constexpr, but we don't have that
18- // information in the db. See CPP-314. Instead, we require that the variable
19- // is never defined except in its initializer.
20- forall ( Expr def | definition ( v , def ) | def = any ( Initializer init ) .getExpr ( ) )
16+ v .isConstexpr ( )
2117}
2218
2319/**
You can’t perform that action at this time.
0 commit comments