aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/symbolfinder.h
Commit message (Collapse)AuthorAgeFilesLines
* CppTools: Also look up definitions for variablesChristian Kandeler2020-06-181-0/+3
| | | | | | | | | ... not just functions. This includes global variables and static members. Fixes: QTCREATORBUG-18828 Change-Id: Iee9f83a4f955a859c6fc4038c61997b30afdaec8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Wholesale conversion to #pragma oncehjk2016-03-301-5/+1
| | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* C++: Revert lookup to 3.4.2Nikolai Kosjar2015-11-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...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: 88c5b47e535d91f3db99882d5b50b263b46f223c # CppTools: Minor cleanup in completion tests e5255a1f5cac284c4f0d4a85203878c84da86e85 # CppTools: Add a test for ObjC not replacing dot with arrow 5b12c8d63a30e281274cdc267efabead2c736bd8 # CppTools: Support ObjC in member access operator tests 9fef4fb9ca4e65e20ff13b98bcf15e3c6232fdfb # 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>
* CppTools: Make FollowSymbol respect projectsNikolai Kosjar2015-10-121-6/+7
| | | | | | | | | | | | | | | | | | | | 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>
* C++: Fix lookup for instantiation by class objectOrgad Shaneh2015-05-151-1/+2
| | | | | | Task-number: QTCREATORBUG-14352 Change-Id: I2ce4bc1d0dba2414afe050e80607b581686081a9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Clean exported headers of the CppTools plugin.Friedemann Kleint2015-03-051-2/+9
| | | | | Change-Id: I0144ac33e88980c431c54a6d69bbde28da4b1967 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* CppTools: findMatchingDefinition handles const and volatileLorenz Haas2013-05-151-3/+3
| | | | | | | | | | | Strict set to true, SymbolFinder::findMatchingDefinition will now also check, if const and volatile matches. Changed return type from 'Symbol *' to 'Function *' since only functions are returned. Change-Id: Ib55cb12b6c404e94fcefd0613b964e8caa425690 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Clean headers in CppTools.Friedemann Kleint2013-04-101-1/+0
| | | | | | | | Ran script to remove inludes on a trial-and-error basis and manually corrected it. Change-Id: Ic8464ea084ca1ab401e9f4a7d0183b92b4038902 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* fix include style relating to cplusplus librariesOswald Buddenhagen2013-04-031-2/+2
| | | | | | | | | | | ... and adjust INCLUDEPATH accordingly. while i'm at messing with include statements, also re-order the include blocks according to policy and sort them within bigger blocks. Change-Id: I7762abfd7c4ecf59432b99db2f424e4fa25733a5 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add missing copyright headersTobias Hunger2012-03-051-0/+32
| | | | | Change-Id: I71f9050a7de9c7b07bcd7d96c8e5fc64a8565fb0 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-4/+4
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* C++: Fix "reference" file in symbol finderLeandro Melo2012-01-231-10/+11
| | | | | | | | | | Througout the initial review the singleton was transformed into an ordinary class, but a error was introduced: The "reference" file was incorrectly assumed to be the editors file, which is wrong, since it should be the declaration file. Change-Id: Iad3e25a690fa8bd07a18184b24b10f8dea965332 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Compile fixLeandro Melo2012-01-231-0/+1
| | | | | Change-Id: I22dfa74f8f10a601103b179eb037604d5a747077 Reviewed-by: hjk <qthjk@ovi.com>
* C++: Improve file accuracy when finding symbolsLeandro Melo2012-01-231-0/+55
This patch introduces a priority-based mechanism when searching for certains symbols in the snapshot. The priority corresponds to how similar the file path from the "reference" symbol is to the file path from the "candidate" symbol. This solves a variety of issues when matching "equivalent" symbols but that are in another file/project, such as when following a function declaration, a forward class declaration, or adding a definition through a quickfix. There's now a symbol finder which will compute the "best" search order and cache the most recent results. A consequence is that following symbols in some cases is slower, but not apparently significatly. Note: The "find" functions were moved from the Snapshot to the new SymbolFinder class. Task-number: QTCREATORBUG-6697 Task-number: QTCREATORBUG-6792 Change-Id: Ia518f014275fec1f4d0cb3224bd4e06a9df6d557 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>