Skip to content
  1. Nov 20, 2012
  2. Nov 19, 2012
    • Richard Smith's avatar
      PR14381: Never skip constexpr function bodies when code-completing. We may need · 1ab34b3a
      Richard Smith authored
      them in order to parse the rest of the file.
      
      llvm-svn: 168327
      1ab34b3a
    • Kaelyn Uhrain's avatar
      When adding a NamedDecl to a correction, add the underlying Decl (via · f60b55ae
      Kaelyn Uhrain authored
      getUnderlyingDecl()) so that derivatives of
      CorrectionCandidateCallback::ValidateCandidate(...) don't have to worry
      about being thrown by UsingDecls and such.
      
      llvm-svn: 168317
      f60b55ae
    • Logan Chien's avatar
      Add -ldl for non-static libgcc in Android. · 3d3373ce
      Logan Chien authored
      According to Android ABI, we have to link with
      libdl.so, if we are linking with non-static libgcc.
      
      Besides, this also fixes MIPS link error of
      undefined references to `_Unwind_Find_FDE' and
      `dl_iterate_phdr'.
      
      llvm-svn: 168310
      3d3373ce
    • Logan Chien's avatar
      Enable -fuse-init-array for Android X86/MIPS. · 1d8cc65a
      Logan Chien authored
      The dynamic linker of Android does not support .ctors/.dtors.
      We should emit .init_array and .fini_array regardless the
      gcc version.
      
      NOTE: This patch does not affect the ARM backend, because
      it is required to generate .init_array and .fini_array
      for program targeting ARM AAPCS and AEABI.
      
      llvm-svn: 168309
      1d8cc65a
    • Chandler Carruth's avatar
      Completely re-work how the Clang driver interprets PIC and PIE options. · 76a943be
      Chandler Carruth authored
      There were numerous issues here that were all entangled, and so I've
      tried to do a general simplification of the logic.
      1) The logic was mimicing actual GCC bugs, rather than "features". These
         have been fixed in trunk GCC, and this fixes Clang as well. Notably,
         the logic was always intended to be last-match-wins like any other
         flag.
      2) The logic for handling '-mdynamic-no-pic' was preposterously unclear.
         It also allowed the use of this flag on non-Darwin platforms where it
         has no actual meaning. Now this option is handled directly based on
         tests of how llvm-gcc behaves, and it is only supported on Darwin.
      3) The APIs for the Driver's ToolChains had the implementation ugliness
         of dynamic-no-pic leaking through them. They also had the
         implementation details of the LLVM relocation model flag names
         leaking through.
      4) The actual results of passing these flags was incorrect on Darwin in
         many cases. For example, Darwin *always* uses PIC level 2 if it uses
         in PIC level, and Darwin *always* uses PIC on 64-bit regardless of
         the flags specified, including -fPIE. Darwin never compiles in PIE
         mode, but it can *link* in PIE mode.
      5) Also, PIC was not always being enabled even when PIE was. This isn't
         a supported mode at all and may have caused some fallout in builds
         with complex PIC and PIE interactions.
      
      The result is (I hope) cleaner and clearer for readers. I've also left
      comments and tests about some of the truly strage behavior that is
      observed on Darwin platforms. We have no real testing of Windows
      platforms and PIC, but I don't have the tools handy to figure that out.
      Hopefully others can beef up our testing here.
      
      Unfortunately, I can't test this for every platform. =/ If folks have
      dependencies on these flags that aren't covered by tests, they may
      break. I've audited and ensured that all the changes in behavior of the
      existing tests are intentional and good. In particular I've tried to
      make sure the Darwin behavior (which is more suprising than the Linux
      behavior) also matches that of 'gcc' on my mac.
      
      llvm-svn: 168297
      76a943be
  3. Nov 18, 2012
  4. Nov 17, 2012
  5. Nov 16, 2012
  6. Nov 15, 2012
    • Richard Smith's avatar
      PR9903: Recover from a member functon declared with the 'typedef' specifier by · 2603b096
      Richard Smith authored
      dropping the specifier, just like we do for non-member functions and function
      templates declared 'typedef'. Patch by Brian Brooks!
      
      llvm-svn: 168108
      2603b096
    • Jordan Rose's avatar
      [analyzer] Fix a use-after-free introduced in r168019. · 19bc88c3
      Jordan Rose authored
      In code like this:
      
      void foo() {
           bar();
           baz();
      }
      
      ...the location for the call to 'bar()' was being used as a backup location
      for the call to 'baz()'. This is fine unless the call to 'bar()' is deemed
      uninteresting and that part of the path deleted.
      
      (This looks like a logic error as well, but in practice the only way 'baz()'
      could have an invalid location is if the entire body of 'foo()' is
      synthesized, meaning the call to 'bar()' will be using the location of the
      call to 'foo()' anyway. Nevertheless, the new version better matches the
      intent of the code.)
      
      Found by Matt Beaumont-Gay using ASan. Thanks, Matt!
      
      llvm-svn: 168080
      19bc88c3
    • Douglas Gregor's avatar
      If an excluded header does not exist, just ignore it · 4b27a64b
      Douglas Gregor authored
      llvm-svn: 168077
      4b27a64b
    • Jordan Rose's avatar
      [analyzer] Report leaks at the closing brace of a function body. · e37ab50a
      Jordan Rose authored
      This fixes a few cases where we'd emit path notes like this:
      
        +---+
       1|   v
        p = malloc(len);
        ^   |2
        +---+
      
      In general this should make path notes more consistent and more correct,
      especially in cases where the leak happens on the false branch of an if
      that jumps directly to the end of the function. There are a couple places
      where the leak is reported farther away from the cause; these are usually
      cases where there are several levels of nested braces before the end of
      the function. This still matches our current behavior for when there /is/
      a statement after all the braces, though.
      
      llvm-svn: 168070
      e37ab50a
    • Jordan Rose's avatar
      [analyzer] StreamChecker: Remove now-unnecessary check::EndPath callback. · b9263cf1
      Jordan Rose authored
      Also, don't bother to stop tracking symbols in the return value, either.
      They are now properly considered live during checkDeadSymbols.
      
      llvm-svn: 168069
      b9263cf1
    • Jordan Rose's avatar
      [analyzer] MacOSKeychainAPIChecker: Remove now-unnecessary check::EndPath. · 7489ba5e
      Jordan Rose authored
      Also, don't bother to stop tracking symbols in the return value, either.
      They are now properly considered live during checkDeadSymbols.
      
      llvm-svn: 168068
      7489ba5e
Loading