Hide macro replacement
This commit is contained in:
parent
4e06906876
commit
38dd1c9d18
3 changed files with 11 additions and 2 deletions
|
|
@ -147,7 +147,6 @@ struct foo{
|
|||
}
|
||||
SECTION("exclude")
|
||||
{
|
||||
// exclude all entities starting with `e`
|
||||
class exclude_generator : public test_generator
|
||||
{
|
||||
public:
|
||||
|
|
@ -157,7 +156,12 @@ struct foo{
|
|||
generation_options do_get_options(const cpp_entity& e) override
|
||||
{
|
||||
if (e.name().front() == 'e')
|
||||
// exclude all entities starting with `e`
|
||||
// add declaration flag to detect check for equality
|
||||
return code_generator::exclude | code_generator::declaration;
|
||||
else if (e.name() == "FOO")
|
||||
// don't show macro replacement
|
||||
return code_generator::declaration;
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
|
@ -167,6 +171,8 @@ void e();
|
|||
|
||||
void func(int a, int e, int c);
|
||||
|
||||
#define FOO hidden
|
||||
|
||||
template <typename e1, typename e2>
|
||||
void tfunc(int a);
|
||||
|
||||
|
|
@ -196,6 +202,8 @@ private:
|
|||
|
||||
auto synopsis = R"(void func(int a,int c);
|
||||
|
||||
#define FOO
|
||||
|
||||
void tfunc(int a);
|
||||
|
||||
struct base{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue