Commit Graph

13 Commits

Author SHA1 Message Date
Douglas Gregor 8385a06929 Introduce Type::isStructureOrClassType(), which does the obvious
thing. Audit all uses of Type::isStructure(), changing those calls to
isStructureOrClassType() as needed (which is alsmost
everywhere). Fixes the remaining failure in Boost.Utility/Swap.

llvm-svn: 102386
2010-04-26 21:31:17 +00:00
Douglas Gregor 5ab1165531 Improve our handling of user-defined conversions as part of overload
resolution. There are two sources of problems involving user-defined
conversions that this change eliminates, along with providing simpler
interfaces for checking implicit conversions:

  - It eliminates a case of infinite recursion found in Boost.

  - It eliminates the search for the constructor needed to copy a temporary
    generated by an implicit conversion from overload
    resolution. Overload resolution assumes that, if it gets a value
    of the parameter's class type (or a derived class thereof), there
    is a way to copy if... even if there isn't. We now model this
    properly.

llvm-svn: 101680
2010-04-17 22:01:05 +00:00
John McCall 85f9055955 When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.

llvm-svn: 98149
2010-03-10 11:27:22 +00:00
Anders Carlsson 0bd52403d4 Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly.
llvm-svn: 94340
2010-01-24 00:19:41 +00:00
Anders Carlsson 73eb7cd351 Use the new init code for member subobjects.
llvm-svn: 94329
2010-01-23 20:20:40 +00:00
Anders Carlsson 0cf999b663 Switch some array initialization over to the new init code.
llvm-svn: 94327
2010-01-23 20:13:41 +00:00
Anders Carlsson d0849254de Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++.
llvm-svn: 94325
2010-01-23 19:55:29 +00:00
Douglas Gregor dfdda291e0 Add testcase for PR5817, although the bug was already fixed
llvm-svn: 92858
2010-01-06 22:06:13 +00:00
Eli Friedman 463e523ad8 Switch file-scope assignment initialization over to InitializationSequence.
llvm-svn: 91881
2009-12-22 02:10:53 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Sebastian Redl b426f63302 Sema-check virtual declarations. Complete dynamic_cast checking.
llvm-svn: 58804
2008-11-06 15:59:35 +00:00
Douglas Gregor cfd8ddc6de Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists.
llvm-svn: 58757
2008-11-05 16:20:31 +00:00