Use "VisitLValue" when processing the base for "x.f" field accesses, and "Visit" when processing the base for "x->f" field accesses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57754 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/fields.c b/test/Analysis/fields.c
new file mode 100644
index 0000000..72de12c
--- /dev/null
+++ b/test/Analysis/fields.c
@@ -0,0 +1,10 @@
+// RUN: clang -checker-cfref %s -verify &&
+// RUN: clang -checker-simple %s -verify
+
+unsigned foo();
+typedef struct bf { unsigned x:2; } bf;
+void bar() {
+ bf y;
+ *(unsigned*)&y = foo();
+ y.x = 1;
+}