summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/cast-to-struct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/cast-to-struct.cpp')
-rw-r--r--clang/test/Analysis/cast-to-struct.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Analysis/cast-to-struct.cpp b/clang/test/Analysis/cast-to-struct.cpp
index 45d55947c93..6c23c2bf48d 100644
--- a/clang/test/Analysis/cast-to-struct.cpp
+++ b/clang/test/Analysis/cast-to-struct.cpp
@@ -65,3 +65,8 @@ void intToStruct(int *P) {
void *VP = P;
Abc = (struct ABC *)VP;
}
+
+// https://llvm.org/bugs/show_bug.cgi?id=31173
+void dontCrash(struct AB X) {
+ struct UndefS *S = (struct UndefS *)&X;
+}
OpenPOWER on IntegriCloud