summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
Commit message (Collapse)AuthorAge
...
* For struct initialization, check compatibility with the unqualified Eli Friedman2008-06-09
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52113 91177308-0d34-0410-b5e6-96231b3b80d8
* Count the number of initializable members correctly in structs/unions Eli Friedman2008-05-25
| | | | | | | | with unnamed members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51557 91177308-0d34-0410-b5e6-96231b3b80d8
* Diagnose implicit init list for empty aggregate, like struct {}. Fixes Eli Friedman2008-05-25
| | | | | | | | PR2151 (by not creating the empty implicit init list). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51556 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the error checking for variable-sized objects so we don't Eli Friedman2008-05-25
| | | | | | | | double-report errors; fixes PR2362. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51555 91177308-0d34-0410-b5e6-96231b3b80d8
* Be a bit more defensive in SemaInit.Eli Friedman2008-05-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51301 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust warning so that it doesn't fire when there is an error.Eli Friedman2008-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51269 91177308-0d34-0410-b5e6-96231b3b80d8
* Add errors for some illegal constructs (specifically, "int a = {{3}};" Eli Friedman2008-05-19
| | | | | | | | and "int a = {};"). I'll adjust the tests in a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51265 91177308-0d34-0410-b5e6-96231b3b80d8
* Some more SemaInit cleanup.Eli Friedman2008-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51262 91177308-0d34-0410-b5e6-96231b3b80d8
* Various fixes; solves (almost) all of the test regressions that would be Eli Friedman2008-05-19
| | | | | | | | caused by enabling SemaInit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51261 91177308-0d34-0410-b5e6-96231b3b80d8
* Several fixes to SemaInit.cpp. It's still not enabled (since it fails a few ↵Steve Naroff2008-05-06
| | | | | | tests). Expect to enable it very soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50688 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace Sema::CheckInitializerListTypes() with a helper class ↵Steve Naroff2008-05-01
(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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50544 91177308-0d34-0410-b5e6-96231b3b80d8