llvm-capstone/clang/test/Modules/redundant-template-default-arg5.cpp
Chuanqi Xu 52bc4b16cb [NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into
Decl::isInAnotherModuleUnit

Refactor `Sema::isModuleUnitOfCurrentTU` to `Decl::isInAnotherModuleUnit`
to make code simpler a little bit. Note that although this patch
introduces a FIXME, this is an existing issue and this patch just tries
to describe it explicitly.
2023-05-23 10:52:22 +08:00

31 lines
583 B
C++

// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 -fmodules -fmodule-name=mod -xc++ -emit-module %t/mod.cppmap -o %t/mod.pcm
// RUN: %clang_cc1 -std=c++20 -fmodules -fmodule-file=%t/mod.pcm -fsyntax-only %t/use.cc -verify
//--- mod.cppmap
module "mod" {
export *
header "mod.h"
}
//--- mod.h
#ifndef MOD
#define MOD
#include "templ.h"
#endif
//--- templ.h
#ifndef TEMPL
#define TEMPL
template <typename t1 = void>
inline constexpr bool inl = false;
#endif
//--- use.cc
// expected-no-diagnostics
#include "templ.h"
#include "mod.h"