forked from OSchip/llvm-project
Adding a failing test case for cpp11-migrate's Loop Convert Transform
Related to PR15589. llvm-svn: 177891
This commit is contained in:
parent
c8868106e6
commit
a9bf2fd9d1
|
@ -0,0 +1,7 @@
|
||||||
|
#define myns nsblah
|
||||||
|
|
||||||
|
namespace nsblah {
|
||||||
|
struct MyType {
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace nsblah
|
|
@ -0,0 +1,22 @@
|
||||||
|
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
|
||||||
|
// RUN: cp %t.cpp %t.base
|
||||||
|
// RUN: cpp11-migrate -loop-convert %t.cpp -- -I %S/Inputs
|
||||||
|
// RUN: FileCheck -input-file=%t.cpp %s
|
||||||
|
//
|
||||||
|
// See PR15589 for why this test fails.
|
||||||
|
// XFAIL: *
|
||||||
|
|
||||||
|
#include "macro_problem.h"
|
||||||
|
#include "structures.h"
|
||||||
|
|
||||||
|
void side_effect(const myns::MyType &T);
|
||||||
|
|
||||||
|
void f() {
|
||||||
|
TypedefDerefContainer<myns::MyType> container;
|
||||||
|
for (TypedefDerefContainer<myns::MyType>::iterator I = container.begin(),
|
||||||
|
E = container.end(); I != E; ++I) {
|
||||||
|
myns::MyType &alias = *I;
|
||||||
|
// CHECK: myns::MyType &ref = *I;
|
||||||
|
side_effect(ref);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue