]> granicus.if.org Git - clang/commit
[Sema] Prevent using member declaration diagnostic if the base class is invalid.
authorEric Fiselier <eric@efcs.ca>
Mon, 10 Oct 2016 14:26:40 +0000 (14:26 +0000)
committerEric Fiselier <eric@efcs.ca>
Mon, 10 Oct 2016 14:26:40 +0000 (14:26 +0000)
commit46257d7ee4fb768cae24e781beaa4afbc225be32
treec75efb9f9a96a94ea832e352ee3ae6964ab5f448
parent61a39e4b5bf70f40db70d51f71948a66e567c559
[Sema] Prevent using member declaration diagnostic if the base class is invalid.

Summary:
Once a base class has been made invalid (by a static_assert for example) all using-member declarations in the derived classes will result in a "not a base class" diagnostic. This diagnostic is very misleading and should not be emitted.

This change is needed to help libc++ produce reasonable diagnostics in `std::optional` and `std::variant`.

Reviewers: rsmith, majnemer, aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25430

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283755 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/using-decl-templates.cpp