forked from llvm-mirror/clang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[modules] Properly check whether a declaration is std::initializer_li…
…st. This bug is not actually modules-specific, but it's a little tricky to tickle it outside of modules builds, so submitting with the reduced testcase I have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230303 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
7 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module initializer_list { header "direct.h" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "direct.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module initializer_list { header "indirect.h" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
// RUN: rm -rf %t | ||
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 | ||
// | ||
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t \ | ||
// RUN: -I %S/Inputs/initializer_list \ | ||
// RUN: -fmodule-map-file=%S/Inputs/initializer_list/direct.modulemap \ | ||
// RUN: %s -verify -std=c++11 | ||
// | ||
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t \ | ||
// RUN: -I %S/Inputs/initializer_list \ | ||
// RUN: -fmodule-map-file=%S/Inputs/initializer_list/indirect.modulemap \ | ||
// RUN: %s -verify -std=c++11 -DINCLUDE_DIRECT | ||
|
||
// expected-no-diagnostics | ||
|
||
#ifdef INCLUDE_DIRECT | ||
#include "direct.h" | ||
auto k = {1, 2, 3}; | ||
#endif | ||
|
||
@import initializer_list; | ||
|
||
auto v = {1, 2, 3}; | ||
int n = std::min({1, 2, 3}); |