Skip to content

Commit 4220545

Browse files
bzbarsky-applepull[bot]
authored andcommitted
Enable the clang documentation warning. (#15913)
This keeps catching people writing comments that do not match their code. Easier to do it via automation than via manual reviews.
1 parent 3fb9de4 commit 4220545

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/darwin.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,10 @@ jobs:
8282
# enable it for various reasons. Keep whatever Xcode settings
8383
# for OTHER_CFLAGS exist by using ${inherited}.
8484
#
85-
# Disable -Wdocumentation because so much of our doxygen is so
86-
# broken. See https://github.com/project-chip/connectedhomeip/issues/6734
87-
#
8885
# Disable -Wmacro-redefined because CHIP_DEVICE_CONFIG_ENABLE_MDNS
8986
# seems to be unconditionally defined in CHIPDeviceBuildConfig.h,
9087
# which is apparently being included after CHIPDeviceConfig.h.
91-
run: xcodebuild -target "CHIP" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-documentation -Wno-macro-redefined'
88+
run: xcodebuild -target "CHIP" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-macro-redefined'
9289
working-directory: src/darwin/Framework
9390
- name: Clean Build
9491
run: xcodebuild clean
@@ -117,7 +114,7 @@ jobs:
117114
run: |
118115
mkdir -p /tmp/darwin/framework-tests
119116
../../../out/debug/chip-all-clusters-app > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
120-
xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-documentation -Wno-incomplete-umbrella' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
117+
xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-incomplete-umbrella' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
121118
working-directory: src/darwin/Framework
122119
- name: Uploading log files
123120
uses: actions/upload-artifact@v2

src/lib/core/CHIPEncoding.h

+9
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,19 @@
3333

3434
#pragma once
3535

36+
// The nlio headers use [inout] instead of [in,out], which makes the clang
37+
// documentation warning unhappy. Suppress it for those headers.
38+
#pragma GCC diagnostic push
39+
#ifdef __clang__
40+
#pragma GCC diagnostic ignored "-Wdocumentation"
41+
#endif // __clang__
42+
3643
#include <nlbyteorder.hpp>
3744
#include <nlio-byteorder.hpp>
3845
#include <nlio.hpp>
3946

47+
#pragma GCC diagnostic pop
48+
4049
#include <stdint.h>
4150

4251
namespace chip {

0 commit comments

Comments
 (0)