1. 30 Jan, 2013 1 commit
  2. 24 Jan, 2013 1 commit
  3. 16 Jan, 2013 1 commit
  4. 08 Jan, 2013 2 commits
    • Francois Ferrand's avatar
      C++: fix constructor definition parsing. · 5e8c3f4b
      Francois Ferrand authored
      
      
      When a constructor is defined with a single, unnamed argument of a custom type without
      extra type specifiers (const...), then the constructor was not identified as such.
      There was an heuristic in case the constructor was in the class definition, but not if the
      the constructor was defined later.
      
      Examples:
      
      class Arg;
      class Other;
      
      class Foo {
        Foo(Arg /*arg*/);               // working
        Foo(const Arg /*arg*/);         // working
        Foo(int /*arg*/);               // working
        Foo(Other /*arg*/)         {}   // working
      };
      
      Foo::Foo(Arg /*arg*/)        {}   // used not to work, fixed
      Foo::Foo(Arg arg){}               // working
      Foo::Foo(const Arg /*arg*/)  {}   // working
      Foo::Foo(int arg)            {}   // working
      
      Change-Id: I741e4ba62672ddc99a837fdcdc27996fba5ae6c7
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      5e8c3f4b
    • 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
          else
            res.gsub!('} else', 'else')
            res.gsub!(/\n +} *\n/m, "\n")
            res.gsub(/ *{$/, '')
          end
        }
        s.gsub!(/ *$/, '')
        File.open(file, 'wb').write(s) if s != orig
      }
      
      Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      29a93998
  5. 03 Jan, 2013 2 commits
  6. 20 Dec, 2012 1 commit
  7. 06 Dec, 2012 1 commit
  8. 28 Nov, 2012 1 commit
  9. 22 Nov, 2012 1 commit
    • Nikolai Kosjar's avatar
      C++: Clean up dev tools. · d0f3d7cb
      Nikolai Kosjar authored
      
      
      * Add -h and -help options describing the tools and their usage.
      
      * Make the tools compile and run on Windows (MinGW, MSVC).
      
      * Rename project dirs, executables and main source files to more
        meaningful names:
        - Use same base name for project dir, *.pro file, main source file
          and (if applicable) script file.
        - Use the prefix "cplusplus-".
        - The names are now:
            - gen-cpp-ast/generate-ast --> cplusplus-update-frontend
            - mkvisitor --> cplusplus-mkvisitor
            - cplusplus-dump/cplusplus0 --> cplusplus-ast2png
      
      * Get rid of 'c++' shell scripts.
      
      * Get rid of duplicates of 'conf.c++'. Rename to 'pp-configuration.inc'.
      
      * Introduce src/tools/cplusplus-tools-utils containing common stuff
        that is used at least in two tools. 'pp-configuration.inc' can also be
        found here.
      
      * cplusplus-update-frontend:
        - Print file paths of written files to stdout.
        - Convenience: Use default values referencing the appropriate dirs and
          files.
      
      * cplusplus-mkvisitor:
        - Take only one argument, namely the path to AST.h.
        - Convenience: Use default path to AST.h.
      
      * cplusplus-ast2png:
        - Make it run without LD_LIBRARY_PATH.
        - As the name suggests, generate image files in png format (needs
          'dot' from graphviz).
        - Convenience: Read from stdin, which useful for small snippets.
      
      Change-Id: I79c4061fce4a1571c0588dfedd50d4a70715d9df
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      d0f3d7cb
  10. 07 Nov, 2012 1 commit
  11. 31 Oct, 2012 1 commit
  12. 11 Oct, 2012 3 commits
  13. 28 Sep, 2012 1 commit
  14. 25 Sep, 2012 1 commit
  15. 24 Sep, 2012 1 commit
  16. 20 Sep, 2012 1 commit
  17. 19 Sep, 2012 14 commits
  18. 17 Sep, 2012 5 commits
  19. 07 Sep, 2012 1 commit