aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/redecl-add-after-load.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/redecl-add-after-load.cpp')
-rw-r--r--test/Modules/redecl-add-after-load.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/test/Modules/redecl-add-after-load.cpp b/test/Modules/redecl-add-after-load.cpp
index 68deaf8b4ef9..8ca70ad9580b 100644
--- a/test/Modules/redecl-add-after-load.cpp
+++ b/test/Modules/redecl-add-after-load.cpp
@@ -2,8 +2,9 @@
// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -DIMPORT_DECLS
-#ifdef IMPORT_DECLS
// expected-no-diagnostics
+
+#ifdef IMPORT_DECLS
@import redecl_add_after_load_decls;
#else
typedef struct A B;
@@ -24,12 +25,12 @@ typedef C::A CB;
constexpr int C_test(bool b) { return b ? C::variable : C::function(); }
struct D {
- struct A; // expected-note {{forward}}
+ struct A;
static const int variable;
- static constexpr int function(); // expected-note {{here}}
+ static constexpr int function();
};
typedef D::A DB;
-constexpr int D_test(bool b) { return b ? D::variable : D::function(); } // expected-note {{subexpression}} expected-note {{undefined}}
+constexpr int D_test(bool b) { return b ? D::variable : D::function(); }
#endif
@import redecl_add_after_load;
@@ -46,14 +47,6 @@ CB struct_struct_test;
constexpr int struct_variable_test = C_test(true);
constexpr int struct_function_test = C_test(false);
-// FIXME: We should accept this, but we're currently too lazy when merging class
-// definitions to determine that the definitions in redecl_add_after_load are
-// definitions of these entities.
DB merged_struct_struct_test;
constexpr int merged_struct_variable_test = D_test(true);
constexpr int merged_struct_function_test = D_test(false);
-#ifndef IMPORT_DECLS
-// expected-error@-4 {{incomplete}}
-// expected-error@-4 {{constant}} expected-note@-4 {{in call to}}
-// expected-error@-4 {{constant}} expected-note@-4 {{in call to}}
-#endif