Commit Graph

499 Commits

Author SHA1 Message Date
Christian Kandeler
f900b4e1ba Selection changer autotest: Fix build with namespaced Qt.
Change-Id: Ic9709ac4e76a199bb9fdd7ed231d48d498201de6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-29 15:14:37 +00:00
Alexandru Croitor
bed88818ce C++: Implement context-aware expand / shrink selection actions.
Implement selection expanding / shrinking, that is aware of C++
semantics, thus giving smart selection changing.

Change-Id: I1386a20597fa6bb85c3aa0d8ddfb87cdb3fd7c38
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-29 08:15:03 +00:00
Tobias Hunger
954569387c Update License according to agreement with Free Qt Foundation
* Update license information in tests directory

Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 16:01:06 +00:00
Orgad Shaneh
5be49c5187 C++: Match const/volatile/signed/unsigned for FullySpecifiedType
Changing a function signature from const to non-const is not recognized as a
changed, and doesn't trigger the "Apply Function Signature Changes" quickfix.

For example:
void func(Foo &var);
void func(Foo &var) {} // Add const before Foo, quickfix is not triggered

Change-Id: I71ae41765d66df69204abd085fdfcfcb2d605f4c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-15 14:05:22 +00:00
Andre Hartmann
369b1f7f38 Lexer: Support Microsoft suffix (u)i64
MSVC2010 supports all combinations of upper- and lowercase U/I.

Task-number: QTCREATORBUG-15554
Change-Id: I0106e6b5038a62aebe5a6c1eb0467d693befb4b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-12 05:56:50 +00:00
Orgad Shaneh
9e0631ea79 C++: Add a missing newline in CheckSymbols test
Change-Id: I4c6843b5bae06f09e4b3e41eabb1b3e0e9a8b6a2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-11 09:45:08 +00:00
Orgad Shaneh
ebf26ca125 C++: Support negative enum values
Change-Id: I93dac08a62be467918dbc9f72239d34191a81fd6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-15 09:45:26 +00:00
Nikolai Kosjar
0498fb68ff C++: Revert lookup to 3.4.2
...which was least buggy.

The bugs fixed by the changes we revert here (highlighting/completion
for code involving templates) were minor compared to ones we currently
have. Those bugs will be addressed by the clang code model anyway.

Relevant commits were collected via:

  $ cd ${QTC}/src/libs/cplusplus
  $ git log \
   --no-merges \
   --format=oneline \
   v3.4.2..HEAD \
   -- LookupContext.* ResolveExpression.* TypeResolver.* TypeOfExpression.* \
      ../../plugins/cpptools/cppcompletion_test.cpp

From this list the following were skipped due to irrelevance:

  88c5b47e53 # CppTools: Minor cleanup in completion tests
  e5255a1f5c # CppTools: Add a test for ObjC not replacing dot with arrow
  5b12c8d63a # CppTools: Support ObjC in member access operator tests
  9fef4fb9ca # CPlusPlus: Fix warnings about overriding visit(...) methods

There were only minor conflicts while reverting those.

This changes touches so many files because there were quite some
cleanups and renames after the 3.4.2 release.

Task-number: QTCREATORBUG-14889
Task-number: QTCREATORBUG-15211
Task-number: QTCREATORBUG-15213
Task-number: QTCREATORBUG-15257
Task-number: QTCREATORBUG-15264
Task-number: QTCREATORBUG-15291
Task-number: QTCREATORBUG-15329
Change-Id: I01f759f8f35ecb4228928a4f22086e279c1a5435
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-11-19 14:48:38 +00:00
Lassi Hämäläinen
10e947f65f C++: Fix crashes with the pattern "enum class operator A"
Parser parsed the pattern as an enum declaration the name of
which is a conversion operator. Add check to disallow keywords
after enum-key (enum, enum class, enum struct).
Add tests tst_AST::enumDeclaration and
invalidEnumClassDeclaration.

