summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce support for C++0x explicit conversion operators (N2437)Douglas Gregor2009-01-141-1/+1
| | | | | | | | | | Small cleanup in the handling of user-defined conversions. Also, implement an optimization when constructing a call. We avoid recomputing implicit conversion sequences and instead use those conversion sequences that we computed as part of overload resolution. llvm-svn: 62231
* Revert my previous, failed attempt to pretty-print anonymous struct/union ↵Douglas Gregor2009-01-081-1/+0
| | | | | | accesses well. Added a FIXME so we know to revisit this later llvm-svn: 61951
* Fix printing of member references to avoid displaying implicitly-generated ↵Douglas Gregor2009-01-071-0/+1
| | | | | | member references, e.g., for anonymous struct/unions or implicit 'this' in member functions llvm-svn: 61885
* Address some comments on the name lookup/DeclContext patch from ChrisDouglas Gregor2008-12-111-1/+1
| | | | llvm-svn: 60897
* Unifies the name-lookup mechanisms used in various parts of the ASTDouglas Gregor2008-12-111-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). llvm-svn: 60878
* Change a whole lot of diagnostics to take QualType's directly Chris Lattner2008-11-241-1/+1
| | | | | | | | instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
* remove the last old-fashioned Diag method. Transition complete!Chris Lattner2008-11-201-2/+2
| | | | llvm-svn: 59714
* remove one more old-style Diag method.Chris Lattner2008-11-191-13/+12
| | | | llvm-svn: 59589
* Remember whether an initlist had a designator in the AST.Chris Lattner2008-10-261-1/+2
| | | | llvm-svn: 58218
* Support initialization of incomplete array with zero size (asDaniel Dunbar2008-08-181-10/+9
| | | | | | extension). llvm-svn: 54946
* More #include cleaningDaniel Dunbar2008-08-111-1/+0
| | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
* Minor #include cleaningDaniel Dunbar2008-08-111-0/+1
| | | | | | | - Drop TokenKinds.h from Action.h - Move DeclSpec.h from Sema.h into individual Sema .cpp files llvm-svn: 54625
* InitListChecker::CheckListElementTypes(): Check for function types and issue ↵Steve Naroff2008-08-101-3/+4
| | | | | | an appropriate diagnostic. llvm-svn: 54614
* Make sure to count the struct elements correctly; here, we want the Eli Friedman2008-08-091-1/+2
| | | | | | | | member count. The count returned by numStructUnionElements is the number of initializers that will be consumed, not the number of members to iterate through. Fixes PR2534. llvm-svn: 54601
* Finally fix PR2189. This makes a fairly invasive but important change toChris Lattner2008-08-041-3/+6
| | | | | | | | | | move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), where AT is a typedef for "int[10]" needs to return ArrayType(const int, 10). Fixing this greatly simplifies getArrayDecayedType, which is a good sign. llvm-svn: 54317
* -Changes to TagDecl:Argyrios Kyrtzidis2008-06-091-1/+1
| | | | | | | | | Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. llvm-svn: 52160
* For struct initialization, check compatibility with the unqualified Eli Friedman2008-06-091-1/+3
| | | | | | | | type; this isn't explicitly stated in the standard, but it doesn't really make sense for them to have an effect here. Fixes the included testcase, sent to me by Steve Naroff. llvm-svn: 52113
* Count the number of initializable members correctly in structs/unions Eli Friedman2008-05-251-2/+6
| | | | | | with unnamed members. llvm-svn: 51557
* Diagnose implicit init list for empty aggregate, like struct {}. Fixes Eli Friedman2008-05-251-0/+7
| | | | | | PR2151 (by not creating the empty implicit init list). llvm-svn: 51556
* Move the error checking for variable-sized objects so we don't Eli Friedman2008-05-251-20/+19
| | | | | | double-report errors; fixes PR2362. llvm-svn: 51555
* Be a bit more defensive in SemaInit.Eli Friedman2008-05-201-1/+7
| | | | llvm-svn: 51301
* Adjust warning so that it doesn't fire when there is an error.Eli Friedman2008-05-191-3/+4
| | | | llvm-svn: 51269
* Add errors for some illegal constructs (specifically, "int a = {{3}};" Eli Friedman2008-05-191-10/+14
| | | | | | and "int a = {};"). I'll adjust the tests in a bit. llvm-svn: 51265
* Some more SemaInit cleanup.Eli Friedman2008-05-191-36/+42
| | | | llvm-svn: 51262
* Various fixes; solves (almost) all of the test regressions that would be Eli Friedman2008-05-191-112/+79
| | | | | | caused by enabling SemaInit. llvm-svn: 51261
* Several fixes to SemaInit.cpp. It's still not enabled (since it fails a few ↵Steve Naroff2008-05-061-31/+48
| | | | | | tests). Expect to enable it very soon. llvm-svn: 50688
* Replace Sema::CheckInitializerListTypes() with a helper class ↵Steve Naroff2008-05-011-0/+292
(InitListChecker) that synthesizes implicit InitListExpr's when appropriate (see InitListExpr comments in Expr.h for more details). I also moved the code to SemaInit.cpp, to help reduce clutter in SemaDecl.cpp. NOTE: This work is incomplete and still fails many tests (as a result, it isn't enabled yet). Nevertheless, I wanted to check it in so I can work on it from home. llvm-svn: 50544
OpenPOWER on IntegriCloud