1. 11 Dec, 2013 1 commit
  2. 23 Oct, 2013 1 commit
    • Nikolai Kosjar's avatar
      C++: Safe accessing of elements of TranslationUnit::_tokens · 1a5c7d8e
      Nikolai Kosjar authored
      Until now std::vector::at() was used to access the elements. This is
      handy for debugging since an exception is thrown for invalid indices,
      but it does not stop Qt Creator from crashing because exceptions are not
      This is especially a problem for the parser, which has to look ahead via
      LA(n), which accesses TranslationUnit::_tokens.
      With this patch, explicit bounds checking is done before accessing the
      elements and thus calls to
        std::vector::at() // bounds checking, throwing out_of_range
      were replaced by calls to
        std::vector::operator[]() // no bounds checking, not throwing out_of_range
      Measuring the parse time for the Qt Creator project shows that there is
      no slowdown. In both cases, with and without the patch, about 15s are
      needed on the authors machine.
      Task-number: QTCREATORBUG-10453
      Change-Id: I32b12a526ff7199bcadfc21a3deb5354063a3e3b
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
  3. 15 Oct, 2013 1 commit
  4. 12 Sep, 2013 1 commit
  5. 09 Sep, 2013 1 commit
  6. 18 Apr, 2013 1 commit
  7. 15 Apr, 2013 1 commit
  8. 03 Jan, 2013 1 commit
  9. 19 Sep, 2012 1 commit
  10. 25 Jun, 2012 1 commit
    • Leandro Melo's avatar
      C++: Core changes in preprocessing · d6ccffc0
      Leandro Melo authored
      Summary of most relevant items:
      - Preprocessor output format change. No more gen true/false. Instead
        a more intuitive and natural expansion (like from a real compiler) is
        performed directly corresponding to the macro invocation. Notice that
        information about the generated tokens is not lost, because it's now
        embedded in the expansion section header (in terms of lines and columns
        as explained in the code). In addition the location on where the macro
        expansion happens is also documented for future use.
      - Fix line control directives and associated token line numbers.
        This was not detected in tests cases because some of them were
        actually wrong: Within expansions the line information was being
        considered as originally computed in the macro definition, while
        the desired and expected for Creator's reporting mechanism (just
        like regular compilers) is the line from the expanded version
        of the tokens.
      - Do not allow for eager expansion. This was previously being done
        inside define directives. However, it's not allowed and might
        lead to incorrect results, since the argument substitution should
        only happen upon the macro invocation (and following nested ones).
        At least GCC and clang are consistent with that. See test case
        tst_Preprocessor:dont_eagerly_expand for a detailed explanation.
      - Revive the 'expanded' token flag. This is used to mark every token
        that originates from a macro expansion. Notice, however, that
        expanded tokens are not necessarily generated tokens (although
        every generated token is a expanded token). Expanded tokens that
        are not generated are those which are still considered by our
        code model features, since they are visible on the editor. The
        translation unit is smart enough to calculate line/column position
        for such tokens based on the information from the expansion section
      - How expansions are tracked has also changed. Now, we simply add
        two surrounding marker tokens to each "top-level" expansion
        sequence. There is an enumeration that control expansion states.
        Also, no "previous" token is kept around.
      - Preprocessor client methods suffered a change in signature so
        they now receive the line number of the action in question as
        a paramater. Previously such line could be retrieved by the client
        implementation by accessing the environment line. However, this
        is not reliable because we try to avoid synchronization of the
        output/environment lines in order to avoid unnecessary output,
        while expanding macros or handling preprocessor directives.
      - Although macros are not expanded during define directives (as
        mentioned above) the preprocessor client is now "notified"
        when it sees a macro. This is to allow usage tracking.
      - Other small stuff.
      This is all in one patch because the fixes are a consequence
      of the change in preprocessing control.
      Change-Id: I8f4c6e6366f37756ec65d0a93b79f72a3ac4ed50
      Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
  11. 25 Aug, 2011 1 commit
  12. 16 May, 2011 2 commits
  13. 06 May, 2011 1 commit
  14. 13 Apr, 2011 1 commit
  15. 04 Feb, 2011 1 commit
  16. 12 Jan, 2011 2 commits
  17. 17 Dec, 2010 1 commit
  18. 26 Aug, 2010 1 commit
  19. 11 Aug, 2010 1 commit
  20. 24 Mar, 2010 1 commit
  21. 18 Mar, 2010 1 commit
  22. 05 Mar, 2010 1 commit
  23. 01 Dec, 2009 1 commit
  24. 20 Oct, 2009 1 commit
    • Roberto Raggi's avatar
      Cleanup the C++ front-end. · 13675cf6
      Roberto Raggi authored
      Removed CPLUSPLUS_BEGIN/END_NAMESPACE & co and made it possible to compile the parser with CPLUSPLUS_WITHOUT_QT.
  25. 14 Aug, 2009 1 commit
  26. 03 Aug, 2009 1 commit
    • Thiago Macieira's avatar
      Compile the C++ parser library with Sun CC 5.9. · d0457b70
      Thiago Macieira authored
      Things you mustn't do:
      1) end an enum with a comma
      2) #include <cxxxx> and not use std::
      3) use anonymous structures
      All three things are invalid C++. Anonymous structures inside
      anonymous unions are allowed by GCC, but that doesn't mean it's valid.
  27. 24 Jun, 2009 1 commit
  28. 16 Jun, 2009 2 commits
    • con's avatar
      Cherry-pick: Update license headers and sales contact details. · 2919c210
      con authored
      Reviewed-by: Trust Me
    • Jason McDonald's avatar
      Update license headers and sales contact details. · 884b7af7
      Jason McDonald authored
      Reviewed-by: Trust Me
  29. 02 Jun, 2009 1 commit
  30. 30 Mar, 2009 1 commit
  31. 25 Feb, 2009 2 commits
  32. 19 Feb, 2009 1 commit
  33. 26 Jan, 2009 1 commit
  34. 13 Jan, 2009 2 commits
  35. 09 Jan, 2009 1 commit