Skip to content
  1. Aug 31, 2007
    • Chris Lattner's avatar
    • Steve Naroff's avatar
      Sema::ParseCastExpr() missing call to UsualUnaryConversions(). · 43b8f7fa
      Steve Naroff authored
      The following case now works...
      
      void empty(void * a ) {}
      
      void test()
      {
          unsigned char A[4]; 
          empty( (void *) A); 
      }
      
      Thanks to Patrick Flannery for finding this...
      
      llvm-svn: 41630
      43b8f7fa
    • Steve Naroff's avatar
      · d57fa941
      Steve Naroff authored
      Final phase of array cleanup (for now), removing a FIXME from yesterday.
      
      Moved several array constraints checks from Sema::VerifyConstantArrayType() to
      Sema::GetTypeForDeclarator(). VerifyConstantArrayType() is now very simple, and
      could be removed eventually.
      
      Now, we get the following (correct) messages for BlockVarDecls:-)
      
      [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang x.c -pedantic
      x.c:4:20: error: size of array has non-integer type 'float'
        int size_not_int[f];
                         ^
      x.c:5:21: error: array size is negative
        int negative_size[1-2];
                          ^~~
      x.c:6:17: warning: zero size arrays are an extension
        int zero_size[0];
                      ^
      3 diagnostics generated.
      
      llvm-svn: 41624
      d57fa941
  2. Aug 30, 2007
  3. Aug 29, 2007
Loading