1. Feb 09, 2019
  2. Feb 08, 2019
    • Ben Hamilton's avatar
      [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow · 30b7d09d
      Ben Hamilton authored
      Summary:
      Currently, `UnwrappedLineParser` thinks an arrow token after
      an ObjC method expression is a C++ lambda arrow, so it formats:
      
      ```
      [foo bar]->baz
      ```
      
      as:
      
      ```
      [foo bar] -> baz
      ```
      
      Because `UnwrappedLineParser` runs before `TokenAnnotator`, it can't
      know if the arrow token is after an ObjC method expression or not.
      
      This diff makes `TokenAnnotator` remove the TT_LambdaArrow on
      the arrow token if it follows an ObjC method expression.
      
      Test Plan: New test added. Ran test with:
        % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests
        Confirmed test failed before diff and passed after diff.
      
      Reviewers: krasimir, djasper, sammccall
      
      Reviewed By: sammccall
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57923
      
      llvm-svn: 353531
      30b7d09d
    • Carl Ritson's avatar
      [AMDGPU] Fix CS scratch setup on pre-GCN3 ASICs · 494b8ac9
      Carl Ritson authored
      Summary:
      Prior to GCN3 s_load_dword offsets are in dwords rather than bytes.
      Thus the scratch buffer descriptor offset must be adjusted for pre-GCN3 ASICs.
      
      Reviewers: nhaehnle, tpr
      
      Reviewed By: nhaehnle
      
      Subscribers: sheredom, arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, jfb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D56496
      
      llvm-svn: 353530
      494b8ac9
    • James Y Knight's avatar
      [opaque pointer types] Cleanup CGBuilder's Create*GEP. · f5f1b0e5
      James Y Knight authored
      Some of these functions take some extraneous arguments, e.g. EltSize,
      Offset, which are computable from the Type and DataLayout.
      
      Add some asserts to ensure that the computed values are consistent
      with the passed-in values, in preparation for eliminating the
      extraneous arguments. This also asserts that the Type is an Array for
      the calls named "Array" and a Struct for the calls named "Struct".
      
      Then, correct a couple of errors:
      
      1. Using CreateStructGEP on an array type. (this causes the majority
         of the test differences, as struct GEPs are created with i32
         indices, while array GEPs are created with i64 indices)
      
      2. Passing the wrong Offset to CreateStructGEP in TargetInfo.cpp on
         x86-64 NACL (which uses 32-bit pointers).
      
      Differential Revision: https://reviews.llvm.org/D57766
      
      llvm-svn: 353529
      f5f1b0e5