1. 20 Oct, 2015 1 commit
  2. 28 Sep, 2015 1 commit
    • Nikolai Kosjar's avatar
      C++: Comment out a flaky test · e241444b
      Nikolai Kosjar authored
      The test relied on logic that was reverted with change
      915f68de.
      
      LookupScopePrivate::findSpecialization() gets a "TemplateNameIdTable
      &specializations" with a non-deterministic order. Without the extra
      logic, the very first entry will be chosen as the found specialization.
      
      The non-deterministic order comes from the TemplateNameId::Compare,
      which calls std::lexicographical_compare() with the template arguments,
      which are FullySpecifiedTypes. The result of
      FullySpecifiedType::operator<() might depend on a pointer comparison.
      
      Change-Id: I8d69d1bb5831145b1c21a5ea848c0043f17ec415
      Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
      e241444b
  3. 23 Sep, 2015 2 commits
  4. 10 Sep, 2015 1 commit
  5. 31 Aug, 2015 1 commit
  6. 21 Aug, 2015 1 commit
  7. 01 Jul, 2015 1 commit
    • Orgad Shaneh's avatar
      C++: Cleanup LookupContext · 7bed5cd3
      Orgad Shaneh authored
      Since the cache is now more reliable, some workarounds and optimizations
      in the instantiation process are not needed anymore.
      
      Also avoid instantiation of base classes when expandTemplates is
      disabled.
      
      As a bonus, we now resolve decltype of template function for a type that is not
      referenced anywhere but in the decltype.
      
      Change-Id: Idf42ba7280992db477c9aa62bb1815b27174594d
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      7bed5cd3
  8. 29 Jun, 2015 3 commits
  9. 09 Jun, 2015 2 commits
    • Orgad Shaneh's avatar
      C++: Support default template argument lookup for specialization · 97d3d9ac
      Orgad Shaneh authored
      This fixes std::vector, although it doesn't really resolve numeric
      template arguments. It just picks the first specialization.
      
      Use-case:
      class Foo {};
      template<class T1 = Foo> class Temp;
      template<> class Temp<Foo> { int var; };
      void func()
      {
          Temp<> t;
          t.var; // var not highlighted
      }
      
      Task-number: QTCREATORBUG-8922
      Change-Id: I593515beb3a6d901b6088db8bc1b8e16c39083d3
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      97d3d9ac
    • Orgad Shaneh's avatar
      C++: Improve accuracy in findSpecialization · 997ab425
      Orgad Shaneh authored
      * If a template type is specialized as a pointer, accept only pointers (of any
      type)
      * Same for references and arrays
      * Only if the specialized type is not part of the template, match it
        against the input.
      
      Fixes resolving of partial specialization with pointers.
      
      Use-cases:
      // 1
      struct b {};
      struct a : b {};
      template<class X, class Y> struct s { float f; };
      template<class X> struct s<X, b*> { int i; };
      template<class X> struct s<X, a*> { char j; };
      
      void f()
      {
          s<int, a*> var;
          var.j; // j not highlighted
      }
      
      // 2
      template <typename T> struct Temp { T variable; };
      template <typename T> struct Temp<T &> { T reference; };
      void func()
      {
          Temp<int&> templ;
          templ.reference; // reference not highlighted
      }
      
      // 3
      class false_type {};
      class true_type {};
      template<class T1, class T2> class and_type { false_type f; };
      template<> class and_type<true_type, true_type> { true_type t; };
      void func2()
      {
          and_type<true_type, false_type> a;
          a.f; // f not highlighted
      }
      
      Task-number: QTCREATORBUG-14036
      Change-Id: Idee5e3f41d15c0772318d3837cbcd442cb80293a
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      997ab425
  10. 04 Jun, 2015 2 commits
  11. 02 Jun, 2015 1 commit
    • Orgad Shaneh's avatar
      C++: Fix lookup for instantiation of using · b67ebf9f
      Orgad Shaneh authored
      Yet another std::vector issue...
      
      Use-cases:
      // Case 1
      template<typename T>
      using type = T;
      
      // Case 2
      struct Parent {
          template<typename T>
          using type = T;
      };
      
      // Case 3
      template<typename T>
      struct ParentT {
          template<typename DT>
          using type = DT;
      };
      
      struct Foo { int bar; };
      
      void func()
      {
          type<Foo> p1;
          Parent::type<Foo> p2;
          ParentT<Foo>::type<Foo> p3;
          // bar not highlighted
          p1.bar;
          p2.bar;
          p3.bar;
      }
      
      Task-number: QTCREATORBUG-14480
      Change-Id: I9ab08ea7360a432c48eb4b85aa0d63e08d2464c1
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      b67ebf9f
  12. 01 Jun, 2015 1 commit
  13. 22 May, 2015 1 commit
  14. 20 May, 2015 2 commits
  15. 15 May, 2015 2 commits
  16. 28 Apr, 2015 1 commit
    • Orgad Shaneh's avatar
      C++: Fix specialization resolution for nested types · ad4cb444
      Orgad Shaneh authored
      Use-cases:
      
      template<typename T>
      struct Traits { typedef typename T::pointer pointer; };
      
      template<typename _Tp>
      struct Traits<_Tp*> { typedef _Tp *pointer; };
      
      struct Foo { int bar; };
      
      // 1
      template<typename T>
      class Temp
      {
      protected:
         typedef Traits<T> TraitsT;
      
      public:
         typedef typename TraitsT::pointer pointer;
         pointer p;
      };
      
      void func()
      {
         Temp<Foo *> t;
         t.p-> // complete
      }
      
      // 2
      class Temp2
      {
      protected:
         typedef Foo *FooPtr;
         typedef Traits<FooPtr> TraitsT;
      
      public:
         typedef typename TraitsT::pointer pointer;
         pointer p;
      };
      
      void func2()
      {
         Temp2 t;
         t.p-> // complete
      }
      
      Task-number: QTCREATORBUG-14141
      Change-Id: Id3459671117c0c81bcde7c9714b42750634c0225
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      ad4cb444
  17. 24 Apr, 2015 2 commits
  18. 23 Apr, 2015 1 commit
  19. 13 Apr, 2015 1 commit
  20. 11 Apr, 2015 1 commit
  21. 01 Apr, 2015 2 commits
  22. 25 Mar, 2015 1 commit
  23. 24 Mar, 2015 1 commit
  24. 13 Mar, 2015 1 commit
  25. 05 Mar, 2015 1 commit
  26. 27 Feb, 2015 1 commit
  27. 26 Feb, 2015 3 commits
  28. 25 Feb, 2015 2 commits