Skip to content
  1. Feb 16, 2009
  2. Feb 15, 2009
  3. Feb 14, 2009
    • Douglas Gregor's avatar
      Add a test case for -ffreestanding that redefines malloc. · 2563d0fa
      Douglas Gregor authored
      Warn that complex numbers are an extension in a freestanding C99
      implementation.
      
      llvm-svn: 64568
      2563d0fa
    • Mike Stump's avatar
      Add expected note. Surely people test before the check in stuff. · 6bae7a1b
      Mike Stump authored
      llvm-svn: 64565
      6bae7a1b
    • Cedric Venet's avatar
      Add svn:eol-style=native to some files · 08438133
      Cedric Venet authored
      Correct two files with inconsistent lines endings.
      
      llvm-svn: 64564
      08438133
    • Fariborz Jahanian's avatar
      Fixed a problem caused by foreward @class use · 99bed6fd
      Fariborz Jahanian authored
      which consequently caused a Seg fault. during meta-data
      generation. It also addresses an issue related to
      late binding of newly synthesize ivars (when we support it).
      
      llvm-svn: 64563
      99bed6fd
    • Anders Carlsson's avatar
    • Douglas Gregor's avatar
      Add hook to add attributes to function declarations that we know · e711f705
      Douglas Gregor authored
      about, whether they are builtins or not. Use this to add the
      appropriate "format" attribute to NSLog, NSLogv, asprintf, and
      vasprintf, and to translate builtin attributes (from Builtins.def)
      into actual attributes on the function declaration.
      
      Use the "printf" format attribute on function declarations to
      determine whether we should do format string checking, rather than
      looking at an ad hoc list of builtins and "known" function names.
      
      Be a bit more careful about when we consider a function a "builtin" in
      C++.
      
      llvm-svn: 64561
      e711f705
    • Chris Lattner's avatar
      new tests, it would be nice to not warn on the second one. · aff30147
      Chris Lattner authored
      llvm-svn: 64549
      aff30147
    • Chris Lattner's avatar
      add parser and type checking support for attribute((objc_exception)). · 677a3580
      Chris Lattner authored
      We don't have "zero cost" exceptions for ObjC yet, so there is no codegen
      support required.
      
      llvm-svn: 64546
      677a3580
    • Chris Lattner's avatar
      rename test · 9844408a
      Chris Lattner authored
      llvm-svn: 64545
      9844408a
    • Chris Lattner's avatar
      Several related changes: · 237f2757
      Chris Lattner authored
      1) implement parser and sema support for reading and verifying attribute(warnunusedresult).
      2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense
         of its result.
      3) extend isUnusedResultAWarning to directly return the loc and range 
         info that should be reported to the user.  Make it substantially more
         precise in some cases than what was previously reported.
      4) teach isUnusedResultAWarning about CallExpr to decls that are 
         pure/const/warnunusedresult, fixing a fixme.
      5) change warn_attribute_wrong_decl_type to not pass in english strings, instead,
         pass in integers and use %select.
      
      llvm-svn: 64543
      237f2757
    • Ted Kremenek's avatar
      GRExprEngine: Handle empty statement expressions. · d25fb7a6
      Ted Kremenek authored
      llvm-svn: 64541
      d25fb7a6
    • Ted Kremenek's avatar
      Added GRStateManager::scanReachableSymbols(), a method which scans the reachable · 4e9d4b5d
      Ted Kremenek authored
      symbols from an SVal.
      
      - Fixed a bug in EnvironmentManager::RemoveDeadBindings() where it did not mark
        live all the symbols reachable from a live block-level expression.
      
      - Fixed a bug in the retain/release checker where it did not stop tracking
        symbols that 'escaped' via compound literals being assigned to something the
        BasicStoreManager didn't reason about.
      
      llvm-svn: 64534
      4e9d4b5d
    • Daniel Dunbar's avatar
      x86_64 ABI: Pass simple types directly when possible. This is · 019ef0bb
      Daniel Dunbar authored
      important for both keeping the generated LLVM simple and for ensuring
      that integer types are passed/promoted correctly.
      
      llvm-svn: 64529
      019ef0bb
    • Douglas Gregor's avatar
      Make it possible for builtins to expression FILE* arguments, so that · 538c3d84
      Douglas Gregor authored
      we can define builtins such as fprintf, vfprintf, and
      __builtin___fprintf_chk. Give a nice error message when we need to
      implicitly declare a function like fprintf.
      
      llvm-svn: 64526
      538c3d84
    • Douglas Gregor's avatar
      Add test case to insure that implicit builtin declarations for C library... · 2de3e31c
      Douglas Gregor authored
      Add test case to insure that implicit builtin declarations for C library functions aren't created in C++
      
      llvm-svn: 64513
      2de3e31c
    • Douglas Gregor's avatar
      Extend builtin "attribute" syntax to include a notation for · ac5d4c5f
      Douglas Gregor authored
      printf-like functions, both builtin functions and those in the
      C library. The function-call checker now queries this attribute do
      determine if we have a printf-like function, rather than scanning
      through the list of "known functions IDs". However, there are 5
      functions they are not yet "builtins", so the function-call checker
      handles them specifically still:
      
        - fprintf and vfprintf: the builtins mechanism cannot (yet)
          express FILE* arguments, so these can't be encoded.
        - NSLog: the builtins mechanism cannot (yet) express NSString*
          arguments, so this (and NSLogv) can't be encoded.
        - asprintf and vasprintf: these aren't part of the C99 standard
          library, so we really shouldn't be defining them as builtins in
          the general case (and we don't seem to have the machinery to make
          them builtins only on certain targets and depending on whether
          extensions are enabled).
      
      llvm-svn: 64512
      ac5d4c5f
    • Chris Lattner's avatar
      fix rdar://6586493, a bug in codegen of the GNU · cd7bc144
      Chris Lattner authored
      missing-?:-true-value extension.
      
      llvm-svn: 64505
      cd7bc144
    • Douglas Gregor's avatar
      Implicitly declare certain C library functions (malloc, strcpy, memmove, · b9063fc1
      Douglas Gregor authored
      etc.) when we perform name lookup on them. This ensures that we
      produce the correct signature for these functions, which has two
      practical impacts:
      
        1) When we're supporting the "implicit function declaration" feature
        of C99, these functions will be implicitly declared with the right
        signature rather than as a function returning "int" with no
        prototype. See PR3541 for the reason why this is important (hint:
        GCC always predeclares these functions).
       
        2) If users attempt to redeclare one of these library functions with
        an incompatible signature, we produce a hard error.
      
      This patch does a little bit of work to give reasonable error
      messages. For example, when we hit case #1 we complain that we're
      implicitly declaring this function with a specific signature, and then
      we give a note that asks the user to include the appropriate header
      (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
      case #2, we show the type of the implicit builtin that was incorrectly
      declared, so the user can see the problem. We could do better here:
      for example, when displaying this latter error message we say
      something like:
      
        'strcpy' was implicitly declared here with type 'char *(char *, char
        const *)'
      
      but we should really print out a fake code line showing the
      declaration, like this:
      
        'strcpy' was implicitly declared here as:
      
          char *strcpy(char *, char const *)
      
      This would also be good for printing built-in candidates with C++
      operator overloading.
      
      The set of C library functions supported by this patch includes all
      functions from the C99 specification's <stdlib.h> and <string.h> that
      (a) are predefined by GCC and (b) have signatures that could cause
      codegen issues if they are treated as functions with no prototype
      returning and int. Future work could extend this set of functions to
      other C library functions that we know about.
      
      llvm-svn: 64504
      b9063fc1
  4. Feb 13, 2009
Loading