[cfe-dev] [PATCH 1/1] Analysis: CFG, add comment about NULL CFGBlock successors

Jiri Slaby jirislaby at gmail.com
Wed Apr 27 23:18:47 PDT 2011


CFGBlock successor may be NULL to preserve succs ordering rules. Note
this to the CFGBlock documentation.

Signed-off-by: Jiri Slaby <jirislaby at gmail.com>
---
 include/clang/Analysis/CFG.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/clang/Analysis/CFG.h b/include/clang/Analysis/CFG.h
index 53ed705..ca46459 100644
--- a/include/clang/Analysis/CFG.h
+++ b/include/clang/Analysis/CFG.h
@@ -264,6 +264,8 @@ public:
 ///     ? operator      LHS expression;  RHS expression
 ///     &&, ||          expression that uses result of && or ||, RHS
 ///
+/// But note that any of that may be NULL in case of optimized-out edges.
+///
 class CFGBlock {
   class ElementList {
     typedef BumpVector<CFGElement> ImplTy;
-- 
1.7.4.2





More information about the cfe-dev mailing list