mirror of
https://github.com/github/codeql.git
synced 2026-01-31 15:22:57 +01:00
18 lines
415 B
C++
18 lines
415 B
C++
#include <fstream>
|
|
#include <iomanip>
|
|
#include <stdlib.h>
|
|
|
|
#include <swift/Basic/LLVMInitialize.h>
|
|
|
|
int main(int argc, char** argv) {
|
|
PROGRAM_START(argc, argv);
|
|
if (auto trapDir = getenv("CODEQL_EXTRACTOR_SWIFT_TRAP_DIR")) {
|
|
std::string file = trapDir;
|
|
file += "/my_first.trap";
|
|
if (std::ofstream out{file}) {
|
|
out << "answer_to_life_the_universe_and_everything(42)\n";
|
|
}
|
|
}
|
|
return 0;
|
|
}
|