clang/test/Modules/reference-tu-local-var.cppm
raw| 1 | // RUN: %clang_cc1 -std=c++23 %s -verify -fsyntax-only |
| 2 | export module M; |
| 3 | static int local; |
| 4 | export inline int exposure1() { return local; } // expected-warning {{TU local entity 'local' is exposed}} |
| 5 | |
| 6 | static int local2 = 43; |
| 7 | export extern "C++" { |
| 8 | inline int exposure2() { return local2; } // expected-warning {{TU local entity 'local2' is exposed}} |
| 9 | } |