diff options
author | Anna Zaks <ganna@apple.com> | 2013-04-05 00:59:33 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-04-05 00:59:33 +0000 |
commit | 610f79cbab4d752349b5c81a94682a6a82b102e7 (patch) | |
tree | 0101480fb15b5cd9b41bd18657e5a8f9d6046705 /include/clang/Analysis/ProgramPoint.h | |
parent | 5a15b9dc8386766592eec833dce1839ca7f56dbf (diff) |
[analyzer] Show path diagnostic for C++ initializers
Also had to modify the PostInitializer ProgramLocation to contain the field region.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/ProgramPoint.h')
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 72422d8d15..333329d8c3 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -471,14 +471,25 @@ private: class PostInitializer : public ProgramPoint { public: - PostInitializer(const CXXCtorInitializer *I, + /// \brief Construct a PostInitializer point that represents a location after + /// CXXCtorInitializer expression evaluation. + /// + /// \param I The initializer. + /// \param Loc The location of the field being initialized. + PostInitializer(const CXXCtorInitializer *I, + const void *Loc, const LocationContext *L) - : ProgramPoint(I, PostInitializerKind, L) {} + : ProgramPoint(I, Loc, PostInitializerKind, L) {} const CXXCtorInitializer *getInitializer() const { return static_cast<const CXXCtorInitializer *>(getData1()); } + /// \brief Returns the location of the field. + const void *getLocationValue() const { + return getData2(); + } + private: friend class ProgramPoint; PostInitializer() {} |