Don't intentionally try to ignore the value of a scalar expression when we
actually care about it. Fixes PR7291.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105404 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/member-init-assignment.cpp b/test/CodeGenCXX/member-init-assignment.cpp
new file mode 100644
index 0000000..c23fe2b
--- /dev/null
+++ b/test/CodeGenCXX/member-init-assignment.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 %s -emit-llvm-only -verify
+// PR7291
+
+struct Foo {
+ unsigned file_id;
+
+ Foo(unsigned arg);
+};
+
+Foo::Foo(unsigned arg) : file_id(arg = 42)
+{ }
+