[all-commits] [llvm/llvm-project] 293a24: Merging r372178:

Reid Kleckner via All-commits all-commits at lists.llvm.org
Mon Nov 25 09:06:30 PST 2019


  Branch: refs/heads/release/9.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 293a245241d3ecadd5dea85e3f5760b2f10c3e9f
      https://github.com/llvm/llvm-project/commit/293a245241d3ecadd5dea85e3f5760b2f10c3e9f
  Author: Reid Kleckner <rnk at google.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/SemaCXX/ms-exception-spec.cpp

  Log Message:
  -----------
  Merging r372178:

------------------------------------------------------------------------
r372178 | rnk | 2019-09-17 13:29:10 -0700 (Tue, 17 Sep 2019) | 15 lines

Ignore exception specifier mismatch when merging redeclarations

Exception specifiers are now part of the function type in C++17.
Normally, it is illegal to redeclare the same function or specialize a
template with a different exception specifier, but under
-fms-compatibility, we accept it with a warning. Without this change,
the function types would not match due to the exception specifier, and
clang would claim that the types were "incompatible". Now we emit the
warning and merge the redeclaration as we would in C++14 and earlier.

Fixes PR42842, which is about compiling _com_ptr_t in C++17.

Based on a patch by Alex Fusco <alexfusco at google.com>!

Differential Revision: https://reviews.llvm.org/D67590
------------------------------------------------------------------------




More information about the All-commits mailing list