diff --git a/clang/docs/LanguageExtensions.html b/clang/docs/LanguageExtensions.html index 40145a473963..9da30b9c0d91 100644 --- a/clang/docs/LanguageExtensions.html +++ b/clang/docs/LanguageExtensions.html @@ -767,7 +767,11 @@ enabled.

Use __has_feature(cxx_decltype) or __has_extension(cxx_decltype) to determine if support for the -decltype() specifier is enabled.

+decltype() specifier is enabled. C++11's decltype +does not require type-completeness of a function call expression. +Use __has_feature(cxx_decltype_incomplete_return_types) +or __has_extension(cxx_decltype_incomplete_return_types) +to determine if support for this feature is enabled.

C++11 default template arguments in function templates

diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 295e9d05a629..fe7058570efa 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -649,6 +649,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) { .Case("cxx_auto_type", LangOpts.CPlusPlus0x) .Case("cxx_constexpr", LangOpts.CPlusPlus0x) .Case("cxx_decltype", LangOpts.CPlusPlus0x) + .Case("cxx_decltype_incomplete_return_types", LangOpts.CPlusPlus0x) .Case("cxx_default_function_template_args", LangOpts.CPlusPlus0x) .Case("cxx_defaulted_functions", LangOpts.CPlusPlus0x) .Case("cxx_delegating_constructors", LangOpts.CPlusPlus0x) diff --git a/clang/test/Lexer/has_feature_cxx0x.cpp b/clang/test/Lexer/has_feature_cxx0x.cpp index 30e150bcb64d..8e0222dcecd5 100644 --- a/clang/test/Lexer/has_feature_cxx0x.cpp +++ b/clang/test/Lexer/has_feature_cxx0x.cpp @@ -40,6 +40,16 @@ int no_decltype(); // CHECK-NO-0X: no_decltype +#if __has_feature(cxx_decltype_incomplete_return_types) +int has_decltype_incomplete_return_types(); +#else +int no_decltype_incomplete_return_types(); +#endif + +// CHECK-0X: has_decltype_incomplete_return_types +// CHECK-NO-0X: no_decltype_incomplete_return_types + + #if __has_feature(cxx_auto_type) int has_auto_type(); #else diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 8305b73ec652..439044af7684 100644 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -119,6 +119,11 @@ with clang; other versions have not been tested.

N2343 Clang 2.9 + +     Incomplete return types + N3276 + SVN + Right angle brackets N1757