diff options
author | Steve Naroff <snaroff@apple.com> | 2007-09-02 02:04:30 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-09-02 02:04:30 +0000 |
commit | 2fea13926f47a07b33dfd0dc8adf28151af9a938 (patch) | |
tree | 1e50762fc5ece93a60ce7bdc12d099c156d844a4 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 42a350a18af3f06edf4408c74a5e0d30264c6826 (diff) | |
download | llvm-2fea13926f47a07b33dfd0dc8adf28151af9a938.zip llvm-2fea13926f47a07b33dfd0dc8adf28151af9a938.tar.gz llvm-2fea13926f47a07b33dfd0dc8adf28151af9a938.tar.bz2 |
Start implementing semantic analysis for C initializers.
Step 1: Start instantiating InitListExpr's.
Step 2: Call newly added function Sema::CheckInitializer() from Sema::ParseDeclarator().
Step 3: Give InitListExpr's a preliminary type.
Step 4: Start emitting diagnostics for simple assignments.
Note:
As a result of step 1, the CodeGen/mandel.c test asserts "Unimplemented agg expr!", which is expected.
As a result of step 4, the test below now fails. This isn't expected and needs to be investigated (it appears type checking for C++ references is flawed in some way).
******************** TEST 'Sema/cxx-references.cpp' FAILED! ********************
Command:
clang -fsyntax-only Sema/cxx-references.cpp
Output:
Sema/cxx-references.cpp:8:12: warning: incompatible pointer types assigning 'int &*' to 'int *'
int *p = &r;
^~
Sema/cxx-references.cpp:10:20: error: incompatible types assigning 'int (int)' to 'int (&)(int)'
int (&rg)(int) = g;
^
Sema/cxx-references.cpp:13:18: error: incompatible types assigning 'int [3]' to 'int (&)[3]'
int (&ra)[3] = a;
^
Sema/cxx-references.cpp:16:14: error: incompatible types assigning 'int *' to 'int *&'
int *& P = Q;
^
4 diagnostics generated.
******************** TEST 'Sema/cxx-references.cpp' FAILED! ********************
llvm-svn: 41671
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions