Richard Smith c32d261e27 Don't diagnose a redeclaration of a deduction guide if the prior
declaration is not visible.

In passing, add a test for a similar case of conflicting redeclarations
of internal-linkage structured bindings. (This case already works).
2020-06-12 10:29:01 -07:00

16 lines
481 B
C++

// RUN: rm -rf %t
// RUN: %clang_cc1 -x c++ -std=c++1z -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/cxx17 %s -verify -fno-modules-error-recovery
// expected-no-diagnostics
struct MergeExceptionSpec {
~MergeExceptionSpec();
} mergeExceptionSpec; // trigger evaluation of exception spec
#include "decls.h"
MergeExceptionSpec mergeExceptionSpec2;
template<typename T> struct DeductionGuide {};
DeductionGuide() -> DeductionGuide<int>;
DeductionGuide a;