When using "Create implementation" on a function in a header file, VAX will fail to correctly scope return arguments whenever a macro is also used (e.g. for attributes).
The following code reproduces the problem:
Place the following into a header file:
#define LPP_NO_DISCARD [[no_discard]]
namespace Outer
{
enum class Nested
{
Test
};
[[no_discard]] Nested Works(void);
LPP_NO_DISCARD Nested Fails(void);
}
Using "Create implementation" on both Works and Fails yields the following in the .cpp file:
Outer::Nested Outer::Works(void)
{
}
LPP_NO_DISCARD Nested Outer::Fails(void)
{
}
Notice how with Works(), the return type Nested is properly scoped (Outer::Nested), whereas with Fails(), the return type is missing the scope operator Outer::.