summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-rename/TemplateFunctionFindByDeclaration.cpp
blob: 24343f09e77753f25511eee3b8f781f32e626704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: clang-rename -offset=93 -new-name=bar %s -- | FileCheck %s

template <typename T>
T foo(T value) {    // CHECK: T bar(T value) {
  return value;
}

int main() {
  foo<bool>(false); // CHECK: bar<bool>(false);
  foo<int>(0);      // CHECK: bar<int>(0);
  return 0;
}

// Use grep -FUbo 'foo' <file> to get the correct offset of foo when changing
// this file.
OpenPOWER on IntegriCloud