Skip to content
  1. Feb 04, 2012
    • Benjamin Kramer's avatar
      Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h. · 3307c508
      Benjamin Kramer authored
      Fix all the files that depended on transitive includes of Diagnostic.h.
      With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.
      
      llvm-svn: 149781
      3307c508
    • Richard Smith's avatar
      In C++11 mode, when an integral constant expression is desired and we have a · f4c51d9d
      Richard Smith authored
      value of class type, look for a unique conversion operator converting to
      integral or unscoped enumeration type and use that. Implements [expr.const]p5.
      
      Sema::VerifyIntegerConstantExpression now performs the conversion and returns
      the converted result. Some important callers of Expr::isIntegralConstantExpr
      have been switched over to using it (including all of those required for C++11
      conformance); this switch brings a side-benefit of improved diagnostics and, in
      several cases, simpler code. However, some language extensions and attributes
      have not been moved across and will not perform implicit conversions on
      constant expressions of literal class type where an ICE is required.
      
      In passing, fix static_assert to perform a contextual conversion to bool on its
      argument.
      
      llvm-svn: 149776
      f4c51d9d
    • Richard Smith's avatar
      Don't allow a value of a scoped enumeration to be used as the first bound for an · 8dd34250
      Richard Smith authored
      array new expression. This lays some groundwork for the implicit conversion to
      integral or unscoped enumeration which C++11 ICEs undergo.
      
      llvm-svn: 149772
      8dd34250
    • Richard Smith's avatar
      Disallow constexpr main. · 3f333f2e
      Richard Smith authored
      llvm-svn: 149770
      3f333f2e
    • Richard Smith's avatar
      Fix a rejects-valid in C++11: array new of a negative size, or overflowing array · bcc9bcb6
      Richard Smith authored
      new, is well-formed with defined semantics of throwing (a type which can be
      caught by a handler for) std::bad_array_new_length, unlike in C++98 where it is
      somewhere nebulous between undefined behavior and ill-formed.
      
      If the array size is an integral constant expression and satisfies one of these
      criteria, we would previous the array new expression, but now in C++11 mode, we
      merely issue a warning (the code is still rejected in C++98 mode, naturally).
      
      We don't yet implement new C++11 semantics correctly (see PR11644), but we do
      implement the overflow checking, and (for the default operator new) convert such
      expressions to an exception, so accepting such code now does not seem especially
      unsafe.
      
      llvm-svn: 149767
      bcc9bcb6
    • Nick Lewycky's avatar
      Don't warn on use of default allocator with an over-aligned type when the · 96ed7b62
      Nick Lewycky authored
      allocator is given the pointer to allocate into.
      
      llvm-svn: 149760
      96ed7b62
    • Sean Callanan's avatar
      Clang has existing support for debuggers that · 1ce3a6b6
      Sean Callanan authored
      want to provide "po"-like functionality which
      treats the result of an expression implicitly as
      "id" (if it is not otherwise known) and prints
      it as an Objective-C object.
      
      This has in the past been gated by the
      "DebuggerSupport" language option, but that is
      too general.  Debuggers also provide other commands
      like "print" that do not make any assumptions
      about whether the object is an Objective-C object.
      
      This patch makes the assumption conditional on a
      new language option: DebuggerCastResultToId.  I
      have also made corresponding modifications to the
      testsuite.
      
      llvm-svn: 149735
      1ce3a6b6
    • Eli Friedman's avatar
      Suppress the used-but-not-defined warning for static data members while I look... · 130bbd03
      Eli Friedman authored
      Suppress the used-but-not-defined warning for static data members while I look into a rather nasty bug in the new odr-use marking code.
      
      llvm-svn: 149731
      130bbd03
    • Richard Smith's avatar
      constexpr: · 74388b4e
      Richard Smith authored
        The recent support for potential constant expressions exposed a bug in the
        implementation of libstdc++4.6, where numeric_limits<int>::min() is defined
        as (int)1 << 31, which isn't a constant expression. Disable the 'constexpr
        function never produces a constant expression' error inside system headers
        to compensate.
      
      llvm-svn: 149729
      74388b4e
    • Eli Friedman's avatar
      Make explicit captures which cause implicit captures work correctly. · a023e0c6
      Eli Friedman authored
      llvm-svn: 149719
      a023e0c6
  2. Feb 03, 2012
  3. Feb 02, 2012
  4. Feb 01, 2012
Loading