llvm-project/lldb
Iain Sandoe ab28488efe [C++20][Modules][1/8] Track valid import state.
In C++20 modules imports must be together and at the start of the module.
Rather than growing more ad-hoc flags to test state, this keeps track of the
phase of of a valid module TU (first decl, global module frag, module,
private module frag).  If the phasing is broken (with some diagnostic) the
pattern does not conform to a valid C++20 module, and we set the state
accordingly.

We can thus issue diagnostics when imports appear in the wrong places and
decouple the C++20 modules state from other module variants (modules-ts and
clang modules).  Additionally, we attempt to diagnose wrong imports before
trying to find the module where possible (the latter will generally emit an
unhelpful diagnostic about the module not being available).

Although this generally simplifies the handling of C++20 module import
diagnostics, the motivation was that, in particular, it allows detecting
invalid imports like:

import module A;

int some_decl();

import module B;

where being in a module purview is insufficient to identify them.

Differential Revision: https://reviews.llvm.org/D118893
2022-02-21 09:09:37 +00:00
..
bindings [lldb/bindings] Expose the progress reporting machinery to the SWIG interface 2022-02-18 14:16:09 -08:00
cmake [lldb] Add support for a "global" lldbinit file 2022-02-18 12:30:22 +01:00
docs Platform gdb RSP packet doc fixes based on implementation behavior 2022-02-07 23:51:46 -08:00
examples [lldb/crashlog] Fix exception signal parsing 2022-02-16 11:44:07 -08:00
include/lldb [lldb] Add support for a "global" lldbinit file 2022-02-18 12:30:22 +01:00
packages/Python/lldbsuite Revert "Fix race condition when launching and attaching." 2022-02-18 12:11:37 +01:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source [C++20][Modules][1/8] Track valid import state. 2022-02-21 09:09:37 +00:00
test [lldb/bindings] Expose the progress reporting machinery to the SWIG interface 2022-02-18 14:16:09 -08:00
third_party/Python/module [lldb][NFC] Inclusive language: replace master/slave names for ptys 2021-11-12 10:54:18 -06:00
tools [lldb] Add support for a "global" lldbinit file 2022-02-18 12:30:22 +01:00
unittests [lldb] Don't rely on wrapping in PutRawBytes/PutBytesAsRawHex8 2022-02-15 20:38:25 -08:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
.gitignore
CMakeLists.txt [cmake] Make include(GNUInstallDirs) always below project(..) 2022-01-20 18:59:17 +00:00
CODE_OWNERS.txt [CODE OWNERS] Add wallace as code owner 2022-01-12 12:36:30 -08:00
LICENSE.TXT
use_lldb_suite_root.py