Write a CodeQL query that finds coroutine methods that take parameters by reference, where those parameters are used after any co_await suspension point.
import cpp
// https://godbolt.org/z/xnd359j99 | |
#include <optional> | |
#include <mutex> | |
#include <functional> | |
template<typename T> struct default_lazy_init { | |
T operator()() const { | |
return T{}; | |
} |
// ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
#include <map> | |
#include <chrono> | |
#include <unordered_map> | |
#include <array> | |
#include <string> | |
#include <functional> |
#include <winrt/base.h> | |
/* Assume this type: | |
runtimeclass Foo { | |
String Name; | |
UInt32 Id { get; }; | |
Foo[] GetMoreFoos(); | |
} |
import os | |
import sys | |
import subprocess | |
import urllib.request | |
import argparse | |
from pathlib import Path | |
wasdk = { | |
"name": "Microsoft.WindowsAppSDK", | |
"version": "1.7.250127003-experimental3", |