File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
cpp/ql/src/semmle/code/cpp/commons Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ abstract class Assertion extends Locatable {
12
12
}
13
13
14
14
/**
15
- * A libc assert, as defined in assert.h. A macro with the head
16
- * "assert(expr)" that expands to a conditional expression which
17
- * may terminate the program.
15
+ * A libc assert, as defined in assert.h. A macro with a head
16
+ * that matches the prefix "assert(", and expands to a conditional
17
+ * expression which may terminate the program.
18
18
*/
19
19
class LibcAssert extends MacroInvocation , Assertion {
20
- LibcAssert ( ) { this .getMacro ( ) .getHead ( ) = "assert(expr)" }
20
+ LibcAssert ( ) { this .getMacro ( ) .getHead ( ) . matches ( "assert(%" ) }
21
21
22
22
override Expr getAsserted ( ) {
23
23
exists ( ConditionalExpr ce | this .getAGeneratedElement ( ) = ce | result = ce .getCondition ( ) )
You can’t perform that action at this time.
0 commit comments