[PR #14871] [MERGED] Fix a number of minor correctness issues that Clang flagged #30293

Open
opened 2026-01-31 09:39:54 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14871
Author: @DHowett
Created: 2/17/2023
Status: Merged
Merged: 2/18/2023
Merged by: @DHowett

Base: mainHead: dev/duhowett/2023-compiler/1-misc


📝 Commits (7)

  • d20fe26 lld-link: .def keywords should be uppercase
  • d479567 nodiscard must precede virtual/static
  • a9527d6 standardize precomp.h inclusion on "" instead of <>
  • 2752f0b correctness: don't co_await Dispatcher directly
  • 3883d3b Avoid calling the CharReaderBuilder constructor directly
  • 278b183 Avoid calling the StreamWriterBuilder constructor directly
  • fe85c4a ClipboardTests: construct KeyEvents directly instead of via copy

📊 Changes

16 files changed (+32 additions, -32 deletions)

View changed files

📝 src/cascadia/LocalTests_SettingsModel/JsonTestClass.h (+2 -2)
📝 src/cascadia/TerminalControl/TermControl.cpp (+2 -2)
📝 src/cascadia/TerminalSettingsModel/ApplicationState.cpp (+3 -3)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+1 -1)
📝 src/cascadia/TerminalSettingsModel/Command.cpp (+1 -1)
📝 src/cascadia/WindowsTerminal/BaseWindow.h (+1 -1)
📝 src/host/ut_host/ClipboardTests.cpp (+5 -5)
📝 src/propsheet/console.def (+2 -2)
📝 src/propslib/DelegationConfig.cpp (+1 -1)
📝 src/renderer/inc/IRenderEngine.hpp (+8 -8)
📝 src/terminal/adapter/adaptDispatchGraphics.cpp (+1 -1)
📝 src/terminal/adapter/telemetry.cpp (+1 -1)
📝 src/terminal/parser/telemetry.cpp (+1 -1)
📝 src/tools/lnkd/main.cpp (+1 -1)
📝 src/tools/pixels/main.cpp (+1 -1)
📝 src/tools/test/main.cpp (+1 -1)

📄 Description

  • lld-link is more strict about the casing of keywords in .def files
  • [[nodiscard]] must come before virtual and static qualifiers
  • precomp.h is never to be included with <>
  • We were calling the jsoncpp constructors directly (oops) as functions (oops)
  • ClipboardTests constructed KeyEvents by copy instead of directly

I don't know about the Dispatcher one, but it looks more correct this way. Also, it compiles. That was done before the C++/WinRT update, so maybe they fixed it as well.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/14871 **Author:** [@DHowett](https://github.com/DHowett) **Created:** 2/17/2023 **Status:** ✅ Merged **Merged:** 2/18/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/duhowett/2023-compiler/1-misc` --- ### 📝 Commits (7) - [`d20fe26`](https://github.com/microsoft/terminal/commit/d20fe263f9a5ccbbffadb52072fca5799efdb4b9) lld-link: .def keywords should be uppercase - [`d479567`](https://github.com/microsoft/terminal/commit/d47956700e34ab08c40b35b74b6337baeb0fb562) nodiscard must precede virtual/static - [`a9527d6`](https://github.com/microsoft/terminal/commit/a9527d6c8653380998d814d6ca1003fa5e9aae32) standardize precomp.h inclusion on "" instead of <> - [`2752f0b`](https://github.com/microsoft/terminal/commit/2752f0bcbaa147dc56ecfd009467c1cdebd4170d) correctness: don't co_await Dispatcher directly - [`3883d3b`](https://github.com/microsoft/terminal/commit/3883d3bd071504189544c8cec3fafcc8f676773d) Avoid calling the CharReaderBuilder constructor directly - [`278b183`](https://github.com/microsoft/terminal/commit/278b183bf07420e58ced289ca62accea91008b9d) Avoid calling the StreamWriterBuilder constructor directly - [`fe85c4a`](https://github.com/microsoft/terminal/commit/fe85c4aa2327550405636ea1f4af41309732c757) ClipboardTests: construct KeyEvents directly instead of via copy ### 📊 Changes **16 files changed** (+32 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_SettingsModel/JsonTestClass.h` (+2 -2) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+2 -2) 📝 `src/cascadia/TerminalSettingsModel/ApplicationState.cpp` (+3 -3) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/Command.cpp` (+1 -1) 📝 `src/cascadia/WindowsTerminal/BaseWindow.h` (+1 -1) 📝 `src/host/ut_host/ClipboardTests.cpp` (+5 -5) 📝 `src/propsheet/console.def` (+2 -2) 📝 `src/propslib/DelegationConfig.cpp` (+1 -1) 📝 `src/renderer/inc/IRenderEngine.hpp` (+8 -8) 📝 `src/terminal/adapter/adaptDispatchGraphics.cpp` (+1 -1) 📝 `src/terminal/adapter/telemetry.cpp` (+1 -1) 📝 `src/terminal/parser/telemetry.cpp` (+1 -1) 📝 `src/tools/lnkd/main.cpp` (+1 -1) 📝 `src/tools/pixels/main.cpp` (+1 -1) 📝 `src/tools/test/main.cpp` (+1 -1) </details> ### 📄 Description * `lld-link` is more strict about the casing of keywords in `.def` files * `[[nodiscard]]` must come before `virtual` and `static` qualifiers * `precomp.h` is never to be included with `<>` * We were calling the jsoncpp constructors directly (oops) as functions (oops) * ClipboardTests constructed `KeyEvent`s by copy instead of directly I don't know about the Dispatcher one, but it looks more correct this way. Also, it compiles. That was done before the C++/WinRT update, so maybe they fixed it as well. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:39:54 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30293