- Move examples/analyzer-plugin to analyzer/StaticAnalyzer/SampleAnalyzerPlugin
- Create a new example plugin for handling checker dependencies
Since git blame will be messed up anyways, I also clang-formatted the original plugin.
Differential D59464
[analyzer] Add an example plugin for checker dependency handling Szelethus on Mar 16 2019, 12:10 PM. Authored by
Details
Since git blame will be messed up anyways, I also clang-formatted the original plugin.
Diff Detail
Event TimelineComment Actions All our bots are failing which seems to have been caused by the latest reland: FAIL: Clang :: Analysis/checker-plugins.c (297 of 14793) ******************** TEST 'Clang :: Analysis/checker-plugins.c' FAILED ******************** Script: -- : 'RUN: at line 1'; /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/bin/clang -cc1 -internal-isystem /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/lib/clang/9.0.0/include -nostdsysteminc -analyze -analyzer-constraints=range -verify /b/s/w/ir/k/llvm-project/clang/test/Analysis/checker-plugins.c -load /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/./lib/SampleAnalyzerPlugin.so -analyzer-checker='example.MainCallChecker' : 'RUN: at line 15'; /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/bin/clang -cc1 -internal-isystem /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/lib/clang/9.0.0/include -nostdsysteminc -analyze -analyzer-constraints=range /b/s/w/ir/k/llvm-project/clang/test/Analysis/checker-plugins.c -load /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/./lib/CheckerDependencyHandlingAnalyzerPlugin.so -analyzer-checker=example.DependendentChecker -analyzer-list-enabled-checkers 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Analysis/checker-plugins.c -check-prefix=CHECK-IMPLICITLY-ENABLED : 'RUN: at line 24'; /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/bin/clang -cc1 -internal-isystem /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/lib/clang/9.0.0/include -nostdsysteminc -analyze -analyzer-constraints=range /b/s/w/ir/k/llvm-project/clang/test/Analysis/checker-plugins.c -load /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/./lib/CheckerDependencyHandlingAnalyzerPlugin.so -analyzer-checker=example.DependendentChecker -analyzer-disable-checker=example.Dependency -analyzer-list-enabled-checkers 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Analysis/checker-plugins.c -check-prefix=CHECK-IMPLICITLY-DISABLED -- Exit Code: 1 Command Output (stderr): -- error: 'error' diagnostics seen but not expected: (frontend): unable to load plugin '/b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/./lib/SampleAnalyzerPlugin.so': '/b/s/w/ir/k/recipe_cleanup/clangsCGbgY/llvm_build_dir/./lib/SampleAnalyzerPlugin.so: undefined symbol: _ZN4llvm14FoldingSetBase6anchorEv' -- ******************** Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 77.86s ******************** Failing Tests (1): Clang :: Analysis/checker-plugins.c Is it possible to revert this change again? Comment Actions I started to land other patches as well that depend on this one -- I won't object, but I'd prefer to find a solution, mostly because I don't even know how I could reproduce this error. The thing is, I merely moved some files from one directory to the other, which makes me scratch my head even more. That being said -- (see inlines) If it's urgent, feel free to revert, I won't be near a computer until tomorrow.
Comment Actions Also, am I supposed to receive a mail from your buildbots? I unfortunately received none. Comment Actions Which other changes have been landed that depend on this one? Our builders always perform a clean build to avoid any dirty state from previous builds. Have you tried doing a clean build with your change?
If that's the case I'd prefer to revert it to avoid having the build broken for another day. We have builders on the silent master but they aren't stable enough yet to promote to the stable master. Comment Actions
Yes, I did clean, check-clang-analysis, clean, check-all, clean, check-clang.
Could you please take a look at my inline first? Could the fix be that simple? I'm really unsure as to how I could reproduce the error locally.
Comment Actions The full build log is here: https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-x64-linux/b8913271285442739696 Comment Actions If there's a cmake variable for fuchsia, Could you please try to add them here? (see inlines) I don't have access to that particular platform.
Comment Actions In that case, feel free to revert this. If around 11:00 CET time I tried to recommit with a possible fix (while watching your bots), would that be an issue? Comment Actions I managed to reproduce this locally so I'm going to see if there's an easy way to fix this. |