1. 23 May, 2014 2 commits
  2. 15 May, 2014 2 commits
  3. 05 Mar, 2014 1 commit
  4. 27 Feb, 2014 3 commits
  5. 24 Feb, 2014 3 commits
  6. 08 Jan, 2014 1 commit
  7. 03 Dec, 2013 1 commit
  8. 29 Nov, 2013 2 commits
  9. 28 Nov, 2013 1 commit
  10. 10 Oct, 2013 1 commit
  11. 12 Sep, 2013 1 commit
  12. 17 Jul, 2013 1 commit
  13. 11 Jun, 2013 1 commit
    • Erik Verbruggen's avatar
      C++: Fix preprocessor blocked macro bug. · 271c3f45
      Erik Verbruggen authored
      By lexing the first token after a macro call (meaning: the token after
      the closing parenthesis (which was passed to handleFunctionLikeMacro
      which in turn pushed it back into the token buffer)), a token buffer
      might be popped, which unblocks the macro that generated the actual
      param pack. The effect was that if this happens in the expansion of a
      recursive macro (with parameters!), the preprocessor ended up in an
      infinite loop.
      Task-number: QTCREATORBUG-9015
      Task-number: QTCREATORBUG-9447
      Change-Id: I0d83c59188ec15c4a948970e9fa944a17d765475
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
  14. 03 Jun, 2013 1 commit
  15. 30 May, 2013 1 commit
    • Erik Verbruggen's avatar
      C++: do not strip trailing newlines in the preprocessor output. · f2631ad0
      Erik Verbruggen authored
      Doing so resulted in an incorrect position for the EOF token when the
      preprocessed output would be parsed. That in turn leads to incorrect
      insertion positions for refactoring actions.
      This is especially true when a file contains only preprocessor
      directives: the EOF token would point to line 1 column 1, which is
      usually not the place where code should be inserted.
      Change-Id: I7d359aa7a6c04bc52c8b873fd49ad6afc3a77319
      Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
  16. 29 Apr, 2013 1 commit
    • Francois Ferrand's avatar
      C++: fix handling of empty va_args macro arguments. · 4d18710f
      Francois Ferrand authored
      Preprocessor did not correctly handle when variadic macro arguments were not
      provided at all, if there were other arguments: macro was not expanded
      in case only the non variadic arguments were given.
       #define MACRO(...)       used to work fine for 0 or more arguments.
       #define MACRO(ARG0, ...) used to work only for 2 or more arguments, now fixed.
      Change-Id: I64e9199ceccae05618a49931c2adad8e4f9471ba
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
  17. 19 Apr, 2013 1 commit
  18. 16 Apr, 2013 2 commits
  19. 08 Apr, 2013 1 commit
    • Erik Verbruggen's avatar
      C++: pre-allocate the output buffer. · 2d500117
      Erik Verbruggen authored
      This prevents a whole lot of re-allocations when the output byte array
      needs to grow. It also prevents some heap fragmentation for big files.
      Because the preprocessed output is short lived (it will be parsed
      immediately after, and then discarded), it is not squeezed to the
      minimal size. This would result in another allocation.
      Change-Id: I4974be5144f88cdfc4ddc9d8330200725aa90803
      Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
      Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
  20. 03 Apr, 2013 1 commit
  21. 22 Feb, 2013 1 commit
  22. 29 Jan, 2013 1 commit
  23. 18 Jan, 2013 2 commits
    • Erik Verbruggen's avatar
      C++: add include-guard tracking. · dada2614
      Erik Verbruggen authored
      Track the typical #ifndef/#define/#endif usage in header files to see if
      the macro is an include guard. If so, store it in the Document. No
      behavioural change, just recording the name.
      This can be used in the future to track if a file needs to be re-parsed
      when a macro changes: if it was used in the file, and not defined in it
      nor being the include-guard, a file should be re-preprocessed and
      It can also be used to check if two files have the same include guard.
      Change-Id: I2715f529997a7b24a11bdbc6150652e2669f1a46
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
    • Francois Ferrand's avatar
      C++: fix macro calls with comment before arguments · 4c43655c
      Francois Ferrand authored
      When in 'keep comments' mode, the preprocessor does not properly handle macro calls with
      comments between the macro name and the opening parenthesis: "FOO /*something to say*/
      Change-Id: I6fe733242e4d2ccff2985d17399d0a084917415a
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
  24. 11 Jan, 2013 2 commits
  25. 08 Jan, 2013 1 commit
    • Orgad Shaneh's avatar
      Remove braces for single lines of conditions · 29a93998
      Orgad Shaneh authored
      #!/usr/bin/env ruby
      Dir.glob('**/*.cpp') { |file|
        # skip ast (excluding paste, astpath, and canv'ast'imer)
        next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
        s = File.read(file)
        next if s.include?('qlalr')
        orig = s.dup
        s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
          res = $&
          if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
            res.gsub!('} else', 'else')
            res.gsub!(/\n +} *\n/m, "\n")
            res.gsub(/ *{$/, '')
        s.gsub!(/ *$/, '')
        File.open(file, 'wb').write(s) if s != orig
      Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
  26. 20 Dec, 2012 1 commit
  27. 04 Dec, 2012 1 commit
  28. 15 Oct, 2012 1 commit
  29. 05 Oct, 2012 1 commit
  30. 19 Sep, 2012 1 commit