mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

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.
31 lines
583 B
C++
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"
|