Skip to content
Snippets Groups Projects
  1. Jul 02, 2015
  2. Jun 30, 2015
  3. Jun 23, 2015
  4. Jun 22, 2015
  5. Jun 19, 2015
    • Douglas Gregor's avatar
      Check for consistent use of nullability type specifiers in a header. · d442f4a2
      Douglas Gregor authored
      Adds a new warning (under -Wnullability-completeness) that complains
      about pointer, block pointer, or member pointer declarations that have
      not been annotated with nullability information (directly or inferred)
      within a header that contains some nullability annotations. This is
      intended to be used to help maintain the completeness of nullability
      information within a header that has already been audited.
      
      Note that, for performance reasons, this warning will underrepresent
      the number of non-annotated pointers in the case where more than one
      pointer is seen before the first nullability type specifier, because
      we're only tracking one piece of information per header. Part of
      rdar://problem/18868820.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240158 91177308-0d34-0410-b5e6-96231b3b80d8
      d442f4a2
  6. Jun 04, 2015
  7. Jun 03, 2015
  8. May 29, 2015
    • Benjamin Kramer's avatar
      Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types · b7b56528
      Benjamin Kramer authored
      If the type isn't trivially moveable emplace can skip a potentially
      expensive move. It also saves a couple of characters.
      
      
      Call sites were found with the ASTMatcher + some semi-automated cleanup.
      
      memberCallExpr(
          argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
          on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
          hasArgument(0, bindTemporaryExpr(
                             hasType(recordDecl(hasNonTrivialDestructor())),
                             has(constructExpr()))),
          unless(isInTemplateInstantiation()))
      
      No functional change intended.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238601 91177308-0d34-0410-b5e6-96231b3b80d8
      b7b56528
  9. May 15, 2015
  10. Apr 24, 2015
  11. Apr 21, 2015
    • Ulrich Weigand's avatar
      Implement target-specific __attribute__((aligned)) value · d85ab2e6
      Ulrich Weigand authored
      The GCC construct __attribute__((aligned)) is defined to set alignment
      to "the default alignment for the target architecture" according to
      the GCC documentation:
      
        The default alignment is sufficient for all scalar types, but may not be
        enough for all vector types on a target that supports vector operations.
        The default alignment is fixed for a particular target ABI.
      
      clang currently hard-coded an alignment of 16 bytes for that construct,
      which is correct on some platforms (including X86), but wrong on others
      (including SystemZ).  Since this value is ABI-relevant, it is important
      to get correct for compatibility purposes.
      
      This patch adds a new TargetInfo member "DefaultAlignForAttributeAligned"
      that targets can set to the appropriate default __attribute__((aligned))
      value.
      
      Note that I'm deliberately *not* using the existing "SuitableAlign"
      value, which is used to set the pre-defined macro __BIGGEST_ALIGNMENT__,
      since those two values may not be the same on all platforms.  In fact,
      on X86, __attribute__((aligned)) always uses 16-byte alignment, while
      __BIGGEST_ALIGNMENT__ may be larger if AVX-2 or AVX-512 are supported.
      (This is actually not yet correctly implemented in clang either.)
      
      The patch provides a value for DefaultAlignForAttributeAligned only for
      SystemZ, and leaves the default for all other targets at 16, which means
      no visible change in behavior on all other targets.  (The value is still
      wrong for some other targets, but I'd prefer to leave it to the target
      maintainers for those platforms to fix.)
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235397 91177308-0d34-0410-b5e6-96231b3b80d8
      d85ab2e6
  12. Apr 11, 2015
  13. Apr 10, 2015
  14. Apr 06, 2015
  15. Apr 02, 2015
  16. Mar 19, 2015
    • Benjamin Kramer's avatar
      Devirtualize Attr and all subclasses. · 5d00c120
      Benjamin Kramer authored
      We know all subclasses in tblgen so just generate a giant switch for
      the few virtual methods or turn them into a member variable using spare
      bits. The giant jump tables aren't pretty but still much smaller than
      a vtable for every attribute, shrinking Release+Asserts clang by ~400k.
      
      Also halves the size of the Attr base class. No functional change
      intended.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232726 91177308-0d34-0410-b5e6-96231b3b80d8
      5d00c120
  17. Mar 18, 2015
    • Yaron Keren's avatar
      Remove many superfluous SmallString::str() calls. · 9bd91b68
      Yaron Keren authored
      Now that SmallString is a first-class citizen, most SmallString::str()
      calls are not required. This patch removes a whole bunch of them, yet
      there are lots more.
      
      There are two use cases where str() is really needed:
      1) To use one of StringRef member functions which is not available in
      SmallString.
      2) To convert to std::string, as StringRef implicitly converts while 
      SmallString do not. We may wish to change this, but it may introduce
      ambiguity.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232622 91177308-0d34-0410-b5e6-96231b3b80d8
      9bd91b68
  18. Mar 10, 2015
  19. Jan 23, 2015
  20. Jan 14, 2015
  21. Dec 19, 2014
  22. Dec 05, 2014
  23. Nov 28, 2014
  24. Nov 17, 2014
  25. Nov 14, 2014
  26. Oct 31, 2014
  27. Oct 30, 2014
  28. Oct 12, 2014
  29. Sep 15, 2014
  30. Aug 27, 2014
  31. Aug 21, 2014
    • Daniel Sanders's avatar
      Fix invalid test generation by utils/ABITest/ABITestGen.py when the same enum... · ef943a96
      Daniel Sanders authored
      Fix invalid test generation by utils/ABITest/ABITestGen.py when the same enum is generated more than once.
      
      When generating records/unions, the same enum type may be generated more
      than once (with different names). In these cases, the name of the enum
      values are not sufficiently unique to prevent multiple declarations. E.g:
        typedef enum T3 { enum0val0 } T3;
        typedef T3 T2[3];
        typedef enum T4 { enum0val0 } T4;
        typedef union T1 { T2 field0; T4 field1; char field2; } T1;
      
      Added a unique suffix to enum values so that multiple identical enum types do
      not use the same enum value names.
      
      One example of this bug is produced by:
        ABITestGen.py --no-unsigned --no-vector --no-complex --no-bool \
                      --max-args 0 --max-record-depth 1 -o inputs/test.9921.a.c \
                      -T inputs/test.9921.b.c -D inputs/test.9921.driver.c \
                      --min=9921 --count=1
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216166 91177308-0d34-0410-b5e6-96231b3b80d8
      ef943a96
  32. Aug 09, 2014
  33. Aug 08, 2014
  34. Aug 01, 2014
Loading