summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/merge-lifetime-extended-temporary
diff options
context:
space:
mode:
authorTyker <tyker1@outlook.com>2019-11-30 16:42:33 +0100
committerTyker <tyker1@outlook.com>2019-12-01 21:28:48 +0100
commita3cbe1a202df6ec8e23bd55e14db254e4bc33021 (patch)
tree93c47cab8d92a21f939373da9ca4740067f7a0e5 /clang/test/Modules/Inputs/merge-lifetime-extended-temporary
parent67298d683ca18fa8855349b5b0c289f92c93b6b1 (diff)
downloadbcm5719-llvm-a3cbe1a202df6ec8e23bd55e14db254e4bc33021.tar.gz
bcm5719-llvm-a3cbe1a202df6ec8e23bd55e14db254e4bc33021.zip
[clang][modules] Add support for merging lifetime-extended temporaries
Summary: Add support for merging lifetime-extended temporaries Reviewers: rsmith Reviewed By: rsmith Subscribers: xbolva00, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70190
Diffstat (limited to 'clang/test/Modules/Inputs/merge-lifetime-extended-temporary')
-rw-r--r--clang/test/Modules/Inputs/merge-lifetime-extended-temporary/a.h2
-rw-r--r--clang/test/Modules/Inputs/merge-lifetime-extended-temporary/b.h4
-rw-r--r--clang/test/Modules/Inputs/merge-lifetime-extended-temporary/c.h4
-rw-r--r--clang/test/Modules/Inputs/merge-lifetime-extended-temporary/module.modulemap14
4 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/a.h b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/a.h
new file mode 100644
index 00000000000..8adab29eafc
--- /dev/null
+++ b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/a.h
@@ -0,0 +1,2 @@
+
+constexpr const int& LETemp = 0;
diff --git a/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/b.h b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/b.h
new file mode 100644
index 00000000000..2bd1b096d60
--- /dev/null
+++ b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/b.h
@@ -0,0 +1,4 @@
+
+#include "a.h"
+
+constexpr const int* PtrTemp1 = &LETemp;
diff --git a/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/c.h b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/c.h
new file mode 100644
index 00000000000..b023eebca49
--- /dev/null
+++ b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/c.h
@@ -0,0 +1,4 @@
+
+#include "a.h"
+
+constexpr const int* PtrTemp2 = &LETemp;
diff --git a/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/module.modulemap b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/module.modulemap
new file mode 100644
index 00000000000..1339d627a44
--- /dev/null
+++ b/clang/test/Modules/Inputs/merge-lifetime-extended-temporary/module.modulemap
@@ -0,0 +1,14 @@
+module "a" {
+ export *
+ header "a.h"
+}
+
+module "b" {
+ export *
+ header "b.h"
+}
+
+module "c" {
+ export *
+ header "c.h"
+}
OpenPOWER on IntegriCloud