Skip to content
Snippets Groups Projects
  1. Mar 08, 2016
  2. Oct 08, 2015
  3. Mar 29, 2015
  4. Feb 17, 2015
  5. Feb 16, 2015
  6. Jan 09, 2015
  7. Dec 29, 2014
    • Nico Weber's avatar
      Crash even less on malformed attributes in an incorrect location. · bbe74454
      Nico Weber authored
      This is a follow-up to r224915.  This adds a bit more line noise to the tests
      added in that revision to make sure the parser is ready for a toplevel decl
      after each incorrect line.  Use this to move the tests up to where they belong.
      This uncovered that the early return was missing a call to
      ActOnTagDefinitionError(), so add that. (Also fixes at least one of the crashes
      on SLi's bot.)
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224958 91177308-0d34-0410-b5e6-96231b3b80d8
      bbe74454
    • Nico Weber's avatar
      Don't crash on malformed attributes in an incorrect location. · 1a0c408f
      Nico Weber authored
      r168626 added nicer diagnostics for attributes in the wrong places, such as
      after the `final` on a class.  To do this, it added code that did high-level
      pattern matching for e.g. 'final' 'alignas' '(' and then skipped until the
      closing ')'.  If it saw that, it then went down the regular class parsing
      path and then called MaybeParseCXX11Attributes() to parse the attribute after
      the 'final' using real attribute parsing code.  On invalid attributes, the
      real attribute parsing code could eat more tokens than the pattern matching
      code and for example skip past the '{' starting the class, which would then
      lead to an assert.  To prevent this, check for a good state after calling
      MaybeParseCXX11Attributes() (which morphed into CheckMisplacedCXX11Attribute()
      in r175575) and bail out if things look bleak.
      
      Found by SLi's afl bot.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224915 91177308-0d34-0410-b5e6-96231b3b80d8
      1a0c408f
  8. Nov 08, 2014
  9. Apr 15, 2014
  10. Apr 14, 2014
  11. Mar 31, 2014
  12. Nov 30, 2013
  13. Nov 27, 2013
  14. Oct 29, 2013
  15. Oct 15, 2013
  16. Sep 06, 2013
  17. Feb 22, 2013
  18. Feb 20, 2013
  19. Jan 29, 2013
  20. Jan 17, 2013
  21. Jan 14, 2013
  22. Jan 07, 2013
  23. Nov 29, 2012
  24. Nov 26, 2012
    • Michael Han's avatar
      Improve diagnostic on C++11 attribute specifiers that appear at wrong... · 2e39713a
      Michael Han authored
      Improve diagnostic on C++11 attribute specifiers that appear at wrong syntactic locations around class specifiers.
      
      This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute
      specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like 
      "expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also 
      fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected.
      
      Thanks to Richard Smith for reviewing!
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168626 91177308-0d34-0410-b5e6-96231b3b80d8
      2e39713a
  25. Nov 06, 2012
  26. Oct 03, 2012
    • Michael Han's avatar
      Improve C++11 attribute parsing. · 6880f492
      Michael Han authored
      - General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST.
      - Add support to parse arguments of attributes that in 'gnu' namespace.
      - Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165082 91177308-0d34-0410-b5e6-96231b3b80d8
      6880f492
  27. Jun 24, 2012
  28. Jun 23, 2012
    • Sean Hunt's avatar
      Clean up a large number of C++11 attribute parse issues, including parsing · 2edf0a25
      Sean Hunt authored
      attributes in more places where we didn't and catching a lot more issues.
      
      This implements nearly every aspect of C++11 attribute parsing, except for:
       - Attributes are permitted on explicit instantiations inside the declarator
         (but not preceding the decl-spec)
       - Attributes are permitted on friend declarations of functions.
       - Multiple instances of the same attribute in an attribute-list (e.g.
         [[noreturn, noreturn]], not [[noreturn]] [[noreturn]] which is conforming)
         are allowed.
      The first two are marked as expected-FIXME in the test file and the latter
      is probably a defect and is currently untested.
      
      Thanks to Richard Smith for providing the lion's share of the testcases.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159072 91177308-0d34-0410-b5e6-96231b3b80d8
      2edf0a25
  29. Apr 11, 2012
  30. Apr 10, 2012
    • Richard Smith's avatar
      Parsing of C++11 attributes: · c56298d8
      Richard Smith authored
       * Alternative tokens (such as 'compl') are treated as identifiers in
         attribute names.
       * An attribute-list can start with a comma.
       * An ellipsis may not be used with either of our currently-supported
         C++11 attributes.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154381 91177308-0d34-0410-b5e6-96231b3b80d8
      c56298d8
    • Richard Smith's avatar
      Disambiguation of '[[': · 6ee326af
      Richard Smith authored
       * In C++11, '[[' is ill-formed unless it starts an attribute-specifier. Reject
         array sizes and array indexes which begin with a lambda-expression. Recover by
         parsing the lambda as a lambda.
       * In Objective-C++11, either '[' could be the start of a message-send.
         Fully disambiguate this case: it turns out that the grammars of message-sends,
         lambdas and attributes do not actually overlap. Accept any occurrence of '[['
         where either '[' starts a message send, but reject a lambda in an array index
         just like in C++11 mode.
      
      Implement a couple of changes to the attribute wording which occurred after our
      attributes implementation landed:
       * In a function-declaration, the attributes go after the exception specification,
         not after the right paren.
       * A reference type can have attributes applied.
       * An 'identifier' in an attribute can also be a keyword. Support for alternative
         tokens (iso646 keywords) in attributes to follow.
      
      And some bug fixes:
       * Parse attributes after declarator-ids, even if they are not simple identifiers.
       * Do not accept attributes after a parenthesized declarator.
       * Accept attributes after an array size in a new-type-id.
       * Partially disamiguate 'delete' followed by a lambda. More work is required
         here for the case where the lambda-introducer is '[]'.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154369 91177308-0d34-0410-b5e6-96231b3b80d8
      6ee326af
  31. Feb 04, 2012
    • Richard Smith's avatar
      In C++11 mode, when an integral constant expression is desired and we have a · 282e7e66
      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.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149776 91177308-0d34-0410-b5e6-96231b3b80d8
      282e7e66
  32. Jan 04, 2012
  33. Oct 14, 2011
Loading