If we pass a header to libclang, e.g. because it's open in an editor in
an IDE, warnings about unused const vars are not useful: other files
that include the header might use those constants. So when -x *-header
is passed as command-line option, suppress this warning.
Details
Details
- Reviewers
bkramer
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This makes sense. While variable definitions in a header are weird, the warning that they're unused isn't adding any value.
lib/Sema/Sema.cpp | ||
---|---|---|
870 | Doesn't look clang-formatted. |
Doesn't look clang-formatted.