]> granicus.if.org Git - clang/commit
[Sema][MSVC] Fix bogus microsoft-pure-definition warning on member function of class...
authorBruno Ricci <riccibrun@gmail.com>
Sun, 21 Apr 2019 13:12:10 +0000 (13:12 +0000)
committerBruno Ricci <riccibrun@gmail.com>
Sun, 21 Apr 2019 13:12:10 +0000 (13:12 +0000)
commit4b56b8f9df9d7fe4ee69f56fc4726910a4a72b04
tree2a598f94a279aef1b70666a1273554880934f3eb
parent11cb7ccfe388c08f7f415a6c887e5ef68f118c7e
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358849 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/Parser/MicrosoftExtensions.cpp