1. 30 Jan, 2019 2 commits
  2. 29 Jan, 2019 1 commit
  3. 28 Jan, 2019 17 commits
  4. 27 Jan, 2019 1 commit
  5. 25 Jan, 2019 1 commit
  6. 24 Jan, 2019 4 commits
  7. 23 Jan, 2019 3 commits
  8. 22 Jan, 2019 3 commits
  9. 21 Jan, 2019 1 commit
    • Aurélien Rainone's avatar
      go/analysis/passes/atomicalign: add atomicalign ckecker · 24cd39ec
      Aurélien Rainone authored
      The atomicalign Analyzer checks the alignment of 64-bits variables
      accessed atomically via sync/atomic functions on 32-bits
      architectures. Per the sync/atomic BUG note those variables must
      be 64-bits aligned, otherwise a runtime panic is issued.
      
      The analyzer only shows and runs on 32-bits architectures.
      
      This CL should not introduce any false positives.
      
      Add some tests in testdata/src/a to verify the analyzer behavior
      on affected architectures plus some very basic test to verify that
      no warning is generated on non-affected ones.
      
      Fixes golang/go#11891
      
      Change-Id: I02cfc574883564cd2a213a92d33bda3cc9a1ea98
      Reviewed-on: https://go-review.googlesource.com/c/158277
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
      24cd39ec
  10. 18 Jan, 2019 2 commits
    • Heschi Kreinick's avatar
      imports: remove globals, stop using build.Default · 16909d20
      Heschi Kreinick authored
      The imports package's public API is build.Default, but that doesn't mean
      we need to use it in the internal implementation or the tests. Now we
      have a new type, fixEnv, that contains everything relevant from
      build.Context, as well as the various global vars that were only used
      for testing.
      
      Don't worry too much about the new function parameters; they mostly
      move into the resolvers in the next CL.
      
      Refactoring only; no user-visible changes intended.
      
      Change-Id: I0d4c904955c5854dcdf904009cb3413c734baf88
      Reviewed-on: https://go-review.googlesource.com/c/158437
      Run-TryBot: Heschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarIan Cottrell <iancottrell@google.com>
      16909d20
    • Heschi Kreinick's avatar
      imports: don't eagerly guess package names · 6466e726
      Heschi Kreinick authored
      Before this change, we guessed package names during loadPackageNames
      when necessary. That made it impossible to tell if we failed to load
      a package's name, e.g. because its source code is unavailable. That
      interferes with fixes for golang/go#29557. It also meant that each
      implementation of package name loading needs to do the guessing,
      which gets annoying in CL 158097.
      
      Instead, leave package names unset unless we're certain about them, and
      guess only in (*pass).importIdentifier when necessary.
      
      Refactoring only; no user-visible changes intended.
      
      Change-Id: Ia6072ada823e6e3a86981ad90228f30baa2ac708
      Reviewed-on: https://go-review.googlesource.com/c/158199
      Run-TryBot: Heschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarIan Cottrell <iancottrell@google.com>
      6466e726
  11. 17 Jan, 2019 4 commits
  12. 16 Jan, 2019 1 commit