summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--cmake/Sanitizers/sanitize-helpers.cmake2
-rw-r--r--doc/CMakeLists.txt15
-rwxr-xr-xdoc/changelog.doc32
-rw-r--r--doc/docblocks.doc10
-rw-r--r--doc/language.tpl28
-rw-r--r--doc/translator.py24
-rw-r--r--src/cite.cpp2
-rw-r--r--src/clangparser.cpp19
-rw-r--r--src/classdef.cpp2
-rw-r--r--src/code.l2
-rw-r--r--src/commentscan.l8
-rw-r--r--src/config.xml10
-rw-r--r--src/configimpl.l4
-rw-r--r--src/constexp.y2
-rw-r--r--src/context.cpp4
-rw-r--r--src/define.h2
-rw-r--r--src/doxygen.cpp35
-rw-r--r--src/filedef.cpp8
-rw-r--r--src/markdown.cpp2
-rw-r--r--src/memberdef.cpp44
-rw-r--r--src/memberdef.h4
-rw-r--r--src/membergroup.cpp37
-rw-r--r--src/membergroup.h12
-rw-r--r--src/message.cpp14
-rw-r--r--src/namespacedef.cpp2
-rw-r--r--src/pre.l233
-rw-r--r--src/pyscanner.l4
-rw-r--r--src/translator_sv.h17
-rw-r--r--src/util.cpp78
-rw-r--r--templates/html/doxygen.css4
-rw-r--r--testing/CMakeLists.txt2
32 files changed, 387 insertions, 277 deletions
diff --git a/VERSION b/VERSION
index c8f955a..4ad03d1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.8.19
+1.8.20
diff --git a/cmake/Sanitizers/sanitize-helpers.cmake b/cmake/Sanitizers/sanitize-helpers.cmake
index 3649b07..dd4b898 100644
--- a/cmake/Sanitizers/sanitize-helpers.cmake
+++ b/cmake/Sanitizers/sanitize-helpers.cmake
@@ -106,7 +106,7 @@ function (sanitizer_check_compiler_flags FLAG_CANDIDATES NAME PREFIX)
get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach (LANG ${ENABLED_LANGUAGES})
- # Sanitizer flags are not dependend on language, but the used compiler.
+ # Sanitizer flags are not dependent on language, but the used compiler.
# So instead of searching flags foreach language, search flags foreach
# compiler used.
set(COMPILER ${CMAKE_${LANG}_COMPILER_ID})
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 0a35c27..a094c57 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -93,17 +93,18 @@ if (build_doc_chm)
Doxyfile_chm
)
endif ()
-file(GLOB LANG_FILES "${TOP}/src/translator_??.h")
+
+if (${CMAKE_VERSION} VERSION_EQUAL "3.11.0" OR ${CMAKE_VERSION} VERSION_GREATER "3.11.0")
+ file(GLOB LANG_FILES CONFIGURE_DEPENDS "${TOP}/src//translator_??.h")
+else()
+ file(GLOB LANG_FILES "${TOP}/src//translator_??.h")
+endif()
+
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/man
${PROJECT_BINARY_DIR}/src
${PROJECT_BINARY_DIR}/doc)
-file(COPY ${TOP}/VERSION DESTINATION ${PROJECT_BINARY_DIR}/)
-file(COPY ${TOP}/src/translator.h DESTINATION ${PROJECT_BINARY_DIR}/src/)
-file(COPY ${TOP}/src/translator_adapter.h DESTINATION ${PROJECT_BINARY_DIR}/src/)
-file(COPY ${LANG_FILES} DESTINATION ${PROJECT_BINARY_DIR}/src/)
-
foreach (f ${DOC_FILES})
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/doc/${f}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/doc/${f} ${PROJECT_BINARY_DIR}/doc/
@@ -132,7 +133,7 @@ configure_file(${CMAKE_SOURCE_DIR}/doc/doxyindexer.1 ${PROJECT_BINARY_DIR}/
# doc/language.doc (see tag Doxyfile:INPUT)
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} translator.py ${CMAKE_SOURCE_DIR}
- DEPENDS ${PROJECT_BINARY_DIR}/doc/maintainers.txt ${PROJECT_BINARY_DIR}/doc/language.tpl ${PROJECT_BINARY_DIR}/doc/translator.py
+ DEPENDS ${CMAKE_SOURCE_DIR}/doc/maintainers.txt ${CMAKE_SOURCE_DIR}/doc/language.tpl ${PROJECT_BINARY_DIR}/doc/translator.py ${LANG_FILES}
OUTPUT language.doc
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc
)
diff --git a/doc/changelog.doc b/doc/changelog.doc
index d373487..b5ea41a 100755
--- a/doc/changelog.doc
+++ b/doc/changelog.doc
@@ -2,9 +2,39 @@
\tableofcontents{html,latex}
\section log_1_8 1.8 Series
+\subsection log_1_8_20 Release 1.8.20
+\htmlonly
+<b>(release date 24-08-2020)</b>
+</p>
+<h3>Bug fixes</h3>
+<ul>
+<li>issue #7760: void return type reported as not documented [<a href="https://github.com/doxygen/doxygen/commit/24a6115110e386d5693adc28e3c2fde18b51199c">view</a>]</li>
+<li>issue #7951: Doxywizard 1.8.19 (Windows): Source code directory seems to be ignored [<a href="https://github.com/doxygen/doxygen/commit/40d87c40019d55adf47e1e8ccf766a9d47eb1f79">view</a>]</li>
+<li>issue #7954: The Doxygen uses too much memory (or has probably a memory leak) [<a href="https://github.com/doxygen/doxygen/commit/d4963dfa7d1045479b5add8086b57ea92a179866">view</a>] and [<a href="https://github.com/doxygen/doxygen/commit/1efb1b23ce1547f5a38b7078d5e6ec69cc40f263">view</a>]</li>
+<li>issue #7970: Doxygen doesn&#39;t stop on errors [<a href="https://github.com/doxygen/doxygen/commit/a3410621bdb09e07728faaaf4ebe09f27953c5be">view</a>]</li>
+<li>issue #7973: C++ grouped functions in namespace have disappeard [<a href="https://github.com/doxygen/doxygen/commit/8578e6bead66cae44b61214b3a43f776ed008362">view</a>]</li>
+<li>Improvement of line count for e.g. warnings [<a href="https://github.com/doxygen/doxygen/commit/eb3cb7b93be84b0fdb43ade81616f5523b33cd04">view</a>]</li>
+<li>Improved layout on the bibliography page [<a href="https://github.com/doxygen/doxygen/commit/5aa83d4e5568157d581122e4f4670e604c46c13a">view</a>]</li>
+<li>Updated the swedish language translation to 1.8.19 [<a href="https://github.com/doxygen/doxygen/commit/03d3bbce2a0e481ac08e6e01aca42d2fcd920f3e">view</a>]</li>
+</ul>
+<h3>Features</h3>
+<ul>
+<li>add configuration setting to have docstrings not as preformatted text but as normal documentation [<a href="https://github.com/doxygen/doxygen/commit/66cf0cf586dd6adc8aea1a1139233c865315f40b">view</a>]</li>
+</ul>
+<h3>Refactoring and cleanup</h3>
+<ul>
+<li>Format for size_t (in e.g. warnings) [<a href="https://github.com/doxygen/doxygen/commit/2f426ac495f4234b97649a591314fe695691cf99">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/61738cd5b380a03b51aabdb3a6d6369229d53ee4">view</a>]</li>
+<li>Spelling corrections [<a href="https://github.com/doxygen/doxygen/commit/a2104f7015f90315621c9c1896bdf1cb56f7ab4d">view</a>], [<a href="https://github.com/doxygen/doxygen/commit/1dc1acd5e1a639f61a431e0ff6ebbd8edd96de64">view</a>], and [<a href="https://github.com/doxygen/doxygen/commit/fc5c31bed5b2bd7db70d93028adf36970ec89492">view</a>]</li>
+<li>Minor tweaks to clangparser.cpp [<a href="https://github.com/doxygen/doxygen/commit/c4ed324b4a834e7442956521be51936014e0fc9d">view</a>]</li>
+<li>Building documentation after changing language files [<a href="https://github.com/doxygen/doxygen/commit/f7bd440af03ef881d1b4b8ec891cebf9e9728eed">view</a>]</li>
+</ul>
+<p>
+\endhtmlonly
+
\subsection log_1_8_19 Release 1.8.19
\htmlonly
<b>(release date 08-08-2020)</b>
+</p>
<h3>Bug fixes</h3>
<ul>
<li>issue #6846: Doxygen parsing global variable as function in certain cases (#7903) [<a href="https://github.com/doxygen/doxygen/commit/8c02f1e963682edfebfd0da619c65112cf30448b">view</a>]</li>
@@ -178,7 +208,7 @@
<li>sqlite: flip _static default in bindTextParameter [<a href="https://github.com/doxygen/doxygen/commit/ee9a4679ae630f8f808619c5450f6b2f5a860994">view</a>]</li>
<li>sqlite: use err instead of term :) [<a href="https://github.com/doxygen/doxygen/commit/27307c2a16139b657697ee7cb79e7d8989fbc95c">view</a>]</li>
<li>try to make it so that argumentList is always from the definition [<a href="https://github.com/doxygen/doxygen/commit/dface804388013579f408d0baf01aa2739993317">view</a>]</li>
-<li>update URLS on README to prevent redirects [<a href="https://github.com/doxygen/doxygen/commit/28469fb1386797795a4c56ca7b75309df7ae48d6">view</a>]</ul>
+<li>update URLS on README to prevent redirects [<a href="https://github.com/doxygen/doxygen/commit/28469fb1386797795a4c56ca7b75309df7ae48d6">view</a>]</li>
</ul>
<p>
\endhtmlonly
diff --git a/doc/docblocks.doc b/doc/docblocks.doc
index 6c1edae..96a2621 100644
--- a/doc/docblocks.doc
+++ b/doc/docblocks.doc
@@ -450,7 +450,7 @@ the script can be found in the path set via \ref cfg_example_path "EXAMPLE_PATH"
\subsection pythonblocks Comment blocks in Python
For Python there is a standard way of documenting the code using
-so called documentation strings. Such strings are stored in \c __doc__
+so called documentation strings (<tt>"""</tt>). Such strings are stored in \c __doc__
and can be retrieved at runtime. Doxygen will extract such comments
and assume they have to be represented in a preformatted way.
@@ -464,8 +464,12 @@ and assume they have to be represented in a preformatted way.
for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen.
\endlatexonly
-Note that in this case none of doxygen's \ref cmd_intro "special commands"
-are supported.
+\note When using <tt>\"\"\"</tt> none of doxygen's \ref cmd_intro "special commands"
+are supported and the text is shown as verbatim text see \ref cmdverbatim "\\verbatim".
+To have the doxygen's \ref cmd_intro "special commands" and have the text as regular
+documentation instead of <tt>\"\"\"</tt> use <tt>\"\"\"!</tt> or set
+\ref cfg_python_docstring "PYTHON_DOCSTRING" to \c NO in the configuration file.
+\note Instead of <tt>\"\"\"</tt> one can also use <tt>'''</tt>.
There is also another way to document Python code using comments that
start with "##". These type of comment blocks are more in line with the
diff --git a/doc/language.tpl b/doc/language.tpl
index 9e334c6..4728007 100644
--- a/doc/language.tpl
+++ b/doc/language.tpl
@@ -106,28 +106,12 @@ Just follow the following steps:
See the HTML specification for the codes.
</ul>
</ul>
-<li>
- <ul>
- <li>On *nix systems:<br>
- <ul>
- <li>Rerun the `configure` script from the root (i.e. in the \c doxygen directory) so
- that it generates `doxygen/src/lang_cfg.h`.
- This file should now contain a \c \#define for your language code.<br>
- <li>Run \c make again from the root (i.e. in the \c doxygen
- directory) of the distribution, in order to regenerate the `Makefile`s.
- </ul>
- <li> On Windows:<br>
- <ul>
- <li>stop Visual Stdio<br>
- <li>open a command window<br>
- <li>goto the directory `doxygen\src`<br>
- <li>give the command `python languages.py > ..\winbuild\Languages.rules`<br>
- <li>close the command window<br>
- <li>start Visual Studio again<br>
- <li>Your language should now be selectable in the `General` part of the `Settings` of the `Properties`
- window of `lang_cfg.py`, by default Your language will be `on`. Rebuild `doxygen` (and `doxywizard`) now.
- </ul>
- </ul>
+<li>Edit <code>doxygen/doc/maintainers.txt</code> and add yourself to the list of maintainers like:
+ \code
+ TranslatorYourLanguage
+ <your name>: <your dot email at your dot domain>
+ \endcode
+<li>Build the documentation by giving the appropriate build command (like: `make docs`).
<li>Now you can use <code>OUTPUT_LANGUAGE = your_language_name</code>
in the config file to generate output in your language.
<li>Send <code>translator_xx.h</code> to me so I can add it to doxygen.
diff --git a/doc/translator.py b/doc/translator.py
index c04a367..c4c75ef 100644
--- a/doc/translator.py
+++ b/doc/translator.py
@@ -1231,10 +1231,14 @@ class TrManager:
self.src_path = os.path.join(self.doxy_path, 'src')
# Normally the original sources aren't in the current directory
# (as we are in the build directory) so we have to specify the
- # original source directory.
+ # original source /documentation / ... directory.
self.org_src_path = self.src_path
+ self.org_doc_path = self.doc_path
+ self.org_doxy_path = self.doxy_path
if (len(sys.argv) > 1 and os.path.isdir(os.path.join(sys.argv[1], 'src'))):
self.org_src_path = os.path.join(sys.argv[1], 'src')
+ self.org_doc_path = os.path.join(sys.argv[1], 'doc')
+ self.org_doxy_path = sys.argv[1]
# Get the explicit arguments of the script.
self.script_argLst = sys.argv[2:]
else:
@@ -1290,7 +1294,7 @@ class TrManager:
# The translator.h must exist (the Transl object will check it),
# create the object for it and let it build the dictionary of
# required methods.
- tr = Transl(os.path.join(self.src_path, 'translator.h'), self)
+ tr = Transl(os.path.join(self.org_src_path, 'translator.h'), self)
self.requiredMethodsDic = tr.collectPureVirtualPrototypes()
tim = tr.getmtime()
if tim > self.lastModificationTime:
@@ -1298,7 +1302,7 @@ class TrManager:
# The translator_adapter.h must exist (the Transl object will check it),
# create the object for it and store the reference in the dictionary.
- tr = Transl(os.path.join(self.src_path, 'translator_adapter.h'), self)
+ tr = Transl(os.path.join(self.org_src_path, 'translator_adapter.h'), self)
self.adaptMethodsDic = tr.collectAdapterPrototypes()
tim = tr.getmtime()
if tim > self.lastModificationTime:
@@ -1310,11 +1314,11 @@ class TrManager:
if self.script_argLst:
lst = ['translator_' + x + '.h' for x in self.script_argLst]
for fname in lst:
- if not os.path.isfile(os.path.join(self.src_path, fname)):
+ if not os.path.isfile(os.path.join(self.org_src_path, fname)):
sys.stderr.write("\a\nFile '%s' not found!\n" % fname)
sys.exit(1)
else:
- lst = os.listdir(self.src_path)
+ lst = os.listdir(self.org_src_path)
lst = [x for x in lst if x[:11] == 'translator_'
and x[-2:] == '.h'
and x != 'translator_adapter.h']
@@ -1323,7 +1327,7 @@ class TrManager:
# content of the file. Then insert the object to the dictionary
# accessed via classId.
for fname in lst:
- fullname = os.path.join(self.src_path, fname)
+ fullname = os.path.join(self.org_src_path, fname)
tr = Transl(fullname, self)
tr.processing()
assert(tr.classId != 'Translator')
@@ -1402,7 +1406,7 @@ class TrManager:
self.numLang -= 1 # the couple will be counted as one
# Extract the version of Doxygen.
- f = xopen(os.path.join(self.doxy_path, 'VERSION'))
+ f = xopen(os.path.join(self.org_doxy_path, 'VERSION'))
self.doxVersion = f.readline().strip()
f.close()
@@ -1557,7 +1561,7 @@ class TrManager:
# The e-mail addresses of the maintainers will be collected to
# the auxiliary file in the order of translator classes listed
# in the translator report.
- fmail = xopen('mailto.txt', 'w')
+ fmail = xopen(os.path.join(self.doc_path, 'mailto.txt'), 'w')
# Write the list of "up-to-date" translator classes.
if self.upToDateIdLst:
@@ -1720,7 +1724,7 @@ class TrManager:
Fills the dictionary classId -> [(name, e-mail), ...]."""
- fname = os.path.join(self.doc_path, self.maintainersFileName)
+ fname = os.path.join(self.org_doc_path, self.maintainersFileName)
# Include the maintainers file to the group of files checked with
# respect to the modification time.
@@ -1775,7 +1779,7 @@ class TrManager:
# Check the last modification time of the template file. It is the
# last file from the group that decide whether the documentation
# should or should not be generated.
- fTplName = os.path.join(self.doc_path, self.languageTplFileName)
+ fTplName = os.path.join(self.org_doc_path, self.languageTplFileName)
tim = os.path.getmtime(fTplName)
if tim > self.lastModificationTime:
self.lastModificationTime = tim
diff --git a/src/cite.cpp b/src/cite.cpp
index fd6fe3e..03bdb02 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -211,7 +211,7 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
{
QCString crossrefName = line.mid((uint)(j+1),(uint)(k-j-1));
// check if the reference with the cross reference is used
- // insert cross refererence when cross reference has not yet been added.
+ // insert cross reference when cross reference has not yet been added.
if ((p->entries.find(citeName.data())!=p->entries.end()) &&
(p->entries.find(crossrefName.data())==p->entries.end())) // not found yet
{
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
index 955b56b..1ac9138 100644
--- a/src/clangparser.cpp
+++ b/src/clangparser.cpp
@@ -121,7 +121,7 @@ class ClangTUParser::Private
: parser(p), fileDef(fd) {}
const ClangParser &parser;
const FileDef *fileDef;
- CXIndex index;
+ CXIndex index = 0;
uint curToken = 0;
DetectedLang detectedLang = DetectedLang::Cpp;
uint numFiles = 0;
@@ -145,6 +145,7 @@ class ClangTUParser::Private
ClangTUParser::ClangTUParser(const ClangParser &parser,const FileDef *fd)
: p(std::make_unique<Private>(parser,fd))
{
+ //printf("ClangTUParser::ClangTUParser() this=%p\n",this);
}
StringVector ClangTUParser::filesInSameTU() const
@@ -154,6 +155,7 @@ StringVector ClangTUParser::filesInSameTU() const
void ClangTUParser::parse()
{
+ //printf("ClangTUParser::parse() this=%p\n",this);
QCString fileName = p->fileDef->absFilePath();
p->fileDef->getAllIncludeFilesRecursively(p->filesInSameTU);
//printf("ClangTUParser::ClangTUParser(fileName=%s,#filesInSameTU=%d)\n",
@@ -164,8 +166,12 @@ void ClangTUParser::parse()
const StringVector &clangOptions = Config_getList(CLANG_OPTIONS);
if (!clangAssistedParsing) return;
//printf("ClangParser::start(%s)\n",fileName);
+ assert(p->index==0);
+ assert(p->tokens==0);
+ assert(p->numTokens==0);
p->index = clang_createIndex(0, 0);
p->curToken = 0;
+ p->cursors.clear();
int argc=0;
size_t clang_option_len = 0;
std::vector<clang::tooling::CompileCommand> command;
@@ -289,7 +295,7 @@ void ClangTUParser::parse()
// free arguments
for (i=0;i<argc;++i)
{
- free(argv[i]);
+ delete[](argv[i]);
}
free(argv);
@@ -309,16 +315,13 @@ void ClangTUParser::parse()
}
else
{
- p->tokens = 0;
- p->numTokens = 0;
- p->cursors.clear();
err("clang: Failed to parse translation unit %s\n",qPrint(fileName));
}
}
ClangTUParser::~ClangTUParser()
{
- //printf("ClangTUParser::~ClangTUParser() tu=%p\n",p->tu);
+ //printf("ClangTUParser::~ClangTUParser() this=%p\n",this);
static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return;
if (p->tu)
@@ -333,7 +336,7 @@ ClangTUParser::~ClangTUParser()
}
for (uint i=0;i<p->numFiles;i++)
{
- free((void *)p->ufs[i].Filename);
+ delete[] p->ufs[i].Filename;
}
p->ufs.clear();
p->sources.clear();
@@ -343,7 +346,7 @@ ClangTUParser::~ClangTUParser()
void ClangTUParser::switchToFile(FileDef *fd)
{
- //printf("ClangTUParser::switchToFile(%s)\n",qPrint(fd->absFilePath()));
+ //printf("ClangTUParser::switchToFile(%s) this=%p\n",qPrint(fd->absFilePath()),this);
if (p->tu)
{
p->cursors.clear();
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 5dee0dc..c3cd3ee 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -4416,7 +4416,7 @@ void ClassDefImpl::addMemberToList(MemberListType lt,MemberDef *md,bool isBrief)
ml->append(md);
// for members in the declaration lists we set the section, needed for member grouping
- if ((ml->listType()&MemberListType_detailedLists)==0) md->setSectionList(ml);
+ if ((ml->listType()&MemberListType_detailedLists)==0) md->setSectionList(this,ml);
}
void ClassDefImpl::sortMemberLists()
diff --git a/src/code.l b/src/code.l
index ddeca01..6627498 100644
--- a/src/code.l
+++ b/src/code.l
@@ -571,7 +571,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
// absPath = QDir::cleanDirPath(yyextra->sourceFileDef->getPath()+"/"+absPath);
//}
- FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,yytext,ambig);
+ const FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,yytext,ambig);
//printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd);
if (fd && fd->isLinkable())
{
diff --git a/src/commentscan.l b/src/commentscan.l
index d695f0a..5a71b14 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -440,7 +440,6 @@ static void addCite(yyscan_t yyscanner);
//-----------------------------------------------------------------------------
-
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
@@ -860,7 +859,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
else // yyextra->inContext==OutputBrief
{ // only go to the detailed description if we have
// found some brief description and not just whitespace
- endBrief(yyscanner,FALSE);
+ endBrief(yyscanner,TRUE);
}
lineCount(yyscanner);
}
@@ -2128,8 +2127,8 @@ static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringLis
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->inContext!=OutputBrief)
{
- addOutput(yyscanner,"\n\n"); // treat @details outside brief description
- // as a new paragraph
+ addOutput(yyscanner,"\\ilinebr\\ilinebr "); // treat @details outside brief description
+ // as a new paragraph
}
setOutput(yyscanner,OutputDoc);
return FALSE;
@@ -3235,6 +3234,7 @@ bool CommentScanner::parseCommentBlock(/* in */ OutlineParserInterface *pars
yyextra->guards = std::stack<GuardedSection>();
yyextra->langParser = parser;
yyextra->current = curEntry;
+ yyextra->current->docLine = (lineNr > 1 ? lineNr-1: 1);
if (comment.isEmpty()) return FALSE; // avoid empty strings
yyextra->inputString = comment;
yyextra->inputString.append(" ");
diff --git a/src/config.xml b/src/config.xml
index 29f4068..b3718be 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -513,6 +513,16 @@ Go to the <a href="commands.html">next</a> section or return to the
]]>
</docs>
</option>
+ <option type='bool' id='PYTHON_DOCSTRING' defval='1'>
+ <docs>
+<![CDATA[
+ By default Python docstrings are displayed as preformatted text
+ and doxygen's special commands cannot be used. By setting \c PYTHON_DOCSTRING to
+ \c NO the doxygen's special commands can be used and the contents of the docstring
+ documentation blocks is shown as doxygen documentation.
+]]>
+ </docs>
+ </option>
<option type='bool' id='INHERIT_DOCS' defval='1'>
<docs>
<![CDATA[
diff --git a/src/configimpl.l b/src/configimpl.l
index 25fa78b..ed23a12 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -1189,13 +1189,13 @@ static QCString configFileToString(const char *name)
if (fileOpened)
{
const int bSize=4096;
- QCString contents(bSize);
+ QCString contents(bSize+1);
int totalSize=0;
int size;
while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
{
totalSize+=bSize;
- contents.resize(totalSize+bSize);
+ contents.resize(totalSize+bSize+1);
}
totalSize+=size+2;
contents.resize(totalSize);
diff --git a/src/constexp.y b/src/constexp.y
index 100614a..c4110f9 100644
--- a/src/constexp.y
+++ b/src/constexp.y
@@ -29,7 +29,7 @@ int constexpYYerror(yyscan_t yyscanner, const char *s)
{
struct constexpYY_state* yyextra = constexpYYget_extra(yyscanner);
warn(yyextra->constExpFileName, yyextra->constExpLineNr,
- "preprocessing issue while doing constant expression evaluation: %s",s);
+ "preprocessing issue while doing constant expression evaluation: %s: input='%s'",s,yyextra->inputString);
return 0;
}
diff --git a/src/context.cpp b/src/context.cpp
index 3bdead3..29a704a 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -1071,7 +1071,7 @@ class TranslateContext::Private
s_inst.addProperty("namespaceList", &Private::namespaceList);
//%% string namespaceMembers
s_inst.addProperty("namespaceMembers", &Private::namespaceMembers);
- //%% srting fileList
+ //%% string fileList
s_inst.addProperty("fileList", &Private::fileList);
//%% string fileMembers
s_inst.addProperty("fileMembers", &Private::fileMembers);
@@ -9238,7 +9238,7 @@ class InheritedMemberInfoListContext::Private : public GenericNodeListContext
MemberDef *md;
for (li.toFirst();(md=li.current());++li)
{
- if (lt==md->getSectionList()->listType() &&
+ if (lt==md->getSectionList(mg->container())->listType() &&
!md->isReimplementedBy(inheritedFrom) &&
md->isBriefSectionVisible())
{
diff --git a/src/define.h b/src/define.h
index 015d399..23da59d 100644
--- a/src/define.h
+++ b/src/define.h
@@ -45,7 +45,7 @@ class Define
};
/** List of all macro definitions */
-using DefineList = std::vector< std::unique_ptr<Define> >;
+using DefineList = std::vector<Define>;
using DefinesPerFileList = std::unordered_map< std::string, DefineList >;
#endif
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 0fb5c59..4b5c267 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -3680,17 +3680,18 @@ static void transferFunctionReferences()
{
MemberDef *mdef=0,*mdec=0;
/* find a matching function declaration and definition for this function */
- for (const auto &md : *mn)
+ for (const auto &md_p : *mn)
{
+ MemberDef *md = md_p.get();
if (md->isPrototype())
- mdec=md.get();
+ mdec=md;
else if (md->isVariable() && md->isExternal())
- mdec=md.get();
+ mdec=md;
if (md->isFunction() && !md->isStatic() && !md->isPrototype())
- mdef=md.get();
+ mdef=md;
else if (md->isVariable() && !md->isExternal() && !md->isStatic())
- mdef=md.get();
+ mdef=md;
if (mdef && mdec) break;
}
@@ -7708,23 +7709,23 @@ static void buildDefineList()
for (const auto &def : it->second)
{
std::unique_ptr<MemberDef> md { createMemberDef(
- def->fileName,def->lineNr,def->columnNr,
- "#define",def->name,def->args,0,
+ def.fileName,def.lineNr,def.columnNr,
+ "#define",def.name,def.args,0,
Public,Normal,FALSE,Member,MemberType_Define,
ArgumentList(),ArgumentList(),"") };
- if (!def->args.isEmpty())
+ if (!def.args.isEmpty())
{
- md->moveArgumentList(stringToArgumentList(SrcLangExt_Cpp, def->args));
+ md->moveArgumentList(stringToArgumentList(SrcLangExt_Cpp, def.args));
}
- md->setInitializer(def->definition);
- md->setFileDef(def->fileDef);
- md->setDefinition("#define "+def->name);
+ md->setInitializer(def.definition);
+ md->setFileDef(def.fileDef);
+ md->setDefinition("#define "+def.name);
- MemberName *mn=Doxygen::functionNameLinkedMap->add(def->name);
- if (def->fileDef)
+ MemberName *mn=Doxygen::functionNameLinkedMap->add(def.name);
+ if (def.fileDef)
{
- def->fileDef->insertMember(md.get());
+ def.fileDef->insertMember(md.get());
}
mn->push_back(std::move(md));
}
@@ -9142,7 +9143,7 @@ static void parseFilesMultiThreading(const std::shared_ptr<Entry> &root)
{
numThreads = std::thread::hardware_concurrency();
}
- msg("Processing input using %lu threads.\n",numThreads);
+ msg("Processing input using %zu threads.\n",numThreads);
ThreadPool threadPool(numThreads);
using FutureType = std::vector< std::shared_ptr<Entry> >;
std::vector< std::future< FutureType > > results;
@@ -9237,7 +9238,7 @@ static void parseFilesMultiThreading(const std::shared_ptr<Entry> &root)
#endif
{
std::size_t numThreads = std::thread::hardware_concurrency();
- msg("Processing input using %lu threads.\n",numThreads);
+ msg("Processing input using %zu threads.\n",numThreads);
ThreadPool threadPool(numThreads);
using FutureType = std::shared_ptr<Entry>;
std::vector< std::future< FutureType > > results;
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 658023b..15fd1e5 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -2050,17 +2050,11 @@ void FileDefImpl::addMemberToList(MemberListType lt,MemberDef *md)
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
((ml->listType()&MemberListType_documentationLists) && sortMemberDocs));
ml->append(md);
-#if 0
- if (ml->needsSorting())
- ml->inSort(md);
- else
- ml->append(md);
-#endif
if (lt&MemberListType_documentationLists)
{
ml->setInFile(TRUE);
}
- if (ml->listType()&MemberListType_declarationLists) md->setSectionList(ml);
+ if (ml->listType()&MemberListType_declarationLists) md->setSectionList(this,ml);
}
void FileDefImpl::sortMemberLists()
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 78e6a85..00c0723 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -194,7 +194,7 @@ Markdown::Markdown(const char *fileName,int lineNr,int indentLevel)
enum Alignment { AlignNone, AlignLeft, AlignCenter, AlignRight };
-//---------- contants -------
+//---------- constants -------
//
const uchar g_utf8_nbsp[3] = { 0xc2, 0xa0, 0}; // UTF-8 nbsp
const char *g_doxy_nsbp = "&_doxy_nbsp;"; // doxygen escape command for UTF-8 nbsp
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 312e13e..464dbd0 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -75,7 +75,7 @@ class MemberDefImpl : public DefinitionImpl, public MemberDef
virtual const QCString &initializer() const;
virtual int initializerLines() const;
virtual uint64 getMemberSpecifiers() const;
- virtual const MemberList *getSectionList() const;
+ virtual const MemberList *getSectionList(const Definition *) const;
virtual QCString displayDefinition() const;
virtual const ClassDef *getClassDef() const;
virtual ClassDef *getClassDef();
@@ -251,7 +251,7 @@ class MemberDefImpl : public DefinitionImpl, public MemberDef
virtual void setBitfields(const char *s);
virtual void setMaxInitLines(int lines);
virtual void setMemberClass(ClassDef *cd);
- virtual void setSectionList(MemberList *sl);
+ virtual void setSectionList(const Definition *container,MemberList *sl);
virtual void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0);
@@ -418,8 +418,8 @@ class MemberDefAliasImpl : public DefinitionAliasImpl, public MemberDef
{ return getMdAlias()->initializerLines(); }
virtual uint64 getMemberSpecifiers() const
{ return getMdAlias()->getMemberSpecifiers(); }
- virtual const MemberList *getSectionList() const
- { return getMdAlias()->getSectionList(); }
+ virtual const MemberList *getSectionList(const Definition *container) const
+ { return getMdAlias()->getSectionList(container); }
virtual QCString displayDefinition() const
{ return getMdAlias()->displayDefinition(); }
virtual const ClassDef *getClassDef() const
@@ -763,7 +763,7 @@ class MemberDefAliasImpl : public DefinitionAliasImpl, public MemberDef
virtual void setBitfields(const char *s) {}
virtual void setMaxInitLines(int lines) {}
virtual void setMemberClass(ClassDef *cd) {}
- virtual void setSectionList(MemberList *sl) {}
+ virtual void setSectionList(const Definition *c,MemberList *sl) {}
virtual void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0) {}
@@ -4051,34 +4051,14 @@ void MemberDefImpl::warnIfUndocumented() const
}
}
-static QCString removeReturnTypeKeywords(const QCString &s)
-{
- QCString result = s;
- bool done;
- do
- {
- done=true;
- if (result.stripPrefix("constexpr ") ||
- result.stripPrefix("consteval ") ||
- result.stripPrefix("virtual ") ||
- result.stripPrefix("static ") ||
- result.stripPrefix("volatile "))
- {
- done=false;
- }
- }
- while (!done);
- return result;
-}
-
void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const
{
if (!Config_getBool(WARN_NO_PARAMDOC)) return;
- QCString returnType = removeReturnTypeKeywords(typeString());
+ QCString returnType = typeString();
bool isPython = getLanguage()==SrcLangExt_Python;
bool isFortran = getLanguage()==SrcLangExt_Fortran;
bool isFortranSubroutine = isFortran && returnType.find("subroutine")!=-1;
- bool isVoidReturn = returnType=="void";
+ bool isVoidReturn = (returnType=="void") || (returnType.right(5)==" void");
if (!m_impl->hasDocumentedParams && hasParamCommand)
{
@@ -4469,18 +4449,18 @@ void MemberDefImpl::addListReference(Definition *)
getOutputFileBase()+"#"+anchor(),memName,memArgs,pd);
}
-const MemberList *MemberDefImpl::getSectionList() const
+const MemberList *MemberDefImpl::getSectionList(const Definition *container) const
{
- const Definition *d= resolveAlias()->getOuterScope();
+ const Definition *d = container;
char key[20];
sprintf(key,"%p",(void*)d);
return (d!=0 && m_impl->classSectionSDict) ? m_impl->classSectionSDict->find(key) : 0;
}
-void MemberDefImpl::setSectionList(MemberList *sl)
+void MemberDefImpl::setSectionList(const Definition *container,MemberList *sl)
{
- //printf("MemberDefImpl::setSectionList(%p,%p) name=%s\n",d,sl,name().data());
- const Definition *d= resolveAlias()->getOuterScope();
+ //printf("MemberDefImpl::setSectionList(%s,%p) name=%s\n",d->name().data(),sl,name().data());
+ const Definition *d= container;
char key[20];
sprintf(key,"%p",(void*)d);
if (m_impl->classSectionSDict==0)
diff --git a/src/memberdef.h b/src/memberdef.h
index 4a488d9..f15c31e 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -73,7 +73,7 @@ class MemberDef : virtual public Definition
virtual const QCString &initializer() const = 0;
virtual int initializerLines() const = 0;
virtual uint64 getMemberSpecifiers() const = 0;
- virtual const MemberList *getSectionList() const = 0;
+ virtual const MemberList *getSectionList(const Definition *container) const = 0;
virtual QCString displayDefinition() const = 0;
// scope query members
@@ -297,7 +297,7 @@ class MemberDef : virtual public Definition
virtual void setBitfields(const char *s) = 0;
virtual void setMaxInitLines(int lines) = 0;
virtual void setMemberClass(ClassDef *cd) = 0;
- virtual void setSectionList(MemberList *sl) = 0;
+ virtual void setSectionList(const Definition *container,MemberList *sl) = 0;
virtual void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0) = 0;
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 523b577..e229835 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -29,33 +29,14 @@
#include "entry.h"
#include "md5.h"
-//static QCString idToName(int id)
-//{
-// QCString result;
-// result.sprintf("mgroup_%d",id);
-// return result;
-//}
-
-MemberGroup::MemberGroup()
-{
-}
-
-MemberGroup::MemberGroup(int id,const char *hdr,const char *d,const char *docFile,int docLine)
+MemberGroup::MemberGroup(const Definition *container,int id,const char *hdr,const char *d,const char *docFile,int docLine)
+ : m_container(container), grpId(id), grpHeader(hdr), doc(d), m_docFile(docFile), m_docLine(docLine)
{
static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList = new MemberList(MemberListType_memberGroup);
memberList->setNeedsSorting(sortBriefDocs); // detailed sections are already sorted elsewhere.
- grpId = id;
- grpHeader = hdr;
- doc = d;
- inSameSection = TRUE;
- inDeclSection = 0;
- m_numDecMembers = -1;
- m_numDocMembers = -1;
- m_docFile = docFile;
- m_docLine = docLine;
//printf("Member group docs='%s'\n",doc.data());
}
@@ -74,13 +55,14 @@ void MemberGroup::insertMember(MemberDef *md)
// md,md->name().data());
MemberDef *firstMd = memberList->getFirst();
- if (inSameSection && firstMd && firstMd->getSectionList()!=md->getSectionList())
+ if (inSameSection && firstMd &&
+ firstMd->getSectionList(m_container)!=md->getSectionList(m_container))
{
inSameSection=FALSE;
}
else if (inDeclSection==0)
{
- inDeclSection = const_cast<MemberList*>(md->getSectionList());
+ inDeclSection = const_cast<MemberList*>(md->getSectionList(m_container));
//printf("inDeclSection=%p type=%d\n",inDeclSection,inDeclSection->listType());
}
memberList->append(md);
@@ -125,6 +107,7 @@ void MemberGroup::writePlainDeclarations(OutputList &ol,
void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
const Definition *container,bool showEnumValues,bool showInline) const
{
+ //printf("MemberGroup::writeDocumentation() %s\n",grpHeader.data());
memberList->writeDocumentation(ol,scopeName,container,0,showEnumValues,showInline);
}
@@ -149,7 +132,7 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,const ClassDef *cd,
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList()->listType());
- const MemberList *ml = md->getSectionList();
+ const MemberList *ml = md->getSectionList(m_container);
if (ml && lt==ml->listType())
{
MemberList mml(lt);
@@ -169,7 +152,7 @@ int MemberGroup::countGroupedInheritedMembers(MemberListType lt)
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList()->listType());
- const MemberList *ml = md->getSectionList();
+ const MemberList *ml = md->getSectionList(m_container);
if (ml && lt==ml->listType())
{
count++;
@@ -202,6 +185,10 @@ void MemberGroup::countDocMembers()
memberList->countDocMembers();
}
+const Definition *MemberGroup::container() const
+{
+ return m_container;
+}
int MemberGroup::countInheritableMembers(const ClassDef *inheritedFrom) const
{
diff --git a/src/membergroup.h b/src/membergroup.h
index 3b8e0fc..c10e421 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -42,8 +42,8 @@ class RefItem;
class MemberGroup
{
public:
- MemberGroup();
- MemberGroup(int id,const char *header,
+ //MemberGroup();
+ MemberGroup(const Definition *container,int id,const char *header,
const char *docs,const char *docFile,int docLine);
~MemberGroup();
QCString header() const { return grpHeader; }
@@ -78,6 +78,7 @@ class MemberGroup
int numDecEnumValues() const;
int numDocMembers() const;
int numDocEnumValues() const;
+ const Definition *container() const;
int countInheritableMembers(const ClassDef *inheritedFrom) const;
void setInGroup(bool b);
@@ -90,17 +91,16 @@ class MemberGroup
int docLine() const { return m_docLine; }
private:
+ const Definition *m_container;
MemberList *memberList = 0; // list of all members in the group
MemberList *inDeclSection = 0;
int grpId = 0;
QCString grpHeader;
QCString fileName; // base name of the generated file
QCString doc;
- bool inSameSection = 0;
- int m_numDecMembers = 0;
- int m_numDocMembers = 0;
+ bool inSameSection = true;
QCString m_docFile;
- int m_docLine = 0;
+ int m_docLine;
RefItemVector m_xrefListItems;
};
diff --git a/src/message.cpp b/src/message.cpp
index 37204f5..984a00f 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -161,6 +161,18 @@ static void format_warn(const char *file,int line,const char *text)
}
}
+static void handle_warn_as_error(void)
+{
+ static bool warnAsError = Config_getBool(WARN_AS_ERROR);
+ if (warnAsError)
+ {
+ std::unique_lock<std::mutex> lock(g_mutex);
+ QCString msgText = " (warning treated as error, aborting now)\n";
+ fwrite(msgText.data(),1,msgText.length(),warnFile);
+ exit(1);
+ }
+}
+
static void do_warn(bool enabled, const char *file, int line, const char *prefix, const char *fmt, va_list args)
{
if (!enabled) return; // warning type disabled
@@ -230,6 +242,7 @@ void warn_uncond(const char *fmt, ...)
va_start(args, fmt);
vfprintf(warnFile, (QCString(warning_str) + fmt).data(), args);
va_end(args);
+ handle_warn_as_error();
}
void err(const char *fmt, ...)
@@ -238,6 +251,7 @@ void err(const char *fmt, ...)
va_start(args, fmt);
vfprintf(warnFile, (QCString(error_str) + fmt).data(), args);
va_end(args);
+ handle_warn_as_error();
}
extern void err_full(const char *file,int line,const char *fmt, ...)
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 6e0b45c..88eea5d 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -1483,7 +1483,7 @@ void NamespaceDefImpl::addMemberToList(MemberListType lt,MemberDef *md)
if (ml->listType()&MemberListType_declarationLists)
{
- md->setSectionList(ml);
+ md->setSectionList(this,ml);
}
}
diff --git a/src/pre.l b/src/pre.l
index ff04162..e36d1ec 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -109,7 +109,7 @@ struct PreIncludeInfo
};
/** A dictionary of managed Define objects. */
-typedef std::map< std::string,std::unique_ptr<Define> > DefineMapOwning;
+typedef std::map< std::string, Define > DefineMap;
/** @brief Class that manages the defines available while
* preprocessing files.
@@ -130,39 +130,44 @@ class DefineManager
{
m_includedFiles.insert(fileName);
}
- void store(const DefineMapOwning &fromMap)
+ void store(const DefineMap &fromMap)
{
for (auto &kv : fromMap)
{
- m_defines.emplace(kv.first,std::make_unique<Define>(*kv.second.get()));
+ m_defines.emplace(kv.first,kv.second);
}
+ //printf(" m_defines.size()=%zu\n",m_defines.size());
+ m_stored=true;
}
- void retrieve(DefineMapOwning &toMap)
+ void retrieve(DefineMap &toMap)
{
StringSet includeStack;
retrieveRec(toMap,includeStack);
}
- void retrieveRec(DefineMapOwning &toMap,StringSet &includeStack)
+ void retrieveRec(DefineMap &toMap,StringSet &includeStack)
{
+ //printf(" retrieveRec #includedFiles=%zu\n",m_includedFiles.size());
for (auto incFile : m_includedFiles)
{
DefinesPerFile *dpf = m_parent->find(incFile);
if (dpf && includeStack.find(incFile)==includeStack.end())
{
- //printf(" processing include %s\n",incFile.data());
includeStack.insert(incFile);
dpf->retrieveRec(toMap,includeStack);
+ //printf(" retrieveRec: processing include %s: #toMap=%zu\n",incFile.data(),toMap.size());
}
}
for (auto &kv : m_defines)
{
- toMap.emplace(kv.first,std::make_unique<Define>(*kv.second.get()));
+ toMap.emplace(kv.first,kv.second);
}
}
+ bool stored() const { return m_stored; }
private:
DefineManager *m_parent;
- DefineMapOwning m_defines;
+ DefineMap m_defines;
StringSet m_includedFiles;
+ bool m_stored = false;
};
friend class DefinesPerFile;
@@ -170,16 +175,19 @@ class DefineManager
void addInclude(std::string fromFileName,std::string toFileName)
{
+ //printf("DefineManager::addInclude('%s'->'%s')\n",fromFileName.c_str(),toFileName.c_str());
auto it = m_fileMap.find(fromFileName);
- if (it!=m_fileMap.end())
+ if (it==m_fileMap.end())
{
- auto &dpf = it->second;
- dpf->addInclude(toFileName);
+ it = m_fileMap.emplace(fromFileName,std::make_unique<DefinesPerFile>(this)).first;
}
+ auto &dpf = it->second;
+ dpf->addInclude(toFileName);
}
- void store(std::string fileName,const DefineMapOwning &fromMap)
+ void store(std::string fileName,const DefineMap &fromMap)
{
+ //printf("DefineManager::store(%s,#=%zu)\n",fileName.c_str(),fromMap.size());
auto it = m_fileMap.find(fileName);
if (it==m_fileMap.end())
{
@@ -188,7 +196,7 @@ class DefineManager
it->second->store(fromMap);
}
- void retrieve(std::string fileName,DefineMapOwning &toMap)
+ void retrieve(std::string fileName,DefineMap &toMap)
{
auto it = m_fileMap.find(fileName);
if (it!=m_fileMap.end())
@@ -196,11 +204,17 @@ class DefineManager
auto &dpf = it->second;
dpf->retrieve(toMap);
}
+ //printf("DefineManager::retrieve(%s,#=%zu)\n",fileName.c_str(),toMap.size());
}
bool alreadyProcessed(std::string fileName) const
{
- return m_fileMap.find(fileName)!=m_fileMap.end();
+ auto it = m_fileMap.find(fileName);
+ if (it!=m_fileMap.end())
+ {
+ return it->second->stored();
+ }
+ return false;
}
private:
@@ -277,6 +291,7 @@ struct preYY_state
yy_size_t fenceSize = 0;
bool ccomment = false;
QCString delimiter;
+ bool isSpecialComment = false;
StringVector pathList;
IntMap argMap;
BoolStack levelGuard;
@@ -285,7 +300,8 @@ struct preYY_state
std::unordered_map<std::string,Define*> expandedDict;
StringUnorderedSet expanded;
ConstExpressionParser constExpParser;
- DefineMapOwning contextDefines;
+ DefineMap contextDefines; // macros imported from other files
+ DefineMap localDefines; // macros defined in this file
DefineList macroDefinitions;
LinkedMap<PreIncludeInfo> includeRelations;
};
@@ -1131,7 +1147,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<SkipCComment>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
bool markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
- if (!markdownSupport)
+ if (!markdownSupport || !yyextra->isSpecialComment)
{
REJECT;
}
@@ -1144,7 +1160,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<SkipCComment>^({B}*"*"+)?{B}{0,3}"```"[`]* {
bool markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
- if (!markdownSupport)
+ if (!markdownSupport || !yyextra->isSpecialComment)
{
REJECT;
}
@@ -1543,7 +1559,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
{
// now that the file is completely processed, prevent it from processing it again
g_defineManager.addInclude(yyextra->yyFileName.str(),toFileName.str());
- g_defineManager.store(toFileName.str(),yyextra->contextDefines);
+ g_defineManager.store(toFileName.str(),yyextra->localDefines);
}
else
{
@@ -1553,10 +1569,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
}
+ // move the local macros definitions for in this file to the translation unit context
+ for (const auto &kv : yyextra->localDefines)
+ {
+ auto pair = yyextra->contextDefines.insert(kv);
+ if (!pair.second) // define already in context -> replace with local version
+ {
+ yyextra->contextDefines.erase(pair.first);
+ yyextra->contextDefines.insert(kv);
+ }
+ }
+ yyextra->localDefines.clear();
}
}
<*>"/*"/"*/" |
-<*>"/*"[*]? {
+<*>"/*"[*!]? {
if (YY_START==SkipVerbatim || YY_START==SkipCond)
{
REJECT;
@@ -1566,11 +1593,19 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputArray(yyscanner,yytext,(int)yyleng);
yyextra->lastCContext=YY_START;
yyextra->commentCount=1;
- if (yyleng==3) yyextra->lastGuardName.resize(0); // reset guard in case the #define is documented!
+ if (yyleng==3)
+ {
+ yyextra->isSpecialComment = true;
+ yyextra->lastGuardName.resize(0); // reset guard in case the #define is documented!
+ }
+ else
+ {
+ yyextra->isSpecialComment = false;
+ }
BEGIN(SkipCComment);
}
}
-<*>"//"[/]? {
+<*>"//"[/!]? {
if (YY_START==SkipVerbatim || YY_START==SkipCond || getLanguageFromFileName(yyextra->yyFileName)==SrcLangExt_Fortran)
{
REJECT;
@@ -1579,7 +1614,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
{
outputArray(yyscanner,yytext,(int)yyleng);
yyextra->lastCPPContext=YY_START;
- if (yyleng==3) yyextra->lastGuardName.resize(0); // reset guard in case the #define is documented!
+ if (yyleng==3)
+ {
+ yyextra->isSpecialComment = true;
+ yyextra->lastGuardName.resize(0); // reset guard in case the #define is documented!
+ }
+ else
+ {
+ yyextra->isSpecialComment = false;
+ }
BEGIN(SkipCPPComment);
}
}
@@ -2676,29 +2719,29 @@ static QCString expandMacro(yyscan_t yyscanner,const QCString &name)
static void addDefine(yyscan_t yyscanner)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- std::unique_ptr<Define> def = std::make_unique<Define>();
- def->name = state->defName;
- def->definition = state->defText.stripWhiteSpace();
- def->nargs = state->defArgs;
- def->fileName = state->yyFileName;
- def->fileDef = state->yyFileDef;
- def->lineNr = state->yyLineNr-state->yyMLines;
- def->columnNr = state->yyColNr;
- def->varArgs = state->defVarArgs;
- //printf("newDefine: %s %s file: %s\n",def->name.data(),def->definition.data(),
- // def->fileDef ? def->fileDef->name().data() : def->fileName.data());
- //printf("newDefine: '%s'->'%s'\n",def->name.data(),def->definition.data());
- if (!def->name.isEmpty() &&
- Doxygen::expandAsDefinedSet.find(def->name.str())!=Doxygen::expandAsDefinedSet.end())
+ Define def;
+ def.name = state->defName;
+ def.definition = state->defText.stripWhiteSpace();
+ def.nargs = state->defArgs;
+ def.fileName = state->yyFileName;
+ def.fileDef = state->yyFileDef;
+ def.lineNr = state->yyLineNr-state->yyMLines;
+ def.columnNr = state->yyColNr;
+ def.varArgs = state->defVarArgs;
+ //printf("newDefine: %s %s file: %s\n",def.name.data(),def.definition.data(),
+ // def.fileDef ? def.fileDef->name().data() : def.fileName.data());
+ //printf("newDefine: '%s'->'%s'\n",def.name.data(),def.definition.data());
+ if (!def.name.isEmpty() &&
+ Doxygen::expandAsDefinedSet.find(def.name.str())!=Doxygen::expandAsDefinedSet.end())
{
- def->isPredefined=TRUE;
+ def.isPredefined=TRUE;
}
- auto it = state->contextDefines.find(def->name.str());
- if (it!=state->contextDefines.end()) // redefine
+ auto it = state->localDefines.find(def.name.str());
+ if (it!=state->localDefines.end()) // redefine
{
- state->contextDefines.erase(it);
+ state->localDefines.erase(it);
}
- state->contextDefines.insert(std::make_pair(toStdString(def->name),std::move(def)));
+ state->localDefines.insert(std::make_pair(def.name.str(),def));
}
static void addMacroDefinition(yyscan_t yyscanner)
@@ -2707,13 +2750,13 @@ static void addMacroDefinition(yyscan_t yyscanner)
if (state->skip) return; // do not add this define as it is inside a
// conditional section (cond command) that is disabled.
- auto define = std::make_unique<Define>();
- define->fileName = state->yyFileName;
- define->lineNr = state->yyLineNr - state->yyMLines;
- define->columnNr = state->yyColNr;
- define->name = state->defName;
- define->args = state->defArgsStr;
- define->fileDef = state->inputFileDef;
+ Define define;
+ define.fileName = state->yyFileName;
+ define.lineNr = state->yyLineNr - state->yyMLines;
+ define.columnNr = state->yyColNr;
+ define.name = state->defName;
+ define.args = state->defArgsStr;
+ define.fileDef = state->inputFileDef;
QCString litText = state->defLitText;
int l=litText.find('\n');
@@ -2734,14 +2777,14 @@ static void addMacroDefinition(yyscan_t yyscanner)
QCString litTextStripped = state->defLitText.stripWhiteSpace();
if (litTextStripped.contains('\n')>=1)
{
- define->definition = litText;
+ define.definition = litText;
}
else
{
- define->definition = litTextStripped;
+ define.definition = litTextStripped;
}
{
- state->macroDefinitions.push_back(std::move(define));
+ state->macroDefinitions.push_back(define);
}
}
@@ -2837,6 +2880,11 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
//printf("calling findFile(%s)\n",incFileName.data());
if ((fs=findFile(yyscanner,incFileName,localInclude,alreadyProcessed))) // see if the include file can be found
{
+ {
+ std::lock_guard<std::mutex> lock(g_globalDefineMutex);
+ g_defineManager.addInclude(oldFileName.str(),absIncFileName.str());
+ }
+
//printf("Found include file!\n");
if (Debug::isFlagSet(Debug::Preprocessor))
{
@@ -2844,7 +2892,7 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
{
Debug::print(Debug::Preprocessor,0," ");
}
- //msg("#include %s: parsing...\n",incFileName.data());
+ Debug::print(Debug::Preprocessor,0,"#include %s: parsing...\n",incFileName.data());
}
if (state->includeStack.empty() && oldFileDef)
@@ -2893,6 +2941,7 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
// in the local context
{
std::lock_guard<std::mutex> lock(g_globalDefineMutex);
+ g_defineManager.addInclude(state->yyFileName.str(),absIncFileName.str());
g_defineManager.retrieve(absIncFileName.str(),state->contextDefines);
}
@@ -2915,6 +2964,10 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
if (Debug::isFlagSet(Debug::Preprocessor))
{
+ for (i=0;i<state->includeStack.size();i++)
+ {
+ Debug::print(Debug::Preprocessor,0," ");
+ }
if (alreadyProcessed)
{
Debug::print(Debug::Preprocessor,0,"#include %s: already processed! skipping...\n",qPrint(incFileName));
@@ -2929,7 +2982,6 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
{
warn(state->yyFileName,state->yyLineNr,"include file %s not found, perhaps you forgot to add its directory to INCLUDE_PATH?",incFileName.data());
}
-
}
}
}
@@ -3084,17 +3136,30 @@ static void unputChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uin
static Define *isDefined(yyscan_t yyscanner,const char *name)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- Define *d=0;
- auto it = state->contextDefines.find(name);
- if (it!=state->contextDefines.end())
+
+ bool undef = false;
+ auto findDefine = [&undef,&name](DefineMap &map)
{
- d = it->second.get();
- if (d->undef)
+ Define *d=0;
+ auto it = map.find(name);
+ if (it!=map.end())
{
- d=0;
+ d = &it->second;
+ if (d->undef)
+ {
+ undef=true;
+ d=0;
+ }
}
+ return d;
+ };
+
+ Define *def = findDefine(state->localDefines);
+ if (def==0 && !undef)
+ {
+ def = findDefine(state->contextDefines);
}
- return d;
+ return def;
}
static void initPredefined(yyscan_t yyscanner,const char *fileName)
@@ -3168,15 +3233,15 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName)
QCString dname = ds.left(i_obrace);
if (!dname.isEmpty())
{
- std::unique_ptr<Define> def = std::make_unique<Define>();
- def->name = dname;
- def->definition = definition;
- def->nargs = count;
- def->isPredefined = TRUE;
- def->nonRecursive = nonRecursive;
- def->fileDef = state->yyFileDef;
- def->fileName = fileName;
- state->contextDefines.insert(std::make_pair(toStdString(def->name),std::move(def)));
+ Define def;
+ def.name = dname;
+ def.definition = definition;
+ def.nargs = count;
+ def.isPredefined = TRUE;
+ def.nonRecursive = nonRecursive;
+ def.fileDef = state->yyFileDef;
+ def.fileName = fileName;
+ state->contextDefines.insert(std::make_pair(def.name.str(),def));
//printf("#define '%s' '%s' #nargs=%d\n",
// def->name.data(),def->definition.data(),def->nargs);
@@ -3189,26 +3254,26 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName)
) // predefined non-function macro definition
{
//printf("predefined normal macro '%s'\n",defStr);
- std::unique_ptr<Define> def = std::make_unique<Define>();
+ Define def;
if (i_equals==-1) // simple define without argument
{
- def->name = ds;
- def->definition = "1"; // substitute occurrences by 1 (true)
+ def.name = ds;
+ def.definition = "1"; // substitute occurrences by 1 (true)
}
else // simple define with argument
{
int ine=i_equals - (nonRecursive ? 1 : 0);
- def->name = ds.left(ine);
- def->definition = ds.right(ds.length()-i_equals-1);
+ def.name = ds.left(ine);
+ def.definition = ds.right(ds.length()-i_equals-1);
}
- if (!def->name.isEmpty())
+ if (!def.name.isEmpty())
{
- def->nargs = -1;
- def->isPredefined = TRUE;
- def->nonRecursive = nonRecursive;
- def->fileDef = state->yyFileDef;
- def->fileName = fileName;
- state->contextDefines.insert(std::make_pair(toStdString(def->name),std::move(def)));
+ def.nargs = -1;
+ def.isPredefined = TRUE;
+ def.nonRecursive = nonRecursive;
+ def.fileDef = state->yyFileDef;
+ def.fileName = fileName;
+ state->contextDefines.insert(std::make_pair(def.name.str(),def));
}
}
}
@@ -3322,7 +3387,11 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
Debug::print(Debug::Preprocessor,0,"---------\n");
for (auto &kv : yyextra->contextDefines)
{
- Debug::print(Debug::Preprocessor,0,"%s ",qPrint(kv.second->name));
+ Debug::print(Debug::Preprocessor,0,"%s ",qPrint(kv.second.name));
+ }
+ for (auto &kv : yyextra->localDefines)
+ {
+ Debug::print(Debug::Preprocessor,0,"%s ",qPrint(kv.second.name));
}
Debug::print(Debug::Preprocessor,0,"\n---------\n");
}
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 017cc03..d7996b4 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -1682,7 +1682,7 @@ static void initTriDoubleQuoteBlock(yyscan_t yyscanner)
yyextra->docBlockContext = YY_START;
yyextra->docBlockInBody = FALSE;
yyextra->docBlockJavaStyle = TRUE;
- yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
+ yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!' || !Config_getBool(PYTHON_DOCSTRING);
yyextra->docBlock.resize(0);
yyextra->commentIndent = yyextra->curIndent;
yyextra->doubleQuote = TRUE;
@@ -1695,7 +1695,7 @@ static void initTriSingleQuoteBlock(yyscan_t yyscanner)
yyextra->docBlockContext = YY_START;
yyextra->docBlockInBody = FALSE;
yyextra->docBlockJavaStyle = TRUE;
- yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
+ yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!' || !Config_getBool(PYTHON_DOCSTRING);
yyextra->docBlock.resize(0);
yyextra->commentIndent = yyextra->curIndent;
yyextra->doubleQuote = FALSE;
diff --git a/src/translator_sv.h b/src/translator_sv.h
index 434f670..bc63870 100644
--- a/src/translator_sv.h
+++ b/src/translator_sv.h
@@ -67,10 +67,13 @@ Problem!
Deprecated: nån hygglig svensk översättning???
Skicka gärna synpunkter.
+
2015/01/09
* Uppdaterat den till senaste versionen 1.8.9.1
+
2015/09/12
* Fixat lite särksirvningar och inkonsekvenser
+
2020/01/08
* Uppdaterat den till senaste språkversionen 1.8.15
@@ -87,6 +90,11 @@ Changed Deprecated from Föråldrad to Obsolet
The VHDL translations may not perfect, as I only used it once before.
I left use clause untouched as I didn't find a suitable translation for it.
+2020/08/14
+* Uppdaterat översättningarna till 1.8.19
+English:
+* Updated the language translation to 1.8.19
+
===================================================================================
Ordlista
===================================================================================
@@ -143,7 +151,7 @@ I left use clause untouched as I didn't find a suitable translation for it.
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
-class TranslatorSwedish : public TranslatorAdapter_1_8_19
+class TranslatorSwedish : public Translator
{
public:
@@ -2334,6 +2342,13 @@ class TranslatorSwedish : public TranslatorAdapter_1_8_19
return "Datamedlemsdokumentation";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.19
+//////////////////////////////////////////////////////////////////////////
+
+ /** VHDL design unit documentation */
+ virtual QCString trDesignUnitDocumentation()
+ { return "Designenhetsdokumentation"; }
};
#endif
diff --git a/src/util.cpp b/src/util.cpp
index 3075d1b..acc6098 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -377,7 +377,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
return result;
}
}
- MemberDef *md=0;
+ const MemberDef *md=0;
while (mContext && md==0)
{
// step 1: get the right scope
@@ -422,17 +422,18 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
if (mn)
{
int minDist=-1;
- for (const auto &tmd : *mn)
+ for (const auto &tmd_p : *mn)
{
+ const MemberDef *tmd = tmd_p.get();
//printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
// tmd->name().data(), resScope->name().data(),
// tmd->getOuterScope()->name().data(), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
{
- int dist=isAccessibleFrom(resScope,0,tmd.get());
+ int dist=isAccessibleFrom(resScope,0,tmd);
if (dist!=-1 && (md==0 || dist<minDist))
{
- md = tmd.get();
+ md = tmd;
minDist = dist;
}
}
@@ -2503,13 +2504,13 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
if (fileOpened)
{
const int bSize=4096;
- QCString contents(bSize);
+ QCString contents(bSize+1);
int totalSize=0;
int size;
while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
{
totalSize+=bSize;
- contents.resize(totalSize+bSize);
+ contents.resize(totalSize+bSize+1);
}
totalSize = filterCRLF(contents.rawData(),totalSize+size)+2;
contents.resize(totalSize);
@@ -3386,7 +3387,7 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
}
}
-static void findMembersWithSpecificName(MemberName *mn,
+static void findMembersWithSpecificName(const MemberName *mn,
const char *args,
bool checkStatics,
const FileDef *currentFile,
@@ -3396,8 +3397,9 @@ static void findMembersWithSpecificName(MemberName *mn,
{
//printf(" Function with global scope name '%s' args='%s'\n",
// mn->memberName(),args);
- for (const auto &md : *mn)
+ for (const auto &md_p : *mn)
{
+ const MemberDef *md = md_p.get();
const FileDef *fd=md->getFileDef();
const GroupDef *gd=md->getGroupDef();
//printf(" md->name()='%s' md->args='%s' fd=%p gd=%p current=%p ref=%s\n",
@@ -3422,7 +3424,7 @@ static void findMembersWithSpecificName(MemberName *mn,
if (match && (forceTagFile==0 || md->getReference()==forceTagFile))
{
//printf("Found match!\n");
- members.append(md.get());
+ members.append(md);
}
}
}
@@ -3544,8 +3546,9 @@ bool getDefs(const QCString &scName,
{
argList = stringToArgumentList(fcd->getLanguage(),args);
}
- for (const auto &mmd : *mn)
+ for (const auto &mmd_p : *mn)
{
+ MemberDef *mmd = mmd_p.get();
if (!mmd->isStrongEnumValue())
{
const ArgumentList &mmdAl = mmd->argumentList();
@@ -3564,7 +3567,7 @@ bool getDefs(const QCString &scName,
{
mdist=m;
cd=mcd;
- md=mmd.get();
+ md=mmd;
}
}
}
@@ -3574,8 +3577,9 @@ bool getDefs(const QCString &scName,
// no exact match found, but if args="()" an arbitrary member will do
{
//printf(" >Searching for arbitrary member\n");
- for (const auto &mmd : *mn)
+ for (const auto &mmd_p : *mn)
{
+ MemberDef *mmd = mmd_p.get();
//if (mmd->isLinkable())
//{
ClassDef *mcd=mmd->getClassDef();
@@ -3588,7 +3592,7 @@ bool getDefs(const QCString &scName,
//printf("Class distance %d\n",m);
mdist=m;
cd=mcd;
- md=mmd.get();
+ md=mmd;
}
}
//}
@@ -3654,7 +3658,7 @@ bool getDefs(const QCString &scName,
if (mn && scopeName.isEmpty() && mScope.isEmpty()) // Maybe a related function?
{
//printf("Global symbol\n");
- MemberDef *fuzzy_mmd = 0;
+ const MemberDef *fuzzy_mmd = 0;
std::unique_ptr<ArgumentList> argList;
bool hasEmptyArgs = args && qstrcmp(args, "()") == 0;
@@ -3663,8 +3667,9 @@ bool getDefs(const QCString &scName,
argList = stringToArgumentList(SrcLangExt_Cpp, args);
}
- for (const auto &mmd : *mn)
+ for (const auto &mmd_p : *mn)
{
+ const MemberDef *mmd = mmd_p.get();
if (!mmd->isLinkable() || (!mmd->isRelated() && !mmd->isForeign()) ||
!mmd->getClassDef())
{
@@ -3673,24 +3678,24 @@ bool getDefs(const QCString &scName,
if (!args)
{
- fuzzy_mmd = mmd.get();
+ fuzzy_mmd = mmd;
break;
}
- ArgumentList &mmdAl = mmd->argumentList();
+ const ArgumentList &mmdAl = mmd->argumentList();
if (matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),&mmdAl,
Doxygen::globalScope,mmd->getFileDef(),argList.get(),
checkCV
)
)
{
- fuzzy_mmd = mmd.get();
+ fuzzy_mmd = mmd;
break;
}
if (!fuzzy_mmd && hasEmptyArgs)
{
- fuzzy_mmd = mmd.get();
+ fuzzy_mmd = mmd;
}
}
@@ -3731,8 +3736,9 @@ bool getDefs(const QCString &scName,
//printf("Symbol inside existing namespace '%s' count=%d\n",
// namespaceName.data(),mn->count());
bool found=FALSE;
- for (const auto &mmd : *mn)
+ for (const auto &mmd_p : *mn)
{
+ const MemberDef *mmd = mmd_p.get();
//printf("mmd->getNamespaceDef()=%p fnd=%p\n",
// mmd->getNamespaceDef(),fnd);
const MemberDef *emd = mmd->getEnumScope();
@@ -3744,7 +3750,7 @@ bool getDefs(const QCString &scName,
{
//printf("found it!\n");
nd=fnd;
- md=mmd.get();
+ md=mmd;
found=TRUE;
break;
}
@@ -3770,7 +3776,7 @@ bool getDefs(const QCString &scName,
if (match)
{
nd=fnd;
- md=mmd.get();
+ md=mmd;
found=TRUE;
break;
}
@@ -3780,12 +3786,13 @@ bool getDefs(const QCString &scName,
// no exact match found, but if args="()" an arbitrary
// member will do
{
- for (const auto &mmd : *mn)
+ for (const auto &mmd_p : *mn)
{
+ const MemberDef *mmd = mmd_p.get();
if (mmd->getNamespaceDef()==fnd /*&& mmd->isLinkable() */ )
{
nd=fnd;
- md=mmd.get();
+ md=mmd;
found=TRUE;
break;
}
@@ -3810,8 +3817,9 @@ bool getDefs(const QCString &scName,
else
{
//printf("not a namespace\n");
- for (const auto &mmd : *mn)
+ for (const auto &mmd_p : *mn)
{
+ const MemberDef *mmd = mmd_p.get();
const MemberDef *tmd = mmd->getEnumScope();
//printf("try member %s tmd=%s\n",mmd->name().data(),tmd?tmd->name().data():"<none>");
int ni=namespaceName.findRev("::");
@@ -3824,7 +3832,7 @@ bool getDefs(const QCString &scName,
namespaceName.length()>0 // enum is part of namespace so this should not be empty
)
{
- md=mmd.get();
+ md=mmd;
fd=mmd->getFileDef();
gd=mmd->getGroupDef();
if (gd && gd->isLinkable()) fd=0; else gd=0;
@@ -3863,7 +3871,8 @@ bool getDefs(const QCString &scName,
//for (mni.toLast();(md=mni.current());--mni)
for (auto it = mn->rbegin(); it!=mn->rend(); ++it)
{
- const auto &mmd = *it;
+ const auto &mmd_p = *it;
+ const MemberDef *mmd = mmd_p.get();
//printf("Found member '%s'\n",mmd->name().data());
//printf("member is linkable mmd->name()='%s'\n",mmd->name().data());
fd=mmd->getFileDef();
@@ -3874,7 +3883,7 @@ bool getDefs(const QCString &scName,
(tmd && tmd->isStrong())
)
{
- members.append(mmd.get());
+ members.append(mmd);
}
}
}
@@ -4544,13 +4553,14 @@ FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,bool &ambig)
int count=0;
FileDef *lastMatch=0;
QCString pathStripped = stripFromIncludePath(path);
- for (const auto &fd : *fn)
+ for (const auto &fd_p : *fn)
{
+ FileDef *fd = fd_p.get();
QCString fdStripPath = stripFromIncludePath(fd->getPath());
if (path.isEmpty() || fdStripPath.right(pathStripped.length())==pathStripped)
{
count++;
- lastMatch=fd.get();
+ lastMatch=fd;
}
}
//printf(">1 ===> add to cache %p\n",fd);
@@ -5520,7 +5530,7 @@ void addMembersToMemberGroup(MemberList *ml,
const Definition *context)
{
ASSERT(context!=0);
- //printf("addMemberToMemberGroup()\n");
+ //printf("addMemberToMemberGroup() context=%s\n",context->name().data());
if (ml==0) return;
MemberListIterator mli(*ml);
MemberDef *md;
@@ -5553,6 +5563,7 @@ void addMembersToMemberGroup(MemberList *ml,
if (mg==0)
{
mg = new MemberGroup(
+ context,
groupId,
info->header,
info->doc,
@@ -5585,6 +5596,7 @@ void addMembersToMemberGroup(MemberList *ml,
if (mg==0)
{
mg = new MemberGroup(
+ context,
groupId,
info->header,
info->doc,
@@ -5594,7 +5606,7 @@ void addMembersToMemberGroup(MemberList *ml,
(*ppMemberGroupSDict)->append(groupId,mg);
}
md = ml->take(index); // remove from member list
- mg->insertMember(md); // insert in member group
+ mg->insertMember(md->resolveAlias()); // insert in member group
mg->setRefItems(info->m_sli);
md->setMemberGroup(mg);
continue;
@@ -6580,7 +6592,7 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine)
while ((c=*p))
{
if (c==' ' || c=='\t' || c=='\r') i++,p++;
- else if (c=='\\' && qstrncmp(p,"\\ilinebr",8)==0) i+=8,li=i,docLine++,p+=8;
+ else if (c=='\\' && qstrncmp(p,"\\ilinebr",8)==0) i+=8,li=i,p+=8;
else if (c=='\n') i++,li=i,docLine++,p++;
else break;
}
diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css
index 30eb1ac..141d418 100644
--- a/templates/html/doxygen.css
+++ b/templates/html/doxygen.css
@@ -1358,10 +1358,12 @@ dl.citelist dt {
font-weight:bold;
margin-right:10px;
padding:5px;
+ text-align:right;
+ width:52px;
}
dl.citelist dd {
- margin:2px 0;
+ margin:2px 0 2px 72px;
padding:5px 0;
}
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
index 1851c9f..b354e78 100644
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -1,4 +1,4 @@
-# run all tests sequentially (keep for backward compatibilty)
+# run all tests sequentially (keep for backward compatibility)
add_custom_target(tests
COMMENT "Running doxygen tests..."
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing