Skip to content
Snippets Groups Projects
  1. Jan 20, 2014
  2. Nov 26, 2013
  3. Nov 12, 2013
  4. Oct 15, 2013
  5. Oct 09, 2013
  6. Aug 21, 2013
  7. Jul 19, 2013
  8. Jun 06, 2013
  9. Apr 19, 2013
  10. Apr 18, 2013
  11. Apr 15, 2013
  12. Apr 09, 2013
  13. Jan 16, 2013
  14. Jan 08, 2013
    • 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
  15. Nov 28, 2012
  16. Nov 07, 2012
  17. Oct 11, 2012
  18. Sep 28, 2012
  19. Sep 25, 2012
  20. Sep 24, 2012
  21. Sep 20, 2012
  22. Sep 19, 2012
  23. Sep 17, 2012
Loading