[PATCH] D63708: [clangd] Fix NestedNameSpecifierLoc in SelectionTree
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 05:05:56 PDT 2019
sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D63708
Files:
clangd/Selection.cpp
clangd/unittests/SelectionTests.cpp
Index: clangd/unittests/SelectionTests.cpp
===================================================================
--- clangd/unittests/SelectionTests.cpp
+++ clangd/unittests/SelectionTests.cpp
@@ -90,6 +90,13 @@
const char *CommonAncestorKind;
};
Case Cases[] = {
+ {
+ R"cpp(
+ template <typename T>
+ int x = [[T::^U::]]ccc();
+ )cpp",
+ "NestedNameSpecifierLoc",
+ },
{
R"cpp(
struct AAA { struct BBB { static int ccc(); };};
@@ -184,8 +191,7 @@
template <[[template<class> class /*cursor here*/^U]]>
struct Foo<U<int>*> {};
)cpp",
- "TemplateTemplateParmDecl"
- },
+ "TemplateTemplateParmDecl"},
};
for (const Case &C : Cases) {
Annotations Test(C.Code);
Index: clangd/Selection.cpp
===================================================================
--- clangd/Selection.cpp
+++ clangd/Selection.cpp
@@ -61,7 +61,7 @@
bool TraverseTypeLoc(TypeLoc X) {
return traverseNode(&X, [&] { return Base::TraverseTypeLoc(X); });
}
- bool TraverseTypeNestedNameSpecifierLoc(NestedNameSpecifierLoc X) {
+ bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc X) {
return traverseNode(
&X, [&] { return Base::TraverseNestedNameSpecifierLoc(X); });
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63708.206192.patch
Type: text/x-patch
Size: 1348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190624/de9fa2cd/attachment.bin>
More information about the cfe-commits
mailing list