diff options
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/cxx-templates-a.h | 2 | ||||
| -rw-r--r-- | clang/test/Modules/cxx-templates.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/cxx-templates-a.h b/clang/test/Modules/Inputs/cxx-templates-a.h index cc83d7bc034..aaafc1b1bdb 100644 --- a/clang/test/Modules/Inputs/cxx-templates-a.h +++ b/clang/test/Modules/Inputs/cxx-templates-a.h @@ -20,3 +20,5 @@ template<typename T> void PerformDelayedLookup(T &t) { typename T::Inner inner; FoundByADL(t); } + +template<typename T> void PerformDelayedLookupInDefaultArgument(T &t, int a = (FoundByADL(T()), 0)) {} diff --git a/clang/test/Modules/cxx-templates.cpp b/clang/test/Modules/cxx-templates.cpp index bb8ba034be1..79052dd34bb 100644 --- a/clang/test/Modules/cxx-templates.cpp +++ b/clang/test/Modules/cxx-templates.cpp @@ -51,6 +51,9 @@ void g() { // 'common'. That type is not visible here. PerformDelayedLookup(defined_in_common); + // Likewise, but via a default argument. + PerformDelayedLookupInDefaultArgument(defined_in_common); + // Trigger the instantiation of a template in 'b' that uses a type defined in // 'b_impl'. That type is not visible here. UseDefinedInBImpl<int>(); |

