- Oct 12, 2009
-
-
Anders Carlsson authored
llvm-svn: 83888
-
Anders Carlsson authored
llvm-svn: 83886
-
Anders Carlsson authored
llvm-svn: 83883
-
Anders Carlsson authored
llvm-svn: 83882
-
Anders Carlsson authored
Factor out devirtualization checking into a separate function and make it handle references correctly. llvm-svn: 83880
-
Fariborz Jahanian authored
user-defined type conversions, issue list of ambiguites in addition to the diagnostic. So, clang now issues the following: b.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C1' int i = c1->*pmf; ~~^ b.cpp:19:19: note: because of ambiguity in conversion of 'struct C1' to 'struct E *' b.cpp:5:5: note: candidate function operator E*(); ^ b.cpp:11:5: note: candidate function operator E*(); ^ llvm-svn: 83862
-
Anders Carlsson authored
llvm-svn: 83816
-
- Oct 11, 2009
-
-
Sebastian Redl authored
llvm-svn: 83766
-
Sebastian Redl authored
Along the way, use RequireCompleteType when testing exception spec types. Separate all the ugly spec stuff into its own file. llvm-svn: 83764
-
- Oct 10, 2009
-
-
Fariborz Jahanian authored
variable inside the block. llvm-svn: 83729
-
Sebastian Redl authored
Implement the core checking for compatible exception specifications in assignment and initialization. The exception specification of the assignee must be the same or a subset of the target. In addition, exception specifications on arguments and return types must be equivalent, but this is not implemented yet. This currently produces two diagnostics for every invalid assignment/initialization, due to the diagnostic produced outside PerformImplicitConversion, e.g. in CheckSingleInitializer. I don't know how to suppress this; in any case I think it is the wrong place for a diagnostic, since there are other diagnostics produced inside the function. So I'm leaving it as it is for the moment. llvm-svn: 83710
-
John McCall authored
Split the various ambiguous result enumerators into their own enum. Tests for most of C++ [namespace.qual]. llvm-svn: 83700
-
Anders Carlsson authored
llvm-svn: 83694
-
Anders Carlsson authored
llvm-svn: 83693
-
Anders Carlsson authored
Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For struct B; B f(); void g() { f(); } We now get t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B' f(); ^~~ t.cpp:3:3: note: 'f' declared here B f(); ^ t.cpp:1:8: note: forward declaration of 'struct B' struct B; ^ llvm-svn: 83692
-
- Oct 09, 2009
-
-
John McCall authored
pass a LookupResult reference to lookup routines. Call out uses which assume a single result. llvm-svn: 83674
-
Douglas Gregor authored
injected-class-name (e.g., when we're referring to other specializations of the current class template). Make sure that we see the template rather than the injected-class-name. Fixes PR4768. llvm-svn: 83672
-
Fariborz Jahanian authored
Now we produce things like: bug1.cpp:21:11: error: use of overloaded operator '->*' is ambiguous int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \ ~^ ~~~ bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int const struct A::*') bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int restrict struct A::*') ... Still need to look at an issue (indicated as FIXME in the test case). llvm-svn: 83650
-
Steve Naroff authored
- Fixup SortCodeCompleteResult() to properly sort keywords on Mac OS (compare was system dependent). Worked on Linux, failed on Mac OS (which caused the recently added testcase to fail on Linux). - Sort results in testcase. llvm-svn: 83597
-
Mike Stump authored
Patch by John Thompson. llvm-svn: 83593
-
Douglas Gregor authored
llvm-svn: 83588
-
Mike Stump authored
llvm-svn: 83586
-
Mike Stump authored
llvm-svn: 83584
-
Fariborz Jahanian authored
because of missing default constructor of a member. Fixes pr5154. llvm-svn: 83583
-
- Oct 08, 2009
-
-
Mike Stump authored
of a floating point number. This add regular expressions to account for this. Patch by John Thompson. llvm-svn: 83581
-
Steve Naroff authored
llvm-svn: 83579
-
Mike Stump authored
llvm-svn: 83578
-
Douglas Gregor authored
llvm-svn: 83577
-
Fariborz Jahanian authored
llvm-svn: 83562
-
Anders Carlsson authored
If a global initializer has a non-trivial constructor or destructor, we never want to defer generation of it, even if it is declared static. With this change we're finally able to compile and run the (infamous) #include <string> #include <iostream> int main(int argc, char **argv) { std::cout << "Hello, World" << std::endl; } $ clang hello.cpp -lstdc++ -o hello $ ./hello Hello, World llvm-svn: 83559
-
Anders Carlsson authored
llvm-svn: 83558
-
Anders Carlsson authored
llvm-svn: 83557
-
Douglas Gregor authored
Also, eliminate a redundant diagnostic by marking a variable declared with incomplete type as an invalid declaration. llvm-svn: 83553
-
Douglas Gregor authored
function and member function templates that are not definitions. Add more tests to ensure that explicit specializations of member function templates prevent instantiation. llvm-svn: 83550
-
Douglas Gregor authored
llvm-svn: 83548
-
Douglas Gregor authored
templates, and keep track of how those member classes were instantiated or specialized. Make sure that we don't try to instantiate an explicitly-specialized member class of a class template, when that explicit specialization was a declaration rather than a definition. llvm-svn: 83547
-
Douglas Gregor authored
track of the kind of specialization or instantiation. Also, check the scope of the specialization and ensure that a specialization declaration without an initializer is not a definition. llvm-svn: 83533
-
Douglas Gregor authored
template instantiation of a member function of a class template. FIXME -= 2; llvm-svn: 83520
-
Douglas Gregor authored
specialization kind is TSK_ImplicitInstantiation. Previously, we would end up implicitly instantiating functions that had explicit specialization declarations or explicit instantiation declarations (with no corresponding definitions). llvm-svn: 83511
-
Douglas Gregor authored
function of a class template was implicitly instantiated, explicitly instantiated (declaration or definition), or explicitly specialized. The same MemberSpecializationInfo structure will be used for static data members and member classes as well. llvm-svn: 83509
-