|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| | llvm-svn: 59165 | 
| | 
| 
| 
| | llvm-svn: 55615 | 
| | 
| 
| 
| 
| 
| | I'll try to come up with a correct fix for the testcase sometime soon.
llvm-svn: 55614 | 
| | 
| 
| 
| | llvm-svn: 55609 | 
| | 
| 
| 
| | llvm-svn: 55607 | 
| | 
| 
| 
| 
| 
| | extension).
llvm-svn: 54946 | 
| | 
| 
| 
| 
| 
| | a bit more clear (rdar://5646070)
llvm-svn: 54606 | 
| | 
| 
| 
| 
| 
| | with unnamed members.
llvm-svn: 51557 | 
| | 
| 
| 
| 
| 
| | PR2151 (by not creating the empty implicit init list).
llvm-svn: 51556 | 
| | 
| 
| 
| 
| 
| | double-report errors; fixes PR2362.
llvm-svn: 51555 | 
| | 
| 
| 
| 
| 
| | it a few days to make sure there aren't any significant regressions.
llvm-svn: 51273 | 
| | 
| 
| 
| | llvm-svn: 49068 | 
| | 
| 
| 
| 
| 
| 
| 
| | is an array type not a pointer type.  This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.
llvm-svn: 46941 | 
| | 
| 
| 
| 
| 
| 
| | Test case included from bz1948 (thanks Neil!).
Also fixed an 80 column violation...
llvm-svn: 46430 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers.
This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-)
Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-)
llvm-svn: 46339 | 
| | 
| 
| 
| | llvm-svn: 46234 | 
| | 
| 
| 
| 
| 
| | from pointer->int.
llvm-svn: 45591 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | it from several places.  This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.
Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.
llvm-svn: 45589 | 
| | 
| 
| 
| 
| 
| | Adapted from a patch by Anders Carlsson.
llvm-svn: 44816 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | unsigned char asso_values[] = { 34 };
int legal2() { 
  return asso_values[0]; 
}
The code that creates the new constant array type was operating on the original type.
As a result, the constant type being generated was "unsigned char [1][]" (which is wrong).
The fix is to operate on the element type - in this case, the correct type is "unsigned char [1]"
I added this case to array-init.c, which clearly didn't catch this bogosity...
llvm-svn: 43112 | 
| | 
| 
| 
| 
| 
| 
| | rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only
llvm-svn: 42852 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | using "-parse-ast -verify".
Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.
Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.
llvm-svn: 42365 | 
| | 
| 
| 
| 
| 
| | diagnostic for illegal initializers.
llvm-svn: 41889 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | - Fixed many bugs, enhanced test case considerably, added a diagnostic, etc.
- Refactored CheckInitList() into CheckVariableInitList()/CheckConstantInitList().
- Added CheckInitExpr().
- Support for multi-dimensional arrays looking good.
llvm-svn: 41690 | 
| | 
| 
| 
| 
| 
| 
| 
| | Array scalar initialization is now is reasonable shape.
Next step, structure and array of structure initializers.
llvm-svn: 41681 | 
| | 
| 
| 
| 
| 
| 
| 
| | - Added Expr::isConstantExpr().
- Added type checking for InitListExpr elements.
- Added diagnostic for trying to initialize a variable sized object.
llvm-svn: 41674 | 
| | 
| 
| 
| 
| 
| | Added 2 errors and one warning, updated test case.
llvm-svn: 41672 | 
|  | 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 |