From 583540360c39e5512edefb667d9e7f3da91d8720 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 24 Dec 2008 00:01:03 +0000 Subject: 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 --- clang/test/SemaCXX/copy-initialization.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/SemaCXX/copy-initialization.cpp') diff --git a/clang/test/SemaCXX/copy-initialization.cpp b/clang/test/SemaCXX/copy-initialization.cpp index 5ef84de9acd..e380cc1ad3c 100644 --- a/clang/test/SemaCXX/copy-initialization.cpp +++ b/clang/test/SemaCXX/copy-initialization.cpp @@ -13,5 +13,5 @@ void f(Y y, int *ip, float *fp) { X x1 = y; // expected-error{{no matching constructor for initialization of 'x1'; candidate is:}} X x2 = 0; X x3 = ip; - X x4 = fp; // expected-error{{incompatible type initializing 'x4', expected 'class X'}} + X x4 = fp; // expected-error{{cannot initialize 'x4' with an lvalue of type 'float *'}} } -- cgit v1.2.3