-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Is there a flag or env var I can use to have less verbose warnings? I don't need the ascii art
z.cpp:5:13: warning: implicit truncation from 'E' to bit-field changes value from 2 to -2 [-Wbitfield-constant-conversion]
5 | S s{E::C};
| ^~~~
Seeing the line and pointing to s does nothing for me. I only want the first line. I tried looking for an option on this page but its large and I didn't see it https://clang.llvm.org/docs/DiagnosticsReference.html
Code:
#include <cstdio>
enum E : int { A, B, C, D };
struct S { E v : 2; };
int main() {
S s{E::C};
switch (s.v) {
case E::C: printf("Got C\n"); return 0;
default: printf("Got %d\n", s.v); return 0;
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!