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 {
1212}
1313
1414/**
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.
1818 */
1919class LibcAssert extends MacroInvocation , Assertion {
20- LibcAssert ( ) { this .getMacro ( ) .getHead ( ) = "assert(expr)" }
20+ LibcAssert ( ) { this .getMacro ( ) .getHead ( ) . matches ( "assert(%" ) }
2121
2222 override Expr getAsserted ( ) {
2323 exists ( ConditionalExpr ce | this .getAGeneratedElement ( ) = ce | result = ce .getCondition ( ) )
You can’t perform that action at this time.
0 commit comments