HomePhabricator

[Sema][MSVC] Fix bogus microsoft-pure-definition warning on member function of…

Description

[Sema][MSVC] Fix bogus microsoft-pure-definition warning on member function of class template

Clang emits a warning when using a pure specifier =0 in a function definition
at class scope (a MS-specific construct), when using -fms-extensions.
However, to detect this, it was using FD->isCanonicalDecl() on function
declaration, which was also detecting out-of-class definition of member
functions of class templates. Fix this by using !FD->isOutOfLine() instead.

Fixes PR21334.

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

Reviewed By: riccibruno

Reviewers: rnk, riccibruno

Patch By: Rudy Pons

Details

Committed
brunoricciApr 21 2019, 6:12 AM
Reviewer
riccibruno
Differential Revision
D29707: Fix improper microsoft-pure-definition warning on template class
Parents
rL358848: @skipIfLinux flaky lldb-mi tests
Branches
Unknown
Tags
Unknown