Task-number: QTCREATORBUG-15341
Change-Id: Ia037f00184c1d7e5b0374f39331bb6748f8d90b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-11-18 15:09:40 +00:00
Adam Strzelecki
9b3723d6f4 CppTools: Do not highlight instantiation as call
Underlying C++ model sometimes marks C++ object instantiation using initializer
as a (forward) function declaration. This leads to incorrect highlighting of
object variables as if they were function calls.

C++ model however marks in this case (and not any other case) such symbols as
ambiguous function types, see CPlusPlus::Bind::visit. This change skips such
ambiguous functions for highlighting as function call.

Also add test case for related bug report.

Task-number: QTCREATORBUG-15212
Change-Id: Ifde8db407f2fa8275a3f991bfa3d3b73eca8c14e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-11-16 10:18:05 +00:00
Orgad Shaneh
0bcddcd014 C++: Limit template instantiation depth
A recursive template generates infinite expansions.

Consider the following example:

template <class R1>
struct Base
{
};

template<typename R>
struct Derived :
  Base<
    typename Derived<typename Base<R>::type>::type,
    typename Derived<typename Base<R>::type>::type
  >::type
{};

R is instantiated as Base<R>::type, which causes another
instantiation of R into Base<Base<R>> etc...

This is not a solution, but a workaround.

Task-number: QTCREATORBUG-15141
Change-Id: Ib04f70275e07919e2cb6c7fb61a2045bd52f4a7d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-11-12 09:40:20 +00:00
Orgad Shaneh
3ab5527a83 C++: Produce copyable debug output in CheckSymbols test
Change-Id: I338352eaf6372316d2dc8f0f3ad961b7e8d8cbdc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-11-12 09:15:49 +00:00
Niels Weber
58804ad823 Fix two typos in comments
Change-Id: Iacb728715b11ca3a9f82d82cca49889eea9dd59b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-11-11 06:56:08 +00:00
Nikolai Kosjar
6b6ad446eb CppTools: Make FollowSymbol respect projects
Finding the class definition for a forward declaration or finding the
function definition from its declaration is mostly determined by the
file iteration order. Documents with the most common path prefix are
checked first.

This works fine as long as the files of your project have a common
ancestor. If that's not the case, FollowSymbol might take you to the
definition within another project.

Fix that issue by considering the project part id when constructing the
file iteration order. Since the cached file iteration order now depends
on the projects, ensure to clear it if projects are added, changed or
removed.

Task-number: QTCREATORBUG-15116
Change-Id: I529166bac363959c9fee0b946747fd0370a88809
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-12 15:08:24 +00:00
Claus Steuer
158b07c9c8 C++: Support noexcept operator
The code model failed to parse the noexcept operator which is often
used in noexcept specifiers, e.g.: "void f() noexcept(noexcept(g()));"
Consequently some c++11 headers such as unordered_map, array
and unordered_set could not be parsed and no code completition was
available. I have created the NoExceptOperatorExpressionAST class
which is created whenever a noexcept token is found in an
expression with operator precedence. The noExcept test case
in the cplusplus/cxx11 test now contains a function that
uses the noexcept operator.

Fixed noexcept operator parsing

Added the test requested by Sergey Shambir, which then revealed that
i had not implemeneted the noexpect operator parsing according to the
c++ specification.
As stated here http://cpp0x.centaur.ath.cx/expr.unary.noexcept.html
the noexcept operator is a unary-expression that contains an
expression (and not a constant-expression). This should now be fixed.

Change-Id: Id4a99a43b660bd83e7680274491d99a698b57094
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-10-03 17:24:45 +00:00
Nikolai Kosjar
8eb30feb03 C++: Add basic tests for raw string literals
Change-Id: I9ca253a6a2296912eafe139ce53f4f9779097248
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-23 07:22:01 +00:00
Nikolai Kosjar
915f68deac C++: Revert problematic template specialization changes
This mainly reverts

    commit 81721f6781
    C++: Fix resolving of recursive typedef

    commit 2070431d8c
    C++: Fix resolving of partial specialization

and some bits of other changes due to dependencies. It also reverts

    commit e0594fc9b9
    C++: Fix expensive lookup for boost

