+ test case
<rdar://problem/
6080040>
http://llvm.org/bugs/show_bug.cgi?id=2280
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53756
91177308-0d34-0410-b5e6-
96231b3b80d8
ParseAST(PP, Consumer, Stats);
}
+ // Don't emit code when the input had errors.
+ if (CodeGenModule && PP.getDiagnostics().hasErrorOccurred()) {
+ delete CodeGenModule;
+ CodeGenModule = 0;
+ }
+
// If running the code generator, finish up now.
if (CodeGenModule) {
std::ostream *Out;
--- /dev/null
+// RUN: rm -f %t1.bc
+// RUN: ! clang %s -emit-llvm-bc -o %t1.bc
+// RUN: ! test -f %t1.bc
+
+void f() {
+}
+
+void g() {
+ *10;
+}