Skip to content
Snippets Groups Projects
  1. Mar 16, 2017
  2. Mar 15, 2017
  3. Mar 14, 2017
  4. Mar 13, 2017
    • Reid Kleckner's avatar
      Fix -Wunused-lambda-capture warning in new code · 19f61736
      Reid Kleckner authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297681 91177308-0d34-0410-b5e6-96231b3b80d8
      19f61736
    • Reid Kleckner's avatar
      Widen AST bitfields too small to represent all enumerators · 45f9ba4c
      Reid Kleckner authored
      All of these were found by a new warning that I am prototyping,
      -Wbitfield-enum-conversion.
      
      Stmt::ExprBits::ObjectKind - This was not wide enough to represent
      OK_ObjSubscript, so this was a real, true positive bug.
      
      ObjCDeclSpec::objCDeclQualifier - On Windows, setting DQ_CSNullability
      would cause the bitfield to become negative because enum types are
      always implicitly 'int' there. This would probably never be noticed
      because this is a flag-style enum, so we only ever test one bit at a
      time. Switching to 'unsigned' also makes this type pack smaller on
      Windows.
      
      FunctionDecl::SClass - Technically, we only need two bits for all valid
      function storage classes. Functions can never have automatic or register
      storage class. This seems a bit too clever, and we have a bit to spare,
      so widening the bitfield seems like the best way to pacify the warning.
      You could classify this as a false positive, but widening the bitfield
      defends us from invalid ASTs.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297680 91177308-0d34-0410-b5e6-96231b3b80d8
      45f9ba4c
    • Matt Arsenault's avatar
      AMDGPU: Make 0 the private nullptr value · 55175b19
      Matt Arsenault authored
      We can't actually pretend that 0 is valid for address space 0.
      r295877 added a workaround to stop allocating user objects
      there, so we can use 0 as the invalid pointer.
      
      Some of the tests seemed to be using private as the non-0 null
      test address space, so add copies using local to make sure
      this is still stressed.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297659 91177308-0d34-0410-b5e6-96231b3b80d8
      55175b19
    • Duncan P. N. Exon Smith's avatar
      Modules: Use hash of PCM content for SIGNATURE · d15b1db6
      Duncan P. N. Exon Smith authored
      Change ASTFileSignature from a random 32-bit number to the hash of the
      PCM content.
      
        - Move definition ASTFileSignature to Basic/Module.h so Module and
          ASTSourceDescriptor can use it.
      
        - Change the signature from uint64_t to std::array<uint32_t,5>.
      
        - Stop using (saving/reading) the size and modification time of PCM
          files when there is a valid SIGNATURE.
      
        - Add UNHASHED_CONTROL_BLOCK, and use it to store the SIGNATURE record
          and other records that shouldn't affect the hash.  Because implicit
          modules reuses the same file for multiple levels of -Werror, this
          includes DIAGNOSTIC_OPTIONS and DIAG_PRAGMA_MAPPINGS.
      
      This helps to solve a PCH + implicit Modules dependency issue: PCH files
      are handled by the external build system, whereas implicit modules are
      handled by internal compiler build system.  This prevents invalidating a
      PCH when the compiler overwrites a PCM file with the same content
      (modulo the diagnostic differences).
      
      Design and original patch by Manman Ren!
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297655 91177308-0d34-0410-b5e6-96231b3b80d8
      d15b1db6
Loading