summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Parse/ParseDecl.cpp4
-rw-r--r--clang/test/SemaCXX/decltype.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 2d3fcf83403..9af7345fdd6 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -3018,6 +3018,10 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) {
case tok::kw___attribute:
return true;
+ // C++0x decltype.
+ case tok::kw_decltype:
+ return true;
+
// GNU ObjC bizarre protocol extension: <proto1,proto2> with implicit 'id'.
case tok::less:
return getLang().ObjC1;
diff --git a/clang/test/SemaCXX/decltype.cpp b/clang/test/SemaCXX/decltype.cpp
index d4ef7e33a1d..f61a92b71e1 100644
--- a/clang/test/SemaCXX/decltype.cpp
+++ b/clang/test/SemaCXX/decltype.cpp
@@ -16,3 +16,8 @@ void test_f2() {
float &fr = f2(AC().a);
}
+namespace pr10154 {
+ class A{
+ A(decltype(nullptr) param);
+ };
+} \ No newline at end of file
OpenPOWER on IntegriCloud