Skip to content

Commit

Permalink
Fixed case where this was captured implicitly by value in a lambda
Browse files Browse the repository at this point in the history
Found by clang-tidy's cppcoreguidelines-misleading-capture-default-by-value check
  • Loading branch information
doxygen committed Apr 21, 2024
1 parent 1af459c commit 4251fbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -93,6 +93,7 @@ if (ENABLE_CLANG_TIDY)
-header-filter=.;
-checks=-*,cppcoreguidelines-special-member-functions
#-checks=-*,cppcoreguidelines-init-variables
#-checks=-*,cppcoreguidelines-misleading-capture-default-by-value
#-checks=-*,modernize-use-nullptr
#-checks=-*,modernize-use-override
#-checks=-*,modernize-use-emplace
Expand Down
2 changes: 1 addition & 1 deletion src/clangparser.cpp
Expand Up @@ -349,7 +349,7 @@ std::string ClangTUParser::lookup(uint32_t line,const char *symbol)
bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return result;

auto getCurrentTokenLine = [=]() -> uint32_t
auto getCurrentTokenLine = [this]() -> uint32_t
{
uint32_t l=0, c=0;
if (p->numTokens==0) return 1;
Expand Down

0 comments on commit 4251fbb

Please sign in to comment.