diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-02-23 00:29:34 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-02-23 00:29:34 +0000 |
commit | b07805485c603be3d8011f72611465324c9e664b (patch) | |
tree | 2a1bf633a0201b748631fb8fa90fa7c2280990cc /include/clang/Analysis/ProgramPoint.h | |
parent | 02fb50d54042982bccc04c276ad2342827c8fcd3 (diff) |
Remove the CFGElement "Invalid" state.
Use Optional<CFG*> where invalid states were needed previously. In the one case
where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy
CFGAutomaticObjDtor.
Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek
and Doug Gregor.
Post commit code review feedback on r175796 by Ted Kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/ProgramPoint.h')
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 3fbe8e1a41..11b79a1c15 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -202,9 +202,9 @@ public: return reinterpret_cast<const CFGBlock*>(getData1()); } - const CFGElement getFirstElement() const { + Optional<CFGElement> getFirstElement() const { const CFGBlock *B = getBlock(); - return B->empty() ? CFGElement() : B->front(); + return B->empty() ? Optional<CFGElement>() : B->front(); } private: |