Fix a nasty bug where temporaries weren't marked as being conditional in some cases.
llvm-svn: 94341
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 30ad663..684d1ce 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -283,6 +283,9 @@
/// FinishConditionalBranch - Should be called after a conditional part of an
/// expression has been emitted.
void FinishConditionalBranch() {
+ assert(ConditionalBranchLevel != 0 &&
+ "Conditional branch mismatch!");
+
--ConditionalBranchLevel;
}