summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-05-17 22:44:15 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-05-17 22:44:15 +0000
commitb648399f9f331632a893dad74775398dc20e5664 (patch)
tree42ce09ae2278001ff25bdbf314ddaa4a83e43333 /clang/test/Modules
parent62b5b73eaf49900131dc81f4c71d59106a8bcc90 (diff)
downloadbcm5719-llvm-b648399f9f331632a893dad74775398dc20e5664.tar.gz
bcm5719-llvm-b648399f9f331632a893dad74775398dc20e5664.zip
PR27754: CXXRecordDecl::data() needs to perform an update even if it's called
on a declaration that already knows the location of the DefinitionData object. llvm-svn: 269858
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h4
-rw-r--r--clang/test/Modules/Inputs/PR27754/TMetaUtils.h2
-rw-r--r--clang/test/Modules/Inputs/PR27754/TSchemaType.h2
-rw-r--r--clang/test/Modules/Inputs/PR27754/algobase.h4
-rw-r--r--clang/test/Modules/Inputs/PR27754/module.modulemap3
-rw-r--r--clang/test/Modules/pr27754.cpp7
6 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h b/clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h
new file mode 100644
index 00000000000..057dd14698a
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/RConversionRuleParser.h
@@ -0,0 +1,4 @@
+#include "algobase.h"
+typedef integral_constant<bool, true> true_type;
+class _Rb_tree { _Rb_tree() { true_type(); } };
+#include "TSchemaType.h"
diff --git a/clang/test/Modules/Inputs/PR27754/TMetaUtils.h b/clang/test/Modules/Inputs/PR27754/TMetaUtils.h
new file mode 100644
index 00000000000..835b7c6dc60
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/TMetaUtils.h
@@ -0,0 +1,2 @@
+#include "RConversionRuleParser.h"
+void fn1() { true_type(); }
diff --git a/clang/test/Modules/Inputs/PR27754/TSchemaType.h b/clang/test/Modules/Inputs/PR27754/TSchemaType.h
new file mode 100644
index 00000000000..2c477931707
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/TSchemaType.h
@@ -0,0 +1,2 @@
+#include "algobase.h"
+struct A : integral_constant<bool, true> {};
diff --git a/clang/test/Modules/Inputs/PR27754/algobase.h b/clang/test/Modules/Inputs/PR27754/algobase.h
new file mode 100644
index 00000000000..f5e47d8dc7d
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/algobase.h
@@ -0,0 +1,4 @@
+#ifndef _STL_ALGOBASE_H
+#define _STL_ALGOBASE_H
+template<typename _Tp, _Tp> struct integral_constant {};
+#endif
diff --git a/clang/test/Modules/Inputs/PR27754/module.modulemap b/clang/test/Modules/Inputs/PR27754/module.modulemap
new file mode 100644
index 00000000000..90dcdbb92b4
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR27754/module.modulemap
@@ -0,0 +1,3 @@
+module "RConversionRuleParser.h" { header "RConversionRuleParser.h" }
+module "TMetaUtils.h" { header "TMetaUtils.h" }
+module "TSchemaType.h" { header "TSchemaType.h" }
diff --git a/clang/test/Modules/pr27754.cpp b/clang/test/Modules/pr27754.cpp
new file mode 100644
index 00000000000..04825954294
--- /dev/null
+++ b/clang/test/Modules/pr27754.cpp
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -std=c++11 -I%S/Inputs/PR27754 -verify %s
+// RUN: %clang_cc1 -std=c++11 -fmodules -fmodule-map-file=%S/Inputs/PR27754/module.modulemap -fmodules-cache-path=%t -I%S/Inputs/PR27754/ -verify %s
+
+#include "TMetaUtils.h"
+
+// expected-no-diagnostics
OpenPOWER on IntegriCloud