mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
C++: Initial telemetry queries and tests
This commit is contained in:
17
cpp/ql/test/library-tests/extraction_errors/test.cpp
Normal file
17
cpp/ql/test/library-tests/extraction_errors/test.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
// semmle-extractor-options: --expect_errors
|
||||
|
||||
#include "test.h"
|
||||
|
||||
void function_with_errors() {
|
||||
auto x = no_such_function();
|
||||
x+2;
|
||||
no_such_function();
|
||||
ADD(x+1, nsf2());
|
||||
f(1);
|
||||
f();
|
||||
}
|
||||
|
||||
uint32_t fn2() {
|
||||
this is a syntax error;
|
||||
so_is_this(;
|
||||
}
|
||||
Reference in New Issue
Block a user