which attempted to solve the upcoming problems.

Task-number: QTCREATORBUG-14741
Task-number: QTCREATORBUG-14889
Task-number: QTCREATORBUG-14962
Change-Id: I3f9e1f97199e5199b71da394fc27051c7709bd1f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-10 12:00:01 +00:00
Nikolai Kosjar
c504e56d0c C++: Fix MSVC assert in std::isspace()
...when dealing with UTF8 bytes.

std::isspace() expects unsigned char, not char.

Change-Id: I3f9b5e347d79cf94015cc99f8797d5feab406151
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-09-02 10:42:43 +00:00
Nikolai Kosjar
42d8672626 C++: Add tests
...for two regressions that were introduced by

    commit e0594fc9b9
    C++: Fix expensive lookup for boost

Change-Id: I1fa01e626da480ca53e04b4709fec458378e7aef
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-08-31 09:26:00 +00:00
Nikolai Kosjar
892cb154b2 C++: Do not let ASTPath calculate line/column for generated tokens
ASTPath uses TranslationUnit::getPosition(), which returns reasonable
results for:

    1. non-expanded tokens
    2. expanded but not generated tokens

The expanded *and* generated tokens case is not handled since there is
no reasonable mapping from generated tokens to a continuous line/column
information. Consider:

    #define DECLARE_FOO int foo; // Multiple generated tokens
    DECLARE_FOO // ...can be mapped to this line, but to which columns?

Since the result where not valid for the expanded and generated case,
ASTPath took the wrong branches. Avoid this by skipping generated
tokens.

Change-Id: I33a2e0f62917f87d691b19feaeef67b09ea8d563
Task-number: QTCREATORBUG-13386
Task-number: QTCREATORBUG-13390
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-31 11:01:02 +00:00
Orgad Shaneh
a77e32800c C++: Ignore explicit template instantiations
Defined in section 14.7.2 of the standard.

Fixes completion for std::string.

The following explicit instantiation appears in bits/basic_string.tcc:
  extern template class basic_string<char>;

This is wrongfully considered a specialization for a forward declaration
(like `template<> class basic_string<char>` is).

Introduce a new Symbol type for explicit instantiations.

Use-case:
template<class T>
struct Foo { T bar; };

template class Foo<int>;

void func()
{
    Foo<int> foo;
    foo.bar; // bar not highlighted
}

Change-Id: I9e35c8c32f6b78fc87b4f4f1fc903b42cfbd2c2b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-29 09:22:08 +00:00
Orgad Shaneh
3fe1b92566 CppTools: Fix highlighting and follow for template using argument
Use-case:
template<class T>
using Foo = Bar<T>; // T not highlighted

Task-number: QTCREATORBUG-9944
Change-Id: I04cb62ea6a21f158f7fb4fb7ac79ccd6eb1bbfbb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 11:31:40 +00:00
Johannes Lorenz
2a966a8917 C++: Support ellipsis on variadic inheritance parsing
Change-Id: I571aefdb1f2aba88ba0c7710f16b6d8ad2e8f5a8
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-02 08:24:17 +00:00
Orgad Shaneh
588b333669 CppTools: Highlight type for templated using
Task-number: QTCREATORBUG-9944
Change-Id: I614571e05039f24b7d56abdddc15f912581f68f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-27 08:29:36 +00:00
Orgad Shaneh
d004b1b616 CppTools: Fix test_cppsourceprocessor_macroUses on Windows
It assumes LF line-endings

Change-Id: I7bfeb4b6d4db2fd6457030e2d21c240534de9cd2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-27 08:29:22 +00:00
Orgad Shaneh
81721f6781 C++: Fix resolving of recursive typedef
Use-case:
template<typename _Tp>
struct Temp { typedef _Tp value_type; };

struct Foo { int bar; };

void func()
{
    Temp<Temp<Foo> >::value_type::value_type *p;
    p->bar; // bar not highlighted
}

Task-number: QTCREATORBUG-14237
Change-Id: Ie0b21b81526d610437ed2d2877083bb929c25047
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-20 11:14:20 +00:00
Orgad Shaneh
372173331c C++: Fix explicit typedef from base type in templated class
Use-case:

struct Foo { int bar; };

template<typename T>
struct Base { typedef T F; };

template<typename T>
struct Derived : Base<T>
{
    typedef typename Base<T>::F F;
    F f;
};

void func()
{
    Derived<Foo> d;
    d.f.bar; // bar not highlighted
}

Task-number: QTCREATORBUG-14218
Change-Id: Ic0b22b2f8adf80ff88a2f8b7359c276a744f89e8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-15 14:22:10 +00:00
Orgad Shaneh
9b30795c02 C++: Fix lookup for instantiation by class object
Task-number: QTCREATORBUG-14352
Change-Id: I2ce4bc1d0dba2414afe050e80607b581686081a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-15 14:21:45 +00:00
Orgad Shaneh
33d270976e C++: Fix highlighting of member on indirect specialization typedef
Missed a spot in ad4cb444fb

Task-number: QTCREATORBUG-14141
Change-Id: I1a6a25ce3e9c2a680e1b8eebec01a17749cdb026
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-05 08:59:28 +00:00
Orgad Shaneh
6a9bd957cb C++: Fix instantiation of typedefed type in block
Use-case:
template<typename T>
struct Temp { T t; };

struct Foo { int bar; };

void func()
{
    typedef Foo *pointer;
    Temp<pointer> temp;
    temp.t->bar; // bar not highlighted
}

Task-number: QTCREATORBUG-14351
Change-Id: I13ca6145a0069bbc7a7207f69b43011c69ec72c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-28 13:54:40 +00:00
Orgad Shaneh
ad4cb444fb C++: Fix specialization resolution for nested types
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: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-28 13:54:25 +00:00
Orgad Shaneh
8a84a7305e C++: Add failing template-related tests to CheckSymbols
Runs much faster than plugin tests.

Change-Id: Ie90d10c7d88b63f36bc00077af67d67e24cb4c50
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-23 08:18:44 +00:00
kai666_73
b30b69bbf3 C++: Find template member access in find usages
Example:
struct Foo {};
struct Bar {
  template <typename T>
  T *templateFunc() { return 0; }
};
struct Test {
  Bar member;
  void testFunc();
};
void Test::testFunc() {
  member.templateFunc<Foo>();   // "templateFunc" and "Foo" outside of FindUsages
}

Change-Id: I0c5109d00c67054fe15b3fb98cf8cbca69123d8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-22 13:17:15 +00:00
Orgad Shaneh
13e3c9bc03 C++: Cleanup long CheckSymbols test
Change-Id: I2d1d75d150e4072e649f77e6e46c9a3256f3194b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-22 11:47:08 +00:00
Orgad Shaneh
cb350bfeb2 C++: Rename ClassOrNamespace -> LookupScope
Change-Id: Ide74482b133dd1fec40a725d9aa81bd749385f37
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-20 14:51:56 +00:00
Orgad Shaneh
29ac9fc65f C++: Remove DeprecatedGenTemplateInstance
It's, well, deprecated...

Change-Id: Ie9d7e80345a8d9404f702dd877b3e940a1a49d93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-04-20 13:37:35 +00:00
Orgad Shaneh
a341094a68 C++: Fix preprocessing of comments within function-like macro
Task-number: QTCREATORBUG-9535
Change-Id: Ifd94f674214314b3694be74cca297ddab873cd8c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-03-13 14:34:07 +00:00
Nikolai Kosjar
4e1d281963 C++: Fix crash on invalid function qualified name
Task-number: QTCREATORBUG-14135
Change-Id: I94e850f729bd3dbf4212960c7a980a1f118030b4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-13 13:21:04 +00:00
Orgad Shaneh
c9b71a268b C++: Provide better output on preprocessor test failure
Make the expected output copyable to the test.

Change-Id: I4fc61682f14d0de054a11d2ffa4a0f36ede0e500
Reviewed-by: Francois Ferrand <thetypz@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-03-13 11:28:11 +00:00
Orgad Shaneh
d63624afe0 C++: Accept language features in BackwardsScanner et al
Change-Id: Id97ca27fa909979573efca12dc0cd14b28eacd17
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-27 15:11:14 +00:00
Francois Ferrand
1336502f58 C++: fix parsing nested C99 designated initializers.
Change-Id: Iaa0e7550abf6be77601b1852652bb3d0731d0323
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-27 14:49:55 +00:00
Przemyslaw Gorszkowski
9e513774b1 C++: resolved self-value reference for enum
Added support for resolving case:
enum E
{
  val1,
  val2 = val1, // val2-4 are not resolved
  val3,
  val4
};

Task-number: QTCREATORBUG-13932
Change-Id: I122c5eb0b0397d6c02bc3db0a5c1ea1c28c5c6e7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-25 15:01:02 +00:00
Adam Strzelecki
425811291d C++: Basic support for C++11 user-defined literals
1. Extends lexer so digit or string can be followed by underscore '_' and
   alphanumeric defining literal.

2. Extends parser so it accepts operator"" _abc(...) user-defined literal
   definition.

3. Adds Token::Flags.userDefinedLiteral bool flag field representing if token
   carries user-defined literal.

4. Adds C++11 auto tests case with: 12_km, 0.5_Pa, 'c'_X, "abd"_L, u"xyz"_M

5. All optional suffix scanning methods now return boolean if the suffix was
   found.

6. Adds C++ Lexer tests for user-defined literals with C++11 feature enabled.

This change however does not make QtCreator understand user-defined literal
semantics, e.g. properly resolve type when applying custom literal operator.

Change-Id: I30e62f025ec9fb11c39261985ea4d772b1a80949
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-17 09:45:34 +00:00
Eike Ziller
56aadc407d Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/debugger/watchhandler.cpp
	src/plugins/projectexplorer/kitmodel.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/shared/qbs

Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
2015-02-12 17:36:29 +01:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Nikolai Kosjar
921ec6da5a C++: Cache parsing of template ids
...in order to stop memory intensive parsing for invalid code.

Parsing the test data/snippet "hard" led to a memory consumption of
about 5.5MB and this could easily get up to hundreds/gigabytes by adding
some more "if_<bool_<true>,\n" lines. With the caching, we are at about
1.0MB, even if more lines are added.

The "memory consumption" was measured with valgrind-massif. The stated
numbers are the reported peaks.

Task-number: QTCREATORBUG-12890
Change-Id: Ie7eb00cfc7915552d29bb27410a6b13a486f486e
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-12 10:40:14 +00:00
Nikolai Kosjar
ae3aa07c4d C++: Remove workaround for crashing if parsing invalid code
This reverts the changes

    commit beac7b9539
    C++: Fix highlighting after "invalid code"

    commit 78ab287fc6
    C++: Stop parsing a declaration after two tries

which were a work around for QTCREATORBUG-12890.

A follow-up patch provides a proper fix.

Task-number: QTCREATORBUG-12890
Change-Id: I2650a8e41c8ff1180cad9f069e463fc51bd2f1b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-12 10:39:51 +00:00
Orgad Shaneh
65e7db42b8 C++: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I6fbe13ddc1485efe95c3156097bf41d90c0febac
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-04 15:27:22 +00:00
Orgad Shaneh
75a943ef57 C++: Fix crash when #if[def] nesting is deeper than 512 levels
Change-Id: I5e86da3a36514545834f554470b147ad8be43344
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-03 12:03:29 +00:00
Nikolai Kosjar
56dab9e931 C++: Check for cycled parents
In the struct _Wrap_alloc (see test code) the rebind struct has
_Wrap_alloc as parent. However, within rebind the typedef of type
_Wrap_alloc has rebind as parent.

We will refactor that in master by introducing a "parent iterator"
class checking for cycles, so the client code looks less noisy.

Task-number: QTCREATORBUG-13703
Change-Id: I7b6cf819ea869139d2403e15ba085d8fba19763e
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-01-23 11:41:36 +01:00