Commit graph

77 commits

Author SHA1 Message Date
albert-github
7059075d72 Refactoring: Fixing warnings like: Use the "nullptr" literal (3)
Fixing sonar cloud warnings like: Use the "nullptr" literal
Some were missed before or even not reported by sonarcloud
2024-02-20 14:43:42 +01:00
albert-github
0d4551b78a Make SrcLangExt an enum class
Make `SrcLangExt` an `enum class` so no no numbers can be used..
2024-01-14 16:30:55 +01:00
Dimitri van Heesch
ca615835cc
Refactoring: Avoid creating QCString from 0 pointer.
To prepare to migrate from QCString to std::string, 0 pointer initialization
should be avoided as this is undefined behavior for std::string.
2024-01-05 10:59:51 +01:00
albert-github
6b70d803fe Fixing warnings like: Use the "nullptr" literal
Fixing sonar cloud warnings like: `Use the "nullptr" literal`
2023-12-26 12:50:05 +01:00
Dimitri van Heesch
3a40ec2df7
Refactoring: make QCString::length() return size_t type 2023-12-26 09:49:59 +01:00
Dimitri van Heesch
97618c3a50
Refactoring: QCString::resize
Make QCString behavior more similar to std::string
- Replace resize(0) by clear()
- Replace resize(n+1) by resize(n)
- Replace truncate(n) by resize(n)
2023-12-25 14:32:24 +01:00
Dimitri van Heesch
13ca294191
Refactoring: Wrap Entry::section in type safe class EntryType 2023-09-17 22:44:55 +02:00
Dimitri van Heesch
5aef3acd1e
Refactoring: Move class/member specifier bits into own class
Also split off VHDL specifiers as they behave as a enum.
2023-08-27 19:38:40 +02:00
Dimitri van Heesch
cd48e30231
Fixed a number of warnings reported by clang-tidy
Checks: clang-diagnostic-*,clang-analyzer-*
2023-08-01 19:12:48 +02:00
Dimitri van Heesch
503afd0b1a
issue #10104 Incorrect handling of unicode characters 2023-06-09 19:26:15 +02:00
Dimitri van Heesch
04d47a8b55
Merge pull request #10106 from albert-github/feature/bug_vhdl_comment
Corrections for vhdl comment
2023-06-03 20:31:51 +02:00
albert-github
fe6d9b1774 Corrections for vhdl comment
Based on the example from #5454 (comments had to be rewriten due to #10104):
- empty comment blocks (also after removing the `@cond` parts) should not be taken into account at all (otherwise subsequent comments can land in the wrong place).
- the white space before the  vhdl comment (`--!`) should also be removed (otherwise it can lead to code blocs)
2023-05-31 15:51:50 +02:00
albert-github
2ead08011d Adding Parsing file... for vhdl
When parsing files for cpp, python, fortran, we get a line with `Parsing file <fileName"...` but this was not present for vhdl files.
2023-05-31 11:28:28 +02:00
hake
46c84a40d1 fixed bug 9963 2023-05-12 16:09:24 +02:00
Dimitri van Heesch
6ce8be1ae8
Refactoring: replace types uchar/uint/ulong/int64/uint64 by stdint types 2023-01-17 21:08:36 +01:00
Dimitri van Heesch
be08def964
Refactoring: make a couple of global enums scoped 2023-01-01 23:31:03 +01:00
Dimitri van Heesch
0521d3a09b
Revert "Refactoring: Use Compile Time Regular Expressions instead of reg::Ex"
This reverts commit 994ae02d70.

Too many old compilers around that will not be able to compile doxygen
anymore.
2022-12-20 19:24:50 +01:00
Dimitri van Heesch
994ae02d70
Refactoring: Use Compile Time Regular Expressions instead of reg::Ex 2022-12-20 15:00:16 +01:00
Dimitri van Heesch
f6aacfe179
Refactoring: use std::variant for Indices
- Split of IndexIntf and IndexList into indexlist.h
- Used a vector of std::variant to store the indices to avoid virtual
  dispatch (should allow for better compiler optimisation)
- Used dispatch_call helper to implement efficient foreach construct on the index list
  (optimized version std::visit that uses switch on the
   variant's index() instead of a jump table).
- replaced raw FTVNode pointer by std::shared_ptr.
- improve encapsulation of EclipseHelp object by moving details to the
  implementation file
- also used the dispatch_call helper for searchindex which had a
  hardcoded switch per method
2022-05-19 21:59:43 +02:00
albert-github
a07ca8b68a Replace static Config_Get... by just Config_get...
In the past the `Config...` functions did a string lookup and the `static` usage was for speed optimization purposes but nowadays this is not necessary anymore as the "lookup" is done through direct lookup in a `struct`. The `static` is counterproductive as this gives extra thread safe locks.
2022-03-03 11:55:16 +01:00
albert-github
c0ea2b2c46 Warnings Windows 64-bit compilation
On Windows 64-bit compilation we get warnings like:
```
pre.l(3563): warning C4267: 'initializing': conversion from 'size_t' to 'uint', possible loss of data
```
2022-01-24 12:41:06 +01:00
Dimitri van Heesch
592aaa4f17
Refactoring: remove implicit conversion from QCString to const char *
This commit changes the following in relation to string use
- The implicit convert from 'QCString' to 'const char *' is removed
- Strings parameters use 'const QCString &' as much as possible in favor
  over 'const char *'
- 'if (s)' where s is a QCString has been replaced by 'if(!s.isEmpty())'
- data() now always returns a valid C-string and not a 0-pointer.
- when passing a string 's' to printf and related functions 'qPrint(s)' is
  used instead of 's.data()'
- for empty string arguments 'QCString()' is used instead of '0'
- The copy() operation has been removed
- Where possible 'qstrcmp(a,b)==0' has been replaces by 'a==b' and
  'qstrcmp(a,b)<0' has been replaced by 'a<b'
- Parameters of string type that were default initialized with '= 0' are
  no initialized with '= QCString()'
2021-04-22 19:34:13 +02:00
Dimitri van Heesch
00c414f562
Refactoring: make qcstring.h a local include 2021-03-26 20:01:51 +01:00
Dimitri van Heesch
1e77368e15
Refactoring: move qcstring and remove qtools 2021-03-25 22:16:50 +01:00
Dimitri van Heesch
0d05e79d67
Refactoring: Replaced QDir with Dir
- Dir is based on ghc::filesystem, a std::filesystem compatible
  implementation that does not require C++17.
2021-03-18 21:57:40 +01:00
Dimitri van Heesch
3204a2206a
Refactoring: Replaced QFileInfo with FileInfo
- FileInfo is based on ghc::filesystem, a std::filesystem compatible
  implementation that does not require C++17.
2021-03-18 21:57:40 +01:00
Dimitri van Heesch
3d4f0313d2
Refactoring: replaced std::regex with own much faster implementation 2021-03-02 22:35:36 +01:00
Dimitri van Heesch
30d347bf80
Some performance tweaks + remove setting of global locale 2021-02-22 22:12:58 +01:00
Dimitri van Heesch
5114447080
Refactoring: replace QRegExp by std::regex in vhdljjparser.cpp 2021-02-20 20:17:51 +01:00
Dimitri van Heesch
b89561e0c6
Refactoring: cleanup unused qtools headers 2021-01-22 21:45:22 +01:00
Dimitri van Heesch
84e655b1e4
Refactoring: modernize Statistics & time keeping 2021-01-22 21:45:21 +01:00
Dimitri van Heesch
e801f12921
Refactoring: making vhdlcode.l reentrant
Also fixed a few VHDL related memory leaks and one newly introduced
Fortran memory leak.
2020-09-13 16:34:02 +02:00
Dimitri van Heesch
b3fca8f555
More minor tweaks 2020-07-28 10:39:27 +02:00
albert-github
603b2ada84 issue #7923 source line numbers in warnings output by parser are off by 1
Explicit counting of the removed newlines at the beginning of a documenation block (markdown.cpp) so this number can be added to get a better line number in case of warnings.
2020-07-27 12:38:09 +02:00
Dimitri van Heesch
5222bfb61e
Merge pull request #7864 from maddox11/use_plantuml
improve using plantuml for  vhdl flowcharts
2020-07-16 19:53:02 +02:00
Dimitri van Heesch
50fdb591d4
Refactor: Modernize clang parser and make it run with multiple threads 2020-07-16 08:27:29 +02:00
hake
854308535d improve using plantuml for vhdl flowcharts 2020-06-21 15:38:09 +02:00
Dimitri van Heesch
e922facbb9
Refactor: modernize markdown and make it thread-safe 2020-06-16 21:30:41 +02:00
hake
406e1499c3 missing instance-rework 2020-06-03 19:32:11 +02:00
Dimitri van Heesch
1708261ebe
Refactoring: Introduce type names for commonly used container types 2020-05-01 20:34:38 +02:00
Dimitri van Heesch
4658413ff3
Enabled stricter compiler warnings and fixed all new warnings 2020-03-08 14:31:54 +01:00
Dimitri van Heesch
f6cd1a9f2d
Fix compiler warnings on Windows (Visual Studio) 2020-02-12 21:06:53 +01:00
hake
abd887af5c vhdl-fixed-bug-7432 2020-02-04 17:14:38 +01:00
Dimitri van Heesch
8d49c7c40e
Move DocGroup inside CommentScanner instead of using a global 2020-01-26 16:07:32 +01:00
Dimitri van Heesch
9ebe579b8c
Cleanup unused/unwanted parser dependencies on code generator 2020-01-26 14:29:45 +01:00
hake
543a30dfcf fixed some parser bugs,make parser ready for javacc 7.0.5 2020-01-24 16:53:51 +01:00
Dimitri van Heesch
abb7f5372f Fix for potential crash when processing VHDL 2020-01-07 21:13:17 +01:00
Dimitri van Heesch
5b9bf6e354
Make VHDL parser reentrant 2020-01-03 10:36:17 +01:00
Dimitri van Heesch
e55c2248b4
Make commentscan.l reentrant 2019-12-30 19:34:15 +01:00
Dimitri van Heesch
5698b75569
Minor fixes 2019-12-12 22:21:40 +01:00