-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
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 analyzerenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature
Description
When compiling the code
#include<stdbool.h>
void getBool(bool out);
void getInt(int out);
void test(bool *b, int* i);
void test(bool *b, int* i) {
getBool(b);
getInt(i);
}
with clang -std=c99 -Weverything -c bool_pointer_warning.c, I get a warning about the pointer argument of getInt, but not about the pointer argument of getBool.
I guess that is because a pointer is implicitly converted to a boolean, but it would be nice to be able to ask to be warned about the forgotten pointer dereference here.
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 analyzerenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature