[PATCH] D63708: [clangd] Fix NestedNameSpecifierLoc in SelectionTree
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 25 02:44:03 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL364284: [clangd] Fix NestedNameSpecifierLoc in SelectionTree (authored by sammccall, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D63708?vs=206192&id=206395#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63708/new/
https://reviews.llvm.org/D63708
Files:
clang-tools-extra/trunk/clangd/Selection.cpp
clang-tools-extra/trunk/clangd/unittests/SelectionTests.cpp
Index: clang-tools-extra/trunk/clangd/Selection.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/Selection.cpp
+++ clang-tools-extra/trunk/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); });
}
Index: clang-tools-extra/trunk/clangd/unittests/SelectionTests.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/unittests/SelectionTests.cpp
+++ clang-tools-extra/trunk/clangd/unittests/SelectionTests.cpp
@@ -92,6 +92,13 @@
Case Cases[] = {
{
R"cpp(
+ template <typename T>
+ int x = [[T::^U::]]ccc();
+ )cpp",
+ "NestedNameSpecifierLoc",
+ },
+ {
+ R"cpp(
struct AAA { struct BBB { static int ccc(); };};
int x = AAA::[[B^B^B]]::ccc();
)cpp",
@@ -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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63708.206395.patch
Type: text/x-patch
Size: 1511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190625/fa4be1a5/attachment.bin>
More information about the cfe-commits
mailing list