]> granicus.if.org Git - clang/commit
MSVCCompat: Don't produce an invalid AST when accepting void pseudo-dtors
authorReid Kleckner <reid@kleckner.net>
Thu, 1 May 2014 16:50:23 +0000 (16:50 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 1 May 2014 16:50:23 +0000 (16:50 +0000)
commit2271162571bf966110924679d099aabe7b3c12c4
tree89782b873cb1e9558e964d936921fa75f4b45639
parentbfbb72a5880662a18d1ce0d01d1539426e879166
MSVCCompat: Don't produce an invalid AST when accepting void pseudo-dtors

We accept 'void *p; p->~void();' for MSVC compatibility since r148682.
However, we were returning ExprError, rather than producing an AST,
despite only diagnosing it with a warning.  CodeGen noticed that the
template function specialization had an invalid AST, and therefore
didn't generate code for it.  This change makes us produce an AST with a
void pseudo-dtor call.

Part of PR18256.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207771 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprCXX.cpp
test/CodeGenCXX/microsoft-compatibility.cpp [new file with mode: 0644]