Files
bootloader/.clangd
BlackMark d3d8d07905 editor: clangd and cmake work from a committed vscode workspace
The three files libavr's consumers carry, in the vendored shape: this repo
rides as a submodule (wateralarm), so .clangd names no database -- the
checkout that is opened as a folder names build/atmega328p-generated in
.vscode/settings.json -- and holds the stand-ins clang needs for GCC's AVR
dialect plus the removals for the codegen flags the loader TUs carry and
clang has no spelling for (-fira-algorithm, -fno-split-wide-types,
-fno-tree-ter, -fno-ivopts). The libavr pin advances to the editor-audit
fixes. The preset builds green from the pin and clangd reports zero errors
on pureboot.cpp.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-09 16:49:01 +02:00

38 lines
1.8 KiB
YAML

# Editor accommodations for the second frontend. No compilation database is
# named here: this repo rides as a submodule in its consumers, and this file
# travels with it — a consumer's own database then covers these sources, with
# that project's loader flags. The checkout that is opened as a folder names
# its build tree in .vscode/settings.json instead.
CompileFlags:
Add:
# clang has no 24-bit integer and GCC's are keywords, not macros, so the
# editor needs a stand-in for avr::uint24_t. The next width up is the only
# one available — clang rejects _BitInt(24) on this target.
- -D__uint24=unsigned long
- -D__int24=long
# clangd forwards the driver's system includes but not its own header
# directory, so <stdint.h> resolves to avr-libc's, which still gates the
# limit and constant macros on the C++98 opt-in.
- -D__STDC_LIMIT_MACROS
- -D__STDC_CONSTANT_MACROS
# isr::emit spells a vector number into [[gnu::signal(N)]], which clang
# rejects rather than ignores — enough of them in one TU to reach the
# default limit of 19 inside the headers and truncate the parse.
- -ferror-limit=0
Remove:
# Codegen shaping the loader TUs carry and clang has no spelling for.
- -fira-algorithm=*
- -fno-split-wide-types
- -fno-tree-ter
- -fno-ivopts
# The build promotes warnings for the compiler that has to be right about
# them; in the editor the flag paints a second frontend's opinions in the
# colour reserved for things that do not compile.
- -Werror
Diagnostics:
Suppress:
# clang's AVR `signal` attribute takes no arguments and it knows none of
# progmem, naked or OS_main. A misspelling is what the build is for.
- attribute_wrong_number_arguments
- unknown-attributes