]> granicus.if.org Git - clang/commit
Reduce -Wuninitialized time by 22% (on sqlite) by removing the recursive AST crawl.
authorTed Kremenek <kremenek@apple.com>
Tue, 19 Jul 2011 14:18:48 +0000 (14:18 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 19 Jul 2011 14:18:48 +0000 (14:18 +0000)
commit0c8e5a0f70cbdb800d939c1807d05f380b2854d4
treee3c6ef4d366ae90ead129c7adb1b323a1e98a200
parent74fb1a493cf5d2dd0fb51a4eadf74e85e10a3457
Reduce -Wuninitialized time by 22% (on sqlite) by removing the recursive AST crawl.

This is accomplished by forcing the needed expressions for -Wuninitialized to always be CFGElements in the CFG.
This allows us to remove a fair amount of the code for -Wuninitialized.

Some fallout:
- AnalysisBasedWarnings.cpp now specifically toggles the CFGBuilder to create a CFG that is suitable for -Wuninitialized.  This
is a layering violation, since the logic for -Wuninitialized is in libAnalysis.  This can be fixed with the proper refactoring.
- Some of the source locations for -Wunreachable-code warnings have shifted.  While not ideal, this is okay because that analysis
already needs some serious reworking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135480 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/UninitializedValues.cpp
lib/Sema/AnalysisBasedWarnings.cpp
test/Sema/warn-unreachable.c
test/SemaCXX/warn-unreachable.cpp