mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
40 lines
798 B
C#
40 lines
798 B
C#
namespace My.Qltest
|
|
{
|
|
public class B
|
|
{
|
|
void Foo()
|
|
{
|
|
object arg1 = new object();
|
|
Sink1(arg1);
|
|
|
|
object argToTagged = new object();
|
|
TaggedSinkMethod(argToTagged);
|
|
|
|
object fieldWrite = new object();
|
|
TaggedField = fieldWrite;
|
|
}
|
|
|
|
object SinkMethod()
|
|
{
|
|
object res = new object();
|
|
return res;
|
|
}
|
|
|
|
[SinkAttribute]
|
|
object TaggedSinkMethod()
|
|
{
|
|
object resTag = new object();
|
|
return resTag;
|
|
}
|
|
|
|
void Sink1(object x) { }
|
|
|
|
[SinkAttribute]
|
|
void TaggedSinkMethod(object x) { }
|
|
|
|
[SinkAttribute]
|
|
object TaggedField;
|
|
}
|
|
|
|
class SinkAttribute : System.Attribute { }
|
|
} |