brintos

brintos / llvm-project-archived public Read only

0
0
Text · 384 B · b568b60 Raw
15 lines · cpp
1// RUN: %clang_cc1 -verify -emit-llvm-only %s2 3namespace test0 {4  template<typename T> unsigned f0() {5    return T::MaxSize; // expected-error {{'int' cannot be used prior to '::'}}6  };7  template<typename T> struct A {8    void Allocate(unsigned Alignment9                    = f0<T>()) // expected-note {{in instantiation}}10    {}11  };12  void f1(A<int> x) { x.Allocate(); }13  14}15