summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Index/USRGeneration.cpp5
-rw-r--r--clang/test/Index/usrs-cxx0x.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp
index 88e6d3bf8ac..a41da8ae3e4 100644
--- a/clang/lib/Index/USRGeneration.cpp
+++ b/clang/lib/Index/USRGeneration.cpp
@@ -643,6 +643,11 @@ void USRGenerator::VisitType(QualType T) {
T = PT->getPointeeType();
continue;
}
+ if (const RValueReferenceType *RT = T->getAs<RValueReferenceType>()) {
+ Out << "&&";
+ T = RT->getPointeeType();
+ continue;
+ }
if (const ReferenceType *RT = T->getAs<ReferenceType>()) {
Out << '&';
T = RT->getPointeeType();
diff --git a/clang/test/Index/usrs-cxx0x.cpp b/clang/test/Index/usrs-cxx0x.cpp
index 822fed0cd28..6f28ebc5629 100644
--- a/clang/test/Index/usrs-cxx0x.cpp
+++ b/clang/test/Index/usrs-cxx0x.cpp
@@ -6,6 +6,7 @@ void f(tuple<int, float, double>);
class TestCls {
void meth() &;
void meth() &&;
+ void meth(int&&);
};
// RUN: c-index-test -test-load-source-usrs all -std=c++11 %s | FileCheck %s
@@ -14,3 +15,4 @@ class TestCls {
// CHECK: usrs-cxx0x.cpp c:@C@TestCls@F@meth#& Extent=[7:3 - 7:16]
// CHECK: usrs-cxx0x.cpp c:@C@TestCls@F@meth#&& Extent=[8:3 - 8:17]
+// CHECK: usrs-cxx0x.cpp c:@C@TestCls@F@meth#&&I# Extent=[9:3 - 9:19]
OpenPOWER on IntegriCloud