]> granicus.if.org Git - clang/commit
Add new static analyzer for checking LLVM coding conventions: -analyzer-check-llvm...
authorTed Kremenek <kremenek@apple.com>
Sun, 14 Feb 2010 02:45:18 +0000 (02:45 +0000)
committerTed Kremenek <kremenek@apple.com>
Sun, 14 Feb 2010 02:45:18 +0000 (02:45 +0000)
commit6dd66ed959b7f60749dd0040507b3f304183a1b6
tree74e46fdabb8c12291a174290b04e2c511323c98f
parent280cfd70c7a536311656fbd2082cb54d59cf3a2e
Add new static analyzer for checking LLVM coding conventions: -analyzer-check-llvm-conventions

Currently these checks are intended to be largely syntactical, but may get more
sophisticated over time.

As an initial foray into this brave new world, emit a static analyzer warning
when binding a temporary 'std::string' to an 'llvm::StringRef' where the
lifetime of the 'std::string' does not outlive the 'llvm::StringRef'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96147 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Checker/Checkers/LocalCheckers.h
include/clang/Driver/CC1Options.td
include/clang/Frontend/Analyses.def
lib/Checker/CMakeLists.txt
lib/Checker/LLVMConventionsChecker.cpp [new file with mode: 0644]
lib/Frontend/AnalysisConsumer.cpp