This is an archive of the discontinued LLVM Phabricator instance.

Fix PR 28885: Fix AST Printer output for inheriting constructor using declarations
ClosedPublic

Authored by arphaman on Sep 30 2016, 2:40 PM.

Details

Summary

This patch ensures that the AST printer outputs the correct C++ type for an inheriting constructor using declaration.

For example, for a using declaration in a code sample like this:

struct A {
	A();
};

struct B : A {
  using A::A;
};

The AST printer will now print "using A::A" instead of "using A::B".

This bug is a regression since r274049.

Diff Detail

Repository
rL LLVM

Event Timeline

arphaman updated this revision to Diff 73145.Sep 30 2016, 2:40 PM
arphaman retitled this revision from to Fix PR 28885: Fix AST Printer output for inheriting constructor using declarations.
arphaman updated this object.
arphaman added a reviewer: rsmith.
arphaman set the repository for this revision to rL LLVM.
arphaman added a subscriber: cfe-commits.
rsmith accepted this revision.Sep 30 2016, 3:38 PM
rsmith edited edge metadata.

Minor comment, otherwise LGTM.

lib/AST/DeclPrinter.cpp
1350–1351

Don't list PR numbers here. Your code and its comments should be sufficient to explain what you're doing and why without this.

This revision is now accepted and ready to land.Sep 30 2016, 3:38 PM

Minor comment, otherwise LGTM.

This makes sense, thanks for pointing it out!
I'll update the comment when I commit.

This revision was automatically updated to reflect the committed changes.