Displaying 3 results from an estimated 3 matches for "dodosometh".
2019 Jul 12
3
RFC: changing variable naming rules in LLVM codebase
...the
> doxygen @parameter.
This is a bit of a side note, but in my own work I've more recently
tried to move from this style:
foo.h
int foo(int a, bool doSomething);
foo.cpp
x = foo(a, /*doSomething=*/true);
y = foo(a, /*doSomething=*/false);
to something like:
foo.h
inline constexpr DoDoSomething = true;
inline constexpr DontDoSomething = false;
int foo(int a, bool doSomething);
foo.cpp
x = foo(a, DoDoSomething);
y = foo(a, DontDoSomething);
One doesn't need the inline variable (and thus not C++17) if one uses
macros or enums or something else less elegant.
This kind of thing...
2019 Jul 12
2
RFC: changing variable naming rules in LLVM codebase
...#39;ve more recently
> tried to move from this style:
>
> foo.h
>
> int foo(int a, bool doSomething);
>
> foo.cpp
>
> x = foo(a, /*doSomething=*/true);
> y = foo(a, /*doSomething=*/false);
>
> to something like:
>
> foo.h
>
> inline constexpr DoDoSomething = true;
> inline constexpr DontDoSomething = false;
>
> int foo(int a, bool doSomething);
>
> foo.cpp
>
> x = foo(a, DoDoSomething);
> y = foo(a, DontDoSomething);
>
> One doesn't need the inline variable (and thus not C++17) if one uses
> macros or...
2019 Jul 10
4
RFC: changing variable naming rules in LLVM codebase
Good point, too. I believe I can find lines starting with `@parameter` and
apply the same name conversion rules to identifiers after `@parameter`.
Since lld doesn't use doxygen comments, it is fine for now, but before
moving forward, I'll address that. Thank you for pointing that out.
On Wed, Jul 10, 2019 at 8:20 PM Alex Brachet-Mialot <
alexbrachetmialot at gmail.com> wrote:
>