summaryrefslogtreecommitdiff
path: root/tests/auto/cplusplus
Commit message (Collapse)AuthorAgeFilesLines
...
* | C++/CppTools: Pass UTF-8 encoded source to LexerNikolai Kosjar2014-05-231-2/+1
| | | | | | | | | | | | | | | | The Lexer can handle it now. Task-number: QTCREATORBUG-7356 Change-Id: I8c4b03a247656e013d44c3cedca4835e133d4036 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | C++: TranslationUnit::getPosition takes utf16char offsetsNikolai Kosjar2014-05-231-0/+279
| | | | | | | | | | | | | | | | | | ...and not byte offsets anymore. This is necessary in order to calculate the line and column numbers correctly with respect to unicode code points. Change-Id: I5d79857b3eaefeb8d563b4f1e3938a64debc5e08 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | C++: Support for UTF-8 in the lexerNikolai Kosjar2014-05-236-9/+444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will save us toLatin1() conversations in CppTools (which already holds UTF-8 encoded QByteArrays) and thus loss of information (see QTCREATORBUG-7356). It also gives us support for non-latin1 identifiers. API-wise the following functions are added to Token. In follow-up patches these will become handy in combination with QStrings. utf16chars() - aequivalent of bytes() utf16charsBegin() - aequivalent of bytesBegin() utf16charsEnd() - aequivalent of bytesEnd() Next steps: * Adapt functions from TranslationUnit. They should work with utf16 chars in order to calculate lines and columns correctly also for UTF-8 multi-byte code points. * Adapt the higher level clients: * Cpp{Tools,Editor} should expect UTF-8 encoded Literals. * Cpp{Tools,Editor}: When dealing with identifiers on the QString/QTextDocument layer, code points represendet by two QChars need to be respected, too. * Ensure Macro::offsets() and Document::MacroUse::{begin,end}() report offsets usable in CppEditor/CppTools. Addresses QTCREATORBUG-7356. Change-Id: I0791b5236be8215d24fb8e38a1f7cb0d279454c0 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppTools: Fix indentation of stream operators after stringOrgad Shaneh2014-05-161-4/+6
| | | | | | | | | | | | Task-number: QTCREATORBUG-12053 Change-Id: Ia34165d860bd7fd371a84a8349bed7a3fe1c01a9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: Tests: Allow comparing specific members of TokenNikolai Kosjar2014-05-161-69/+92
| | | | | | | | | | | | | | A follow-up patch will enhance this. Change-Id: Ie92ae3542098d8b7c996110152cd83eb85c398e7 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Cleanup whitespaceOrgad Shaneh2014-05-162-4/+4
| | | | | | | | | | | | | | Mostly trailing whitespace Change-Id: Ic324d20e8159c9d255895248ce04f25c692daf46 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | QString(QLatin1String()) -> QString::fromLatin1()Alessandro Portale2014-05-091-5/+5
| | | | | | | | | | Change-Id: I93bdd926ca1c7a37a298335711069d985f1f91dd Reviewed-by: hjk <hjk121@nokiamail.com>
* | Centralize addition of plugin library pathsOrgad Shaneh2014-05-081-1/+0
| | | | | | | | | | Change-Id: I9ddcc193b4d927c3d566eeb81c41f79a75920696 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Nuke plugins PROVIDER settingsOrgad Shaneh2014-05-081-2/+2
| | | | | | | | | | | | | | | | Place all plugins in lib/qtcreator/plugins Change-Id: I66606910104b28d91038f5607850ce03bdd1b80f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | qbs build: Make the autotest template available as an import.Christian Kandeler2014-05-081-2/+2
| | | | | | | | | | | | | | Just like for QtcPlugin, QtcLibrary etc. Change-Id: I395f5863f31abba589864be3ad41ad7fc893787f Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Use double quotes instead of single quotes as per our guidelines.Christian Kandeler2014-04-222-3/+3
| | | | | | | | | | Change-Id: Ib608bb49e26781aef1914085a5d801fcdcd5eb56 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | CppTools: Fix indentation for concatenated stringsOrgad Shaneh2014-03-311-0/+18
| | | | | | | | | | Change-Id: I801a56804e7873be75a9ebc085dc3f4a2d64ea35 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: fix findusage for member of typedefed anonymous structPrzemyslaw Gorszkowski2014-03-311-0/+44
|/ | | | | | | | Task-number: QTCREATORBUG-11859 Task-number: QTCREATORBUG-11860 Change-Id: I7484b3b88daefbb3c76bb86a9b573e8291072872 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: fix support for nested anonymous classPrzemyslaw Gorszkowski2014-03-261-0/+22
| | | | | | | | | | | | The case when anonymous class is inside function. Fixed: * highlighting * completion Task-number: QTCREATORBUG-11711 Change-Id: Ic8fc5fdfb1aed62a74bf148ab7ed449d08214dda Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: nested class in functionPrzemyslaw Gorszkowski2014-03-251-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Case when nested class declaration contains object name for this class. Example: void fun() { struct S { int i; } s; s.i; } Fixes: * highlighting * completion * tests Task-number: QTCREATORBUG-11710 Change-Id: I32e234f57655c388a87a199edc8be750d7bf823f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Fix indent after ">>" in return typeDave Lewis2014-03-251-0/+3
| | | | | | | | | Add case for ">>" token in declaration_start state to prevent falling through to stream_op. Task-number: QTCREATORBUG-9199 Change-Id: I53710be55eff4574de89f9159e95bbc1de2ba34e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Fix indent after template paramsDave Lewis2014-03-251-0/+2
| | | | | | | | Add case for ">>" token when in template_param state. Task-number: QTCREATORBUG-9640 Change-Id: Icc5fc868202d6503d2afd954aa739cd2634cdff1 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: fix support for nested anonymous classesPrzemyslaw Gorszkowski2014-03-121-0/+2
| | | | | | | | | | | | | | | | | | | A member of nested anonymous class should be visible as a member of enclosing class(if there is no declaration of this nested anonymous class). Fix: * marking * find usage * follow symbol * completion Task-number: QTCREATORBUG-10876 Task-number: QTCREATORBUG-11170 Change-Id: If5b4d198e9075f2a8aa899ae59190f2c05f7b1ff Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Record macro uses in #if defined(MACRO)Orgad Shaneh2014-02-271-3/+10
| | | | | Change-Id: I4d99053f540073483c16ce842426bf8cd3def421 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Fix handling of #undefOrgad Shaneh2014-02-271-0/+41
| | | | | | | | | | | * If the macro is defined before, track its reference * Synchronize environment line before calling remove, which currently sets incorrect line * Set macro offset Task-number: QTCREATORBUG-10454 Change-Id: I480d16423a976a025bb8c71046610a46f9d7b0fd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: fix indentation for static var decls of anonymous classes.Erik Verbruggen2014-02-271-0/+38
| | | | | | | Task-number: QTCREATORBUG-11392 Change-Id: Ie5dd9014383b639e63653e8abc856fea9e620e49 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Tests: Record macro definition checkOrgad Shaneh2014-02-271-3/+51
| | | | | Change-Id: Ia2151ead6ba4ad2e2a3598d05dfc24a10e6a7cdb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Fix preprocessing of uncontinued line-escapingOrgad Shaneh2014-02-241-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The following snippet demonstrates the problem: --- snip --- // comment \ #include <something.h> ... class Foo { ... }; --- snap --- If there are >=9 empty/preprocessor lines, the preprocessed source becomes // comment \ # 12 "file.cpp" ... The lexer considers the line marker as a continued C++ comment, and highlighting is broken Change-Id: I30a2fc7d19b279316e9273697179c90d81099573 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Preserve comments after preprocessor directivesOrgad Shaneh2014-02-241-1/+70
| | | | | | Task-number: QTCREATORBUG-11216 Change-Id: Iac10e75f0f5c504b79e8466607dc1f478e578f99 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Preprocessor: Adjust lines also for multiline C++ commentsOrgad Shaneh2014-02-241-0/+16
| | | | | Change-Id: I87d6e76be3030e617603209c3a1b8b3c476cf1f6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Avoid self-includeNikolai Kosjar2014-02-242-0/+2
| | | | | | | | | ...in CPlusPlus::Document due to cyclic includes. Task-number: QTCREATORBUG-11457 Change-Id: I1ca19c901c26d9984d795a61879dd6b41c57096c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Fix indentation in preprocessor testsOrgad Shaneh2014-02-041-79/+79
| | | | | | | Easier to compare when indentation is aligned Change-Id: I216073dc167c0ed785616ae308b566db7f910592 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Fix support for incremental input with \nOrgad Shaneh2014-02-041-3/+27
| | | | | | | | | | | | Also fix false positive line continuation on blank line e.g. "foo \ bar" Change-Id: Ic6d345a4b578c955411d119b8438c8dc5065c072 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Support multiline strings and commentsOrgad Shaneh2014-01-211-5/+149
| | | | | | Task-number: QTCREATORBUG-662 Change-Id: I0997fe2afaba71998d5da549b7141df0c023ff12 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Consolidate with/without comments preprocessor testsOrgad Shaneh2014-01-201-177/+101
| | | | | Change-Id: Ib08569d642da51f6d51bb0763fc95d5a5c13d28c Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Cleanup preprocessor testsOrgad Shaneh2014-01-201-253/+238
| | | | | Change-Id: Ia1b7dee24a3d7e20440dca5040cf9ffdaaf066e2 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Fix debugging of lexer testOrgad Shaneh2014-01-201-4/+7
| | | | | | | | spell() crashes if identifier is not properly created Change-Id: I1c3949c3fed2282d893914fa2922f6c281d1f8cd Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Minor cleanup in lexer testsOrgad Shaneh2014-01-201-21/+23
| | | | | | | Use a typedef for the list Change-Id: Ie921226f9b72fdbedd9926ae166979a4cd1ad540 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Move the textual simplification of container type to debugger againhjk2014-01-085-159/+0
| | | | | | | | This is the only user, and likely will stay so for a while, and eases the linking of the debugger autotests. Change-Id: I822fa892f105a5b7985370b26e50aa94cac74bb3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-0812-12/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-0812-12/+12
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Merge remote-tracking branch 'origin/3.0'Eike Ziller2013-12-181-4/+7
|\ \ | |/ | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/stdtypes.py src/plugins/qmlprofiler/qmlprofilereventsmodelproxy.cpp Change-Id: I5d86746d58960e41e01e725ccb2a6c00890f0dfd
| * C++: Ensure test code is free of diagnostic messages in tst_checksymbols.cppNikolai Kosjar2013-12-161-4/+7
| | | | | | | | | | | | Change-Id: I11b3caf354d57f08268cca7bc2944ca7ae386bfb Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Tests: Rename test function in tst_lexer.cppNikolai Kosjar2013-12-101-4/+4
| | | | | | | | | | | | | | ...to a more generic name since it is not any more limited to doxygen. Change-Id: I0fca5dab9b5ab8850b2cfba5758b51f0451c199d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Merge remote-tracking branch 'origin/3.0'Eike Ziller2013-12-032-56/+1
|\ \ | |/
| * Revert "C++: Fix highlighting for lines with predefined macros"Nikolai Kosjar2013-12-032-56/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This takes too much memory. For qtcreator.pro the numbers are as follows: Patch applied: ~ 1600MB (RES) Patch reverted: ~ 510MB (RES) This reverts commit 4c2daa90ce558c3b4287edc97127471486a411d9. Task-number: QTCREATORBUG-10973 Change-Id: I843bd7c1ea4a26a1ec55ddc14c2a34a98d040922 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | C++: Compile fix for tst_lexerNikolai Kosjar2013-12-031-1/+1
| | | | | | | | | | | | | | | | The trigraph sequence somehow confused qmake. The moc file was not generated. Change-Id: I4016947b5c8efa350d1813737651143d8687d299 Reviewed-by: hjk <hjk121@nokiamail.com>
* | Merge remote-tracking branch 'origin/3.0'Eike Ziller2013-11-292-0/+73
|\ \ | |/
| * C++: Fix highlighting for lines with predefined macrosNikolai Kosjar2013-11-292-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds definitions for the macros __FILE__, __LINE__, __DATE__ and __TIME__ on demand. As a side effect, this also introduces highlighting for the uses of these macros. Task-number: QTCREATORBUG-8036 Change-Id: Ib7546c7d45d2eecbc50c7883fc684e3497154405 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
| * Revert "Preprocessor Enginge: fix bug in pp-engine.cpp"Nikolai Kosjar2013-11-291-0/+18
| | | | | | | | | | | | | | | | | | | | Breaks highlighting for macros using the predefined macros. This reverts commit 1d834c1126dde58dd71e595b3f5e135cc0ca4dbd. Change-Id: Ic13c407e293a806a63ff30153864530df6a32e47 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Merge remote-tracking branch 'origin/3.0'Eike Ziller2013-11-291-18/+0
|\ \ | |/
| * Preprocessor Enginge: fix bug in pp-engine.cppSimon Schäfer2013-11-281-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Preprocessor variables __LINE__,__FILE__,__TIME__,__DATE__ where destroying the following systems when affected variables were standing within the same line with those variables: * highlighting * refactoring * local renaming Task-number: QTCREATORBUG-8036 Change-Id: I1a4b919d15812872ca5a8e63b1031ec1ab144c22 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | CPlusPlus: Fix parsing of ??< ??> ??( ??) trigraphshjk2013-11-271-0/+7
|/ | | | | | | | Almost most useful feature ever. Task-number: QTCREATORBUG-2474 Change-Id: If1ad661fab58ffb4a0b9ddb8ba771f2fde3b54ec Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Support __thread and thread_localOrgad Shaneh2013-11-263-0/+13
| | | | | | | Task-number: QTCREATORBUG-7679 Change-Id: I794f52b2bcfb6c78ceef86ec53b6ed32b3d53d9f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Compile fix for Windows of external cplusplus auto testsNikolai Kosjar2013-11-141-1/+0
| | | | | Change-Id: I6636b6d753db6c80d219755032e6e3915b0dcd55 Reviewed-by: Christian Stenger <christian.stenger@digia.com>