Displaying 1 result from an estimated 1 matches for "flag2name".
Did you mean:
flag1name
2019 Aug 01
5
RFC: Strong typedef for LLVM
...LVM has a number of places where function parameter semantics are
unclear at the point of use [2]. To compensate, much code exists
in this style:
foo(arg1, /* SomeFlagName = */true);
Functions with, for example, two boolean parameters are often called
as:
foo(arg1, /* Flag1Name = */true, /* Flag2Name =*/false);
Unfortunately, it is easy to mix this up unintentionally:
foo(arg1, /* Flag1Name = */false, /* Flag2Name =*/true);
The above may or may not be a bug. The intent is unclear from the
context.
Things are even worse without comments:
foo(arg1, true, false); // What does this mean?...