[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / pr28812.cpp
blob78267d2a4b44a9783443893f5639ce9a01804629
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -std=c++11 -nostdsysteminc -I%S/Inputs/PR28812 -verify %s
3 // RUN: %clang_cc1 -std=c++11 -nostdsysteminc -fmodules -fimplicit-module-maps \
4 // RUN: -fmodules-cache-path=%t -I%S/Inputs/PR28812 -verify %s
6 template <typename> struct VarStreamArrayIterator;
7 template <typename ValueType>
8 struct VarStreamArray {
9 typedef VarStreamArrayIterator<ValueType> Iterator;
10 Iterator begin() { return Iterator(*this); }
13 #include "Textual.h"
15 #include "a.h"
16 #include "b.h"
18 VarStreamArray<int> a;
19 auto b = a.begin();
21 // expected-no-diagnostics