summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/update-exception-spec
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-03-21 00:58:54 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-03-21 00:58:54 +0000
commitdecef8007fb892192d0eaf6c242d566486243550 (patch)
tree3d298c55420e07f2d36b8c818cd373e31ed4011e /clang/test/Modules/Inputs/update-exception-spec
parentc473255110f591dc9fe309e1ea134469a95c7e16 (diff)
downloadbcm5719-llvm-decef8007fb892192d0eaf6c242d566486243550.tar.gz
bcm5719-llvm-decef8007fb892192d0eaf6c242d566486243550.zip
[modules] When either redecl chain merging or an update record causes us to
give an exception specification to a declaration that didn't have an exception specification in any of our imported modules, emit an update record ourselves. Without this, code importing the current module would not see an exception specification that we could see and might have relied on. llvm-svn: 232870
Diffstat (limited to 'clang/test/Modules/Inputs/update-exception-spec')
-rw-r--r--clang/test/Modules/Inputs/update-exception-spec/a.h2
-rw-r--r--clang/test/Modules/Inputs/update-exception-spec/b.h3
-rw-r--r--clang/test/Modules/Inputs/update-exception-spec/c.h3
-rw-r--r--clang/test/Modules/Inputs/update-exception-spec/module.modulemap3
4 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/update-exception-spec/a.h b/clang/test/Modules/Inputs/update-exception-spec/a.h
new file mode 100644
index 00000000000..078ebf9aecf
--- /dev/null
+++ b/clang/test/Modules/Inputs/update-exception-spec/a.h
@@ -0,0 +1,2 @@
+struct A { ~A() throw(int); };
+struct B { A a; };
diff --git a/clang/test/Modules/Inputs/update-exception-spec/b.h b/clang/test/Modules/Inputs/update-exception-spec/b.h
new file mode 100644
index 00000000000..f75b559bee4
--- /dev/null
+++ b/clang/test/Modules/Inputs/update-exception-spec/b.h
@@ -0,0 +1,3 @@
+struct A { ~A() throw(int); };
+struct B { A a; };
+inline void f(B *p) { p->~B(); }
diff --git a/clang/test/Modules/Inputs/update-exception-spec/c.h b/clang/test/Modules/Inputs/update-exception-spec/c.h
new file mode 100644
index 00000000000..067dbb65055
--- /dev/null
+++ b/clang/test/Modules/Inputs/update-exception-spec/c.h
@@ -0,0 +1,3 @@
+#include "a.h"
+#include "b.h"
+inline void g(B *p) { p->~B(); }
diff --git a/clang/test/Modules/Inputs/update-exception-spec/module.modulemap b/clang/test/Modules/Inputs/update-exception-spec/module.modulemap
new file mode 100644
index 00000000000..880ae38b97a
--- /dev/null
+++ b/clang/test/Modules/Inputs/update-exception-spec/module.modulemap
@@ -0,0 +1,3 @@
+module a { header "a.h" }
+module b { header "b.h" }
+module c { header "c.h" }
OpenPOWER on IntegriCloud