summaryrefslogtreecommitdiffstats
path: root/clang/test/ASTMerge
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2019-10-01 14:08:51 +0000
committerKadir Cetinkaya <kadircet@google.com>2019-10-01 14:08:51 +0000
commitfd019ed54e36179d0b69d93822164ec2e5689e36 (patch)
treeadd4df2268e7c8e4ac3496a9584fd9649b5496f2 /clang/test/ASTMerge
parentb67c3b6cf0f039503d35ad91c1ababebe56e036f (diff)
downloadbcm5719-llvm-fd019ed54e36179d0b69d93822164ec2e5689e36.tar.gz
bcm5719-llvm-fd019ed54e36179d0b69d93822164ec2e5689e36.zip
[clang] Make handling of unnamed template params similar to function params
Summary: Clang uses the location identifier should be inserted for declarator decls when a decl is unnamed. But for type template and template template paramaters it uses the location of "typename/class" keyword, which makes it hard for tooling to insert/change parameter names. This change tries to unify these two cases by making template parameter parsing and sourcerange operations similar to function params/declarator decls. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68143 llvm-svn: 373340
Diffstat (limited to 'clang/test/ASTMerge')
-rw-r--r--clang/test/ASTMerge/class-template/test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/ASTMerge/class-template/test.cpp b/clang/test/ASTMerge/class-template/test.cpp
index 27761f6983a..671064786d7 100644
--- a/clang/test/ASTMerge/class-template/test.cpp
+++ b/clang/test/ASTMerge/class-template/test.cpp
@@ -9,13 +9,13 @@ static_assert(sizeof(X0<int>().getValue(1)) == sizeof(int));
// CHECK: class-template2.cpp:9:15: note: declared here with type 'long'
// CHECK: class-template1.cpp:12:14: warning: template parameter has different kinds in different translation units
-// CHECK: class-template2.cpp:12:10: note: template parameter declared here
+// CHECK: class-template2.cpp:12:18: note: template parameter declared here
// CHECK: class-template1.cpp:18:23: warning: non-type template parameter declared with incompatible types in different translation units ('long' vs. 'int')
// CHECK: class-template2.cpp:18:23: note: declared here with type 'int'
-// CHECK: class-template1.cpp:21:10: warning: template parameter has different kinds in different translation units
-// CHECK: class-template2.cpp:21:10: note: template parameter declared here
+// CHECK: class-template1.cpp:21:18: warning: template parameter has different kinds in different translation units
+// CHECK: class-template2.cpp:21:31: note: template parameter declared here
// CHECK: class-template2.cpp:27:20: warning: external variable 'x0r' declared with incompatible types in different translation units ('X0<double> *' vs. 'X0<float> *')
// CHECK: class-template1.cpp:26:19: note: declared here with type 'X0<float> *'
OpenPOWER on IntegriCloud