Clang emits a warning when using pure specifier =0 in function definition at class scope, which is 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 template class.
This fix it by instead of !FD->isOutOfLine() to detect the places where we must emit the warning.
This will fix https://llvm.org/bugs/show_bug.cgi?id=21334
Details
Details
- Reviewers
rnk riccibruno - Commits
- rC358849: [Sema][MSVC] Fix bogus microsoft-pure-definition warning on member function of…
rGba7ffae0c564: [Sema][MSVC] Fix bogus microsoft-pure-definition warning on member function of…
rL358849: [Sema][MSVC] Fix bogus microsoft-pure-definition warning on member function of…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This looks reasonable to me (although I think that the test should be in SemaCXX/ and not in Parser/, but the test for the non-template case is already in Parser/ so ok).