2

I am working on a C++ parser using clang compiler front-end with libTooling library.

For the following code from LLVM Clang tests

// It is deleted if the corresponding constructor [...] is deleted.
struct G {
  G(int) = delete; // expected-note {{'G' has been explicitly marked deleted here}}
  template<typename T> G(T*) = delete; // expected-note {{'G<const char>' has been explicitly marked deleted here}}
};
struct H : G {
  using G::G; // expected-note 2{{deleted constructor was inherited here}}
};
H h1(5); // expected-error {{call to deleted constructor of 'H'}}
H h2("foo"); // expected-error {{call to deleted constructor of 'H'}}

AST for the following code is

enter image description here

Please have to look at second ORANGE box, this function is not declared in class H explicitly but it is inherited from the base class and it is referring the same template type highlighted in the RED box.

My problem is, I don't want to visit the inherited function in class H. So how can I skip or ignore the inherited functions?

Thanks, Hemant

Hemant
  • 767
  • 6
  • 20

0 Answers0