We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2ce331 commit ee8db1dCopy full SHA for ee8db1d
c/common/src/codingstandards/c/Expr.qll
@@ -3,8 +3,19 @@ import cpp
3
/* A full expression as defined in ISO/IEC 9899:2011 6.8 point 4 and Annex C point 1 item 5. */
4
class FullExpr extends Expr {
5
FullExpr() {
6
- not this.getParent() instanceof Expr and
7
- not exists(Variable v | v.getInitializer().getExpr() = this)
+ exists(ExprStmt s | this = s.getExpr())
+ or
8
+ exists(Loop l | this = l.getControllingExpr())
9
10
+ exists(ConditionalStmt s | this = s.getControllingExpr())
11
12
+ exists(ForStmt s | this = s.getUpdate())
13
14
+ exists(ReturnStmt s | this = s.getExpr())
15
16
+ this instanceof AggregateLiteral
17
18
+ this = any(Variable v).getInitializer().getExpr()
19
}
20
21
0 commit comments