mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

Close https://github.com/llvm/llvm-project/issues/38554 Close https://github.com/llvm/llvm-project/issues/58532 It looks like we can workaround the '#pragma once' problem automatically after we force the lazily loading for named modules. Add a test to show this.
22 lines
318 B
C++
22 lines
318 B
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: split-file %s %t
|
|
//
|
|
// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %t/c.cppm
|
|
|
|
//--- a.hpp
|
|
#pragma once
|
|
using a = int;
|
|
|
|
//--- b.hpp
|
|
#pragma once
|
|
#include "a.hpp"
|
|
a b;
|
|
|
|
//--- c.cppm
|
|
// expected-no-diagnostics
|
|
module;
|
|
#include "b.hpp"
|
|
export module c;
|
|
export using ::a;
|