50 self analysis remove remaining false positive and make warnings only output actionable#51
Conversation
…ssed across toolchains
| static const llvm::DIType* getAllocaDebugDeclaredType(const llvm::AllocaInst& AI) | ||
| { | ||
| auto* nonConstAI = const_cast<llvm::AllocaInst*>(&AI); | ||
| for (llvm::DbgDeclareInst* ddi : llvm::findDbgDeclares(nonConstAI)) |
Check warning
Code scanning / coretrace-stack-analyzer
ResourceLifetime.IncompleteInterproc Warning
| return var->getType(); | ||
| } | ||
|
|
||
| for (llvm::DbgVariableRecord* dvr : llvm::findDVRDeclares(nonConstAI)) |
Check warning
Code scanning / coretrace-stack-analyzer
ResourceLifetime.IncompleteInterproc Warning
|
|
||
| llvm::SmallPtrSet<const llvm::Metadata*, 16> visitedTypes; | ||
| return !debugTypeHasDataMembers(declaredType, 0, visitedTypes); | ||
| } |
Check warning
Code scanning / coretrace-stack-analyzer
ResourceLifetime.IncompleteInterproc Warning
| return true; | ||
| } | ||
| out.clear(); | ||
| } |
Check warning
Code scanning / coretrace-stack-analyzer
ResourceLifetime.IncompleteInterproc Warning
| { | ||
| using namespace llvm; | ||
|
|
||
| if (!currentType || !sourceElementType || depth > 12) |
Check notice
Code scanning / coretrace-stack-analyzer
None Note
| static void collectVTableEntries(const llvm::Constant* node, | ||
| std::vector<const llvm::Constant*>& out) | ||
| { | ||
| if (!node) |
Check notice
Code scanning / coretrace-stack-analyzer
None Note
| debugTypeHasDataMembers(const llvm::DIType* type, unsigned depth, | ||
| llvm::SmallPtrSetImpl<const llvm::Metadata*>& visitedTypes) | ||
| { | ||
| if (!type || depth > 12) |
Check notice
Code scanning / coretrace-stack-analyzer
None Note
| std::uint64_t baseOffset, unsigned depth, | ||
| RangeSet& out) | ||
| { | ||
| if (!ty || depth > 12) |
Check notice
Code scanning / coretrace-stack-analyzer
None Note
| const llvm::DIType* type, std::uint64_t baseOffsetBits, unsigned depth, | ||
| llvm::SmallPtrSetImpl<const llvm::Metadata*>& visiting, RangeSet& out) | ||
| { | ||
| if (!type || depth > 16) |
Check notice
Code scanning / coretrace-stack-analyzer
None Note
Description
This PR improves self-analysis signal quality and warning triage UX.
Changes included:
AnalyzerApphuman output now applies warning filtering first, then keeps only functions linked to remaining diagnostics in--warnings-onlymode.stripIntCasts(...):return Cur ? Cur : V;->return Cur;--warnings-onlyfunction filtering.run_test.pychecks to validate the new behavior and keep existing regression coverage stable.Architecture rationale:
Validation:
cmake --build build --target stack_usage_analyzer -j4./run_test.py --jobs=4passed (414/414)stripIntCasts(...).