summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constructor.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-24 00:01:03 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-24 00:01:03 +0000
commit583540360c39e5512edefb667d9e7f3da91d8720 (patch)
tree94fa0ff5032daa72302885df09a0154b094bdd63 /clang/test/SemaCXX/constructor.cpp
parentee573fcefc55ca4c672d2991145ada28ee584651 (diff)
downloadbcm5719-llvm-583540360c39e5512edefb667d9e7f3da91d8720.tar.gz
bcm5719-llvm-583540360c39e5512edefb667d9e7f3da91d8720.zip
Correct the order in which we cope with end-of-class-definition
semantics and improve our handling of default arguments. Specifically, we follow this order: - As soon as the see the '}' in the class definition, the class is complete and we add any implicit declarations (default constructor, copy constructor, etc.) to the class. - If there are any default function arguments, parse them - If there were any inline member function definitions, parse them As part of this change, we now keep track of the the fact that we've seen unparsed default function arguments within the AST. See the new ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly cope with calls inside default function arguments to other functions where we're making use of the default arguments. Made some C++ error messages regarding failed initializations more specific. llvm-svn: 61406
Diffstat (limited to 'clang/test/SemaCXX/constructor.cpp')
-rw-r--r--clang/test/SemaCXX/constructor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/constructor.cpp b/clang/test/SemaCXX/constructor.cpp
index 536593d5120..68099ecac96 100644
--- a/clang/test/SemaCXX/constructor.cpp
+++ b/clang/test/SemaCXX/constructor.cpp
@@ -1,5 +1,4 @@
// RUN: clang -fsyntax-only -verify %s
-
typedef int INT;
class Foo {
@@ -37,3 +36,7 @@ struct y {
y(int);
};
extern y b;
+
+struct Length {
+ Length l() const { return *this; }
+};
OpenPOWER on IntegriCloud