mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
C++: Remove test that is no longer relevant
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
__builtin_foobar(i)i
|
|
||||||
__builtin_malloc(i,i,i,f*)f
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
| file://:0:0:0:0 | __builtin_add_overflow | true | 0 | file://:0:0:0:0 | bool |
|
|
||||||
| file://:0:0:0:0 | __builtin_foobar | true | 1 | file://:0:0:0:0 | int |
|
|
||||||
| file://:0:0:0:0 | __builtin_malloc | true | 4 | file://:0:0:0:0 | float |
|
|
||||||
| test.c:1:6:1:6 | f | false | 3 | file://:0:0:0:0 | long |
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import cpp
|
|
||||||
|
|
||||||
from Function f, boolean isBuiltin
|
|
||||||
where if f instanceof BuiltInFunction then isBuiltin = true else isBuiltin = false
|
|
||||||
select f, isBuiltin, f.getNumberOfParameters(), f.getType()
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
long f(int a, int b, int c) {
|
|
||||||
// A builtin from the builtin_functions_file.
|
|
||||||
int i1 = __builtin_foobar(a);
|
|
||||||
|
|
||||||
// A builtin that's not in the file, but the extractor should handle, given the
|
|
||||||
// --gnu_version flag we pass in.
|
|
||||||
int i2;
|
|
||||||
__builtin_add_overflow(a, b, &i2);
|
|
||||||
|
|
||||||
// A builtin that would normally be defined by the extractor with a type
|
|
||||||
// expecting it to be called like this:
|
|
||||||
//void* x = __builtin_malloc(a);
|
|
||||||
// But we override the type in the builtin_functions_file so it's called like
|
|
||||||
// this:
|
|
||||||
float f1, f2;
|
|
||||||
f1 = __builtin_malloc(a, b, c, &f2);
|
|
||||||
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
// semmle-extractor-options: --gnu_version 50100 --edg --builtin_functions_file --edg ${testdir}/builtins.txt
|
|
||||||
Reference in New Issue
Block a user