diff --git a/clang/docs/LanguageExtensions.html b/clang/docs/LanguageExtensions.html
index 06b01db76096..b2b3f3cde678 100644
--- a/clang/docs/LanguageExtensions.html
+++ b/clang/docs/LanguageExtensions.html
@@ -39,6 +39,7 @@ td {
C++0x lambdas
C++0x nullptr
C++0x rvalue references
+ C++0x reference-qualified functions
C++0x static_assert()
C++0x type inference
C++0x variadic templates
@@ -423,11 +424,13 @@ lambdas is enabled. clang does not currently implement this feature.
nullptr is enabled. clang does not yet fully implement this
feature.
+C++0x reference-qualified functions
+Use __has_feature(cxx_reference_qualified_functions) to determine if support for reference-qualified functions (e.g., member functions with &
or &&
applied to *this
) is enabled.
+
C++0x rvalue references
Use __has_feature(cxx_rvalue_references) to determine if support for
-rvalue references is enabled. clang does not yet fully implement this
-feature.
+rvalue references is enabled.
C++0x static_assert()
@@ -438,7 +441,8 @@ compile-time assertions using static_assert is enabled.
Use __has_feature(cxx_auto_type) to determine C++0x type inference
is supported using the auto specifier. If this is disabled,
-auto will instead be a storage class specifier, as in C or C++98.
+auto will instead be a storage class specifier, as in C or C++98.
+Clang does not currently implement this feature.
C++0x variadic templates
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index 47a35bd153c2..7727eafd73fe 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -556,6 +556,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("cxx_inline_namespaces", LangOpts.CPlusPlus0x)
//.Case("cxx_lambdas", false)
//.Case("cxx_nullptr", false)
+ .Case("cxx_reference_qualified_functions", LangOpts.CPlusPlus0x)
.Case("cxx_rvalue_references", LangOpts.CPlusPlus0x)
.Case("cxx_strong_enums", LangOpts.CPlusPlus0x)
.Case("cxx_static_assert", LangOpts.CPlusPlus0x)
diff --git a/clang/test/Lexer/has_feature_cxx0x.cpp b/clang/test/Lexer/has_feature_cxx0x.cpp
index 46de7122109b..2944ae374c54 100644
--- a/clang/test/Lexer/has_feature_cxx0x.cpp
+++ b/clang/test/Lexer/has_feature_cxx0x.cpp
@@ -99,3 +99,13 @@ int no_inline_namespaces();
// CHECK-0X: has_inline_namespaces
// CHECK-NO-0X: no_inline_namespaces
+
+#if __has_feature(cxx_reference_qualified_functions)
+int has_reference_qualified_functions();
+#else
+int no_reference_qualified_functions();
+#endif
+
+// CHECK-0X: has_reference_qualified_functions
+// CHECK-NO-0X: no_reference_qualified_functions
+