llvm-capstone/clang/test/SemaTemplate/instantiate-expr-6.cpp
Richard Smith 42fd9efa38 Revert r107690 (for PR7417) and add a testcase that it breaks. The approach of
that change turns out to not be reasonable: mutating the AST of a parsed
template during instantiation is not a sound thing to do, does not work across
chained PCH / modules builds, and is in any case a special-case workaround to a
more general problem that should be solved centrally.

llvm-svn: 249342
2015-10-05 20:05:21 +00:00

13 lines
229 B
C++

// RUN: %clang_cc1 -std=c++11 -emit-llvm-only %s
struct X {
template<typename T> static typename T::type g(T t);
template<typename T> auto f(T t) -> decltype(g(t));
void f(...);
};
void test() {
X().f(0);
X().f(0);
}