diff options
Diffstat (limited to 'test/Modules/pr28812.cpp')
| -rw-r--r-- | test/Modules/pr28812.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Modules/pr28812.cpp b/test/Modules/pr28812.cpp new file mode 100644 index 000000000000..78267d2a4b44 --- /dev/null +++ b/test/Modules/pr28812.cpp @@ -0,0 +1,22 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -std=c++11 -nostdsysteminc -I%S/Inputs/PR28812 -verify %s +// RUN: %clang_cc1 -std=c++11 -nostdsysteminc -fmodules -fimplicit-module-maps \ +// RUN: -fmodules-cache-path=%t -I%S/Inputs/PR28812 -verify %s + +template <typename> struct VarStreamArrayIterator; +template <typename ValueType> +struct VarStreamArray { + typedef VarStreamArrayIterator<ValueType> Iterator; + Iterator begin() { return Iterator(*this); } +}; + +#include "Textual.h" + +#include "a.h" +#include "b.h" + +VarStreamArray<int> a; +auto b = a.begin(); + +// expected-no-diagnostics + |
