Page MenuHomePhabricator

Fix false negatives of statement local lifetime analysis for some STL implementation
ClosedPublic

Authored by xazax.hun on Tue, Aug 13, 10:34 AM.

Details

Summary

Some STL implementations have some class definitions (e.g. iterators) in a namespace outside of std.
This patch will extend the warnings from classes in std namespace to other implementation specified namespaces (that start with double underscored or underscore and a capital letter).

This patch also contains some NFC changes that supposed to make the code cleaner. If desired, I can split up this patch to two parts.

Diff Detail

Repository
rL LLVM

Event Timeline

xazax.hun created this revision.Tue, Aug 13, 10:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Aug 13, 10:34 AM
xazax.hun marked an inline comment as done.Tue, Aug 13, 10:34 AM
xazax.hun added inline comments.
clang/lib/Sema/SemaInit.cpp
7130 ↗(On Diff #214872)

This is the NFC part.

Apologies for going off-topic, but would it make sense to start lifetime related patches with the tag [LifetimeAnalysis] or similar (like [analyzer] for static analyzer patches)? I dont feel knowledgable enough to participate, but would gladly add a herald rule to be subscribed and learn about the development process of it.

Apologies for going off-topic, but would it make sense to start lifetime related patches with the tag [LifetimeAnalysis] or similar (like [analyzer] for static analyzer patches)? I dont feel knowledgable enough to participate, but would gladly add a herald rule to be subscribed and learn about the development process of it.

Makes sense :) I do not like to change titles as it will result in duplicate threads in the mail boxes but going forward I will definitely apply this.

gribozavr accepted this revision.Wed, Aug 14, 2:41 AM
gribozavr added inline comments.
clang/lib/Sema/SemaInit.cpp
6579 ↗(On Diff #214872)

Please use isUppercase from include/clang/Basic/CharInfo.h.

This revision is now accepted and ready to land.Wed, Aug 14, 2:41 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptWed, Aug 14, 9:34 AM