Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Frontend / noderef_templates.cpp
blob5fde6efd87c7fb8d381ed8da6a6f997a2d8bc87b
1 // RUN: %clang_cc1 -verify %s
3 #define NODEREF __attribute__((noderef))
5 template <typename T>
6 int func(T NODEREF *a) { // expected-note 2 {{a declared here}}
7 return *a + 1; // expected-warning 2 {{dereferencing a; was declared with a 'noderef' type}}
10 void func() {
11 float NODEREF *f;
12 int NODEREF *i;
13 func(f); // expected-note{{in instantiation of function template specialization 'func<float>' requested here}}
14 func(i); // expected-note{{in instantiation of function template specialization 'func<int>' requested here}}