[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #113845)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 01:14:12 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/13261

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy '-checks=-*,clang-analyzer-*' /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
clang-tidy: /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [To = clang::ParenExpr, From = clang::Expr]: Assertion `detail::isPresent(Val) && "dyn_cast on a non-existent value"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x000059c0904afda8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x000059c0904ad85e llvm::sys::RunSignalHandlers() /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #2 0x000059c0904b05c8 SignalHandler(int) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #3 0x000078c2c2cd5520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000078c2c2d299fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x000078c2c2cd5476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x000078c2c2cbb7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x000078c2c2cbb71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x000078c2c2ccce96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x000059c0906639fe clang::IgnoreParensSingleStep(clang::Expr*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:0:0
#10 0x000059c090663a5b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *)> /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:30
#11 0x000059c090663a5b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:10
#12 0x000059c090663a5b IgnoreExprNodes<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:38:9
#13 0x000059c090663a5b clang::Expr::IgnoreParenCasts() /build/buildbot/premerge-monolithic-linux/llvm-project/clang/lib/AST/Expr.cpp:3084:10
#14 0x000059c091ded89e isPresent /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:622:55
#15 0x000059c091ded89e isPresent<clang::Expr *> /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:630:10
#16 0x000059c091ded89e dyn_cast_if_present<clang::LambdaExpr, clang::Expr> /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:751:8
#17 0x000059c091ded89e dyn_cast_or_null<clang::LambdaExpr, clang::Expr> /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:768:10
#18 0x000059c091ded89e VisitDeclRefExpr /build/buildbot/premerge-monolithic-linux/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:59:19
#19 0x000059c091ded89e WalkUpFromDeclRefExpr /build/buildbot/premerge-monolithic-linux/build/tools/clang/include/clang/AST/StmtNodes.inc:474:1
#20 0x000059c091ded89e clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclRefExpr(clang::DeclRefExpr*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2487:1
#21 0x000059c091de2efc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseStmt(clang::Stmt*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:687:7
#22 0x000059c091e02873 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2264:5
#23 0x000059c091ddd902 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2275:1
#24 0x000059c091ddb00c clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /build/buildbot/premerge-monolithic-linux/build/tools/clang/include/clang/AST/DeclNodes.inc:0:1
#25 0x000059c091ddb54b TraverseDeclContextHelper /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1543:7
...

```

</details>

https://github.com/llvm/llvm-project/pull/113845


More information about the cfe-commits mailing list