summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/merge-lifetime-extended-temporary.cpp
blob: 36db948b2c4efd33356b8c1f0a9dbee745eabba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-lifetime-extended-temporary -verify -std=c++11 %s -DORDER=1
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-lifetime-extended-temporary -verify -std=c++11 %s -DORDER=2

// expected-no-diagnostics
#if ORDER == 1
#include "c.h"
#include "b.h"
#else
#include "b.h"
#include "c.h"
#endif

static_assert(PtrTemp1 == &LETemp, "");
static_assert(PtrTemp1 == PtrTemp2, "");
OpenPOWER on IntegriCloud