1. 07 Aug, 2012 2 commits
  2. 06 Aug, 2012 1 commit
  3. 23 Jul, 2012 1 commit
  4. 19 Jul, 2012 1 commit
  5. 17 Jul, 2012 1 commit
  6. 28 Jun, 2012 2 commits
    • Leandro Melo's avatar
      C++: Initialize member · 4557d586
      Leandro Melo authored
      
      
      Change-Id: Ifb708cb875aa1403de66a4c3302f70e0d1b4d2ac
      Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
      4557d586
    • Leandro Melo's avatar
      C++: Parse emit/Q_EMIT properly · 621e5c3d
      Leandro Melo authored
      
      
      The parser now understands emit/Q_EMIT as an expression statement.
      
      Also, the recent fixes in the preprocessor introduced a side-effect
      in the hanlding of code such as: emit signal(); Member signal started
      being treated as a local use (parsed as a declaration) and possibily
      being highlighted as unused variable.
      
      Previously that worked by accident since there was an inconsistency
      in the preprocessor on which only object-like macros were being
      expanded even when the "no expand" flag was set. Then, the code
      mentioned above was being parsed as an expression, what kind of worked.
      
      Change-Id: I47a68ed4c1c1702872620b8ed7c7264fb0997034
      Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
      621e5c3d
  7. 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
        header.
      
      - 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>
      d6ccffc0
  8. 19 Jun, 2012 1 commit
    • Leandro Melo's avatar
      C++: Better handling of arg count mismatch in macros · f978400a
      Leandro Melo authored
      
      
      Do not expand function-like macros at all when there's a mismatch
      in the parameter/argument count.
      
      The report below raises the issue but its expected result is not
      correct. This would be the more appropriate fix.
      
      Task-number: QTCREATORBUG-7225
      Change-Id: Ide8580faa7b724d3e8b396ec1f899cc5ca7f9e7e
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      f978400a
  9. 12 Jun, 2012 1 commit
  10. 06 Jun, 2012 1 commit
    • Leandro Melo's avatar
      C++: Introduce unicode char/strings support · 23c637c4
      Leandro Melo authored
      
      
      Those are the types char16_t and char32_t along with the new
      char/string literals u'', U'', u"", u8"", and U"".
      
      This is particularly important for the use of QStringLiteral
      since in some platforms it relies on expansion such as above.
      
      Note: The string literals quickfixes still need some tunning.
      
      Task-number: QTCREATORBUG-7449
      Change-Id: Iebcfea15677dc8e0ebb6143def89a5477e1be7d4
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      23c637c4
  11. 05 Jun, 2012 2 commits
  12. 01 Jun, 2012 1 commit
    • Leandro Melo's avatar
      C++: Fix macro uses line info · ca7ac8c0
      Leandro Melo authored
      
      
      Make sure the environment line is consistent during preprocessor
      directives and identifier handling so clients can rely on consistent
      information. Particularly important for macro usages.
      
      New tests also added.
      
      Change-Id: I962a39a86cd17b8d945d2959c2c95e2d258ea3e6
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      ca7ac8c0
  13. 30 May, 2012 1 commit
  14. 27 May, 2012 1 commit
    • Thiago Macieira's avatar
      Silence a warning about unrecognised pragma with ICC · e58f203e
      Thiago Macieira authored
      
      
      src/libs/cplusplus/MatchingText.cpp(64): warning #161: unrecognized #pragma
        #    pragma GCC diagnostic ignored "-Wstrict-overflow"
                    ^
      
      This pragma is recognised in GCC only, so don't enable it for when ICC
      fakes to be GCC.
      
      Change-Id: I3d9830dc2b12632dd08d8c8961219bd253ad8c1d
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      e58f203e
  15. 23 May, 2012 2 commits
  16. 07 May, 2012 1 commit
  17. 02 May, 2012 1 commit
  18. 01 May, 2012 1 commit
  19. 30 Apr, 2012 1 commit
  20. 25 Apr, 2012 1 commit
  21. 23 Apr, 2012 1 commit
  22. 22 Apr, 2012 1 commit
  23. 19 Apr, 2012 14 commits