Skip to content

Conversation

@kralicky
Copy link
Collaborator

@kralicky kralicky commented Sep 29, 2025

Because we use the clang safe buffers feature (https://clang.llvm.org/docs/SafeBuffers.html), some external dependency includes need to be wrapped with pragma statements that disable/enable these warnings. We can try using the --system-header-prefix flag (https://github.com/llvm/llvm-project/blob/main/clang/docs/UsersManual.rst#controlling-diagnostics-in-system-headers) to tell clang that certain header prefixes contain "system" headers, which suppresses warnings. The include paths for external envoy headers and our own headers share the same directory structure, and this flag only operates on the include paths as they appear in the source code (instead of the resolved "external/" headers), so by default none of the envoy headers are treated as system headers.

We can add the envoy/, absl/, and api/ prefixes to the system headers list, since these contain envoy public api definitions, abseil code, and generated api code respectively. We also add source/common/common/ to suppress warnings in envoy common code, and source/common/buffer/ (which most of the warnings originate from), which is fine as long as we don't use these paths in our own code in the future.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 18108646320

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 31 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 99.401%

Files with Coverage Reduction New Missed Lines %
source/extensions/filters/network/ssh/stream_tracker.h 31 27.91%
Totals Coverage Status
Change from base Build 18108397656: -0.6%
Covered Lines: 5145
Relevant Lines: 5176

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants