Commit 17f8c463 authored by Bill Wendling's avatar Bill Wendling
Browse files

Merging r156031:

------------------------------------------------------------------------
r156031 | rsmith | 2012-05-02 15:22:32 -0700 (Wed, 02 May 2012) | 4 lines

Revert most of r154844, which was disabled in r155975. Keep around the
refactorings in that revision, and some of the subsequent bugfixes, which
seem to be relevant even without delayed exception specification parsing.

------------------------------------------------------------------------

llvm-svn: 156684
parent 7da58705
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -64,9 +64,6 @@ public:

  /// \brief Return the TypeLoc wrapper for the type source info.
  TypeLoc getTypeLoc() const; // implemented in TypeLoc.h
  
  /// \brief Override the type stored in this TypeSourceInfo. Use with caution!
  void overrideType(QualType T) { Ty = T; }
};

/// TranslationUnitDecl - The top declaration context.
+0 −2
Original line number Diff line number Diff line
@@ -410,8 +410,6 @@ def ext_ellipsis_exception_spec : Extension<
  "exception specification of '...' is a Microsoft extension">;
def err_dynamic_and_noexcept_specification : Error<
  "cannot have both throw() and noexcept() clause on the same function">;
def err_except_spec_unparsed : Error<
  "unexpected end of exception specification">;
def warn_cxx98_compat_noexcept_decl : Warning<
  "noexcept specifications are incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
+0 −1
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ TOK(eod) // End of preprocessing directive (end of line inside a
                         // directive).
TOK(code_completion)     // Code completion marker
TOK(cxx_defaultarg_end)  // C++ default argument end marker
TOK(cxx_exceptspec_end)  // C++ exception-specification end marker

// C99 6.4.9: Comments.
TOK(comment)             // Comment (only in -E -C[C] mode)
+1 −3
Original line number Diff line number Diff line
@@ -1429,12 +1429,10 @@ private:
  ExprResult ParseThrowExpression();

  ExceptionSpecificationType tryParseExceptionSpecification(
                    bool Delayed,
                    SourceRange &SpecificationRange,
                    SmallVectorImpl<ParsedType> &DynamicExceptions,
                    SmallVectorImpl<SourceRange> &DynamicExceptionRanges,
                    ExprResult &NoexceptExpr,
                    CachedTokens *&ExceptionSpecTokens);
                    ExprResult &NoexceptExpr);

  // EndLoc is filled with the location of the last token of the specification.
  ExceptionSpecificationType ParseDynamicExceptionSpecification(
+0 −7
Original line number Diff line number Diff line
@@ -1150,10 +1150,6 @@ struct DeclaratorChunk {
      /// \brief Pointer to the expression in the noexcept-specifier of this
      /// function, if it has one.
      Expr *NoexceptExpr;
  
      /// \brief Pointer to the cached tokens for an exception-specification
      /// that has not yet been parsed.
      CachedTokens *ExceptionSpecTokens;
    };

    /// TrailingReturnType - If this isn't null, it's the trailing return type
@@ -1176,8 +1172,6 @@ struct DeclaratorChunk {
        delete[] ArgInfo;
      if (getExceptionSpecType() == EST_Dynamic)
        delete[] Exceptions;
      else if (getExceptionSpecType() == EST_Delayed)
        delete ExceptionSpecTokens;
    }

    /// isKNRPrototype - Return true if this is a K&R style identifier list,
@@ -1353,7 +1347,6 @@ struct DeclaratorChunk {
                                     SourceRange *ExceptionRanges,
                                     unsigned NumExceptions,
                                     Expr *NoexceptExpr,
                                     CachedTokens *ExceptionSpecTokens,
                                     SourceLocation LocalRangeBegin,
                                     SourceLocation LocalRangeEnd,
                                     Declarator &TheDeclarator,
Loading