Clang has 3 messages for this flag.
- Code
-Wopenacc-extension- Severity
- warning
- Message
sub-array as a variable- Message
in ‘use_device’ clause- Message
on ‘declare’ construct
Clang enables it by default.
- Code
-Wopenacc-self-if-potential-conflict- Severity
- warning
- Message
OpenACC construct ‘self’ has no effect when an ‘if’ clause evaluates to true
Clang has 4 messages for this flag.
- Code
-Wopenacc-var-lacks-operation- Severity
- error
- Message
variable of type {} referenced in OpenACC ‘{}’ clause does not have a- Message
default constructor- Message
copy constructor- Message
destructor
Clang enables it by default.
- Code
-Wopenacc-var-non-const-array- Severity
- warning
- Message
variable of array type {} referenced in OpenACC ‘{}’ clause does not have constant bounds; initialization will happen after decay to pointer
Clang enables it by default.
- Code
-Wopencl-unsupported-rgba- Severity
- warning
- Message
vector component name ‘{}’ is a feature from OpenCL version 3.0 onwards
Clang enables some of the diagnostics that it controls by default. It also controls -Wopenmp-51-extensions, -Wopenmp-clauses, -Wopenmp-extensions, -Wopenmp-future, -Wopenmp-loop-form, -Wopenmp-mapping, -Wopenmp-target, -Wopenmp-target-exception, -Wsource-uses-openmp.
- Code
-Wopenmp- Severity
- warning
Clang enables it by default.
- Code
-Wopenmp-51-extensions- Severity
- warning
- Message
specifying OpenMP directives with [[]] is an OpenMP 5.1 extension
Clang enables it by default. Clang has 42 messages for this flag.
- Code
-Wopenmp-clauses- Severity
- warning
- Message
aligned clause will be ignored because the requested alignment is not a power of 2- Message
allocator with the ‘thread’ trait access has unspecified behavior on ‘{}’ directive- Message
the context property ‘{}’ is not valid for the context selector ‘{}’ and the context set ‘{}’; property ignored- Message
the context selector ‘{}’ in the context set ‘{}’ cannot have a score ({}); score ignored- Message
the context selector ‘{}’ is not valid for the context set ‘{}’; selector ignored- Message
the context selector ‘{}’ in context set ‘{}’ requires a context property defined in parentheses; selector ignored- Message
the context- Message
set
Clang enables it by default.
- Code
-Wopenmp-extensions- Severity
- warning
- Message
‘ompx_attribute’ clause only allows ‘amdgpu_flat_work_group_size’, ‘amdgpu_waves_per_eu’, and ‘launch_bounds’; {} is ignored
Clang enables it by default.
- Code
-Wopenmp-future- Severity
- warning
- Message
directive spelling ‘{}’ is introduced in a later OpenMP version
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wopenmp-loop-form- Severity
- warning
- Message
initialization clause of OpenMP for loop is not in canonical form (‘var = init’ or ‘T var = init’)- Message
OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed
Clang enables it by default.
- Code
-Wopenmp-mapping- Severity
- warning
- Message
type {} is not trivially copyable and not guaranteed to be mapped correctly
Clang enables it by default. It also controls -Wopenmp-mapping. Clang has 4 messages for this flag.
- Code
-Wopenmp-target- Severity
- warning
- Message
OpenMP offloading target ‘{}’ is similar to target ‘{}’ already specified; will be ignored- Message
declaration marked as declare target after first use, it may lead to incorrect results- Message
‘device_type(nohost)’ is not yet supported with ‘local’ clause; treating as ‘device_type(any)’- Message
declaration is not declared in any declare target region
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wopenmp-target-exception- Severity
- warning
- Message
target ‘{}’ does not support exception handling;- Message
‘throw’ is assumed to be never reached- Message
‘catch’ block is ignored
Clang enables it by default. Clang has 24 messages for this flag.
- Code
-Woption-ignored- Severity
- warning
- Message
invalid argument ‘{}’ not allowed with ‘{}’- Message
option ‘-ffine-grained-bitfield-accesses’ cannot be enabled together with a sanitizer; flag ignored- Message
-fjmc works only for ELF; option ignored- Message
‘{}’ is not valid for Fortran- Message
{} requires debug info. Use {} or debug options that enable debugger’s stepping function; option ignored- Message
ignoring ‘{}’ as it conflicts with that implied by ‘{}’ ({})- Message
‘{}’ does not support ‘-{}’; flag ignored- Message
‘{}’ does not support ‘-moutline’; flag ignored
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wordered-compare-function-pointers- Severity
- warning
- Message
ordered comparison of function pointers ({} and {})- Message
ordered comparison of function pointers ({} and {})
- Code
-Wout-of-line-declaration- Severity
- error
- Message
out-of-line declaration of a member must be a definition
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wout-of-scope-function- Severity
- warning
- Message
use of out-of-scope declaration of {}- Message
whose type is not compatible with that of an implicit declaration
- Code
-Wover-aligned- Severity
- warning
- Message
type {} requires {} bytes of alignment and the default allocator only guarantees {} bytes
- Code
-Woverflow- Severity
- warning
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Woverflow-behavior-attribute-ignored- Severity
- warning
- Message
{} attribute is ignored because it is not enabled; pass -Xclang -fexperimental-overflow-behavior-types- Message
‘{}’ specifier is ignored because overflow behavior types are not enabled; pass -Xclang -fexperimental-overflow-behavior-types- Message
redundant overflow behavior specification; both specifier and attribute specify ‘{}’
- Code
-Woverflow-behavior-conversion- Severity
- warning
Clang has 4 messages for this flag.
- Code
-Woverlength-strings- Severity
- warning
- Message
string literal of length {} exceeds maximum length {} that- Message
C90- Message
ISO C99- Message
C++
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Woverloaded-shift-op-parentheses- Severity
- warning
- Message
overloaded operator- Message
>>- Message
<<
Clang has 3 messages for this flag.
- Code
-Woverloaded-virtual- Severity
- warning
- Message
{} hides overloaded virtual- Message
function- Message
functions
- Code
-Woverride-init- Severity
- warning
Clang enables it by default.
- Code
-Woverride-module- Severity
- warning
- Message
overriding the module target triple with {}
Clang enables it by default.
- Code
-Woverriding-complex-range- Severity
- warning
- Message
‘{}’ sets complex range to “{}” overriding the setting of “{}” that was implied by ‘{}’
Clang enables it by default.
- Code
-Woverriding-deployment-version- Severity
- warning
- Message
overriding deployment version from ‘{}’ to ‘{}’
Clang has 9 messages for this flag.
- Code
-Woverriding-method-mismatch- Severity
- warning
- Message
conflicting distributed object modifiers on parameter type in declaration of {}- Message
conflicting parameter types in declaration of {}- Message
: {} vs {}- Message
conflicting distributed object modifiers on return type in declaration of {}- Message
conflicting return type in declaration of {}- Message
: {} vs {}- Message
conflicting variadic declaration of method and its implementation- Message
conflicting parameter types in declaration of {}: {} vs {}
Clang enables it by default.
- Code
-Woverriding-option- Severity
- warning
- Message
overriding ‘{}’ option with ‘{}’
It also controls -Wpacked-non-pod.
- Code
-Wpacked- Severity
- warning
- Message
packed attribute is unnecessary for {}
- Code
-Wpacked-non-pod- Severity
- warning
- Message
not packing field {} as it is non-POD for the purposes of layout
It also controls -Wpadded-bitfield. Clang has 18 messages for this flag.
- Code
-Wpadded- Severity
- warning
- Message
padding- Message
struct- Message
interface- Message
class- Message
byte- Message
bit- Message
s- Message
padding
Padding. -Wpadded-bitfield
Clang has 14 messages for this flag.
- Code
-Wpadded-bitfield- Severity
- warning
- Message
padding- Message
struct- Message
interface- Message
class- Message
byte- Message
bit- Message
s- Message
padding
Clang enables some of the diagnostics that it controls by default. It also controls -Wbitwise-conditional-parentheses, -Wbitwise-op-parentheses, -Wdangling-else, -Wlogical-not-parentheses, -Wlogical-op-parentheses, -Woverloaded-shift-op-parentheses, -Wparentheses-equality, -Wshift-op-parentheses. Clang has 5 messages for this flag.
- Code
-Wparentheses- Severity
- error
- Message
comparison in fold expression would evaluate to ‘(X {} Y) {} Z’ which does not behave the same as a mathematical expression- Message
using the result of an assignment as a condition without parentheses- Message
chained comparison ‘X {} Y {} Z’ does not behave the same as a mathematical expression- Message
{} has lower precedence than {}; {} will be evaluated first- Message
operator ‘?:’ has lower precedence than ‘{}’; ‘{}’ will be evaluated first
Clang enables it by default.
- Code
-Wparentheses-equality- Severity
- warning
- Message
equality comparison with extraneous parentheses
- Code
-Wpartial-availability- Severity
- warning
Clang enables it by default.
- Code
-Wpass-failed- Severity
- warning
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wpch-date-time- Severity
- warning
- Message
precompiled header- Message
module
Clang enables it by default.
- Code
-Wpch-vfs-diff- Severity
- warning
- Message
PCH was compiled with different VFS overlay files than are currently in use
It also controls -Wattribute-preprocessor-tokens, -Wauto-decl-extensions, -Wbit-int-extension, -Wc++11-extra-semi, -Wc++11-long-long, -Wc++14-attribute-extensions, -Wc++14-binary-literal, -Wc++17-attribute-extensions, -Wc++20-attribute-extensions, -Wc++20-designator, -Wc11-extensions, -Wcomplex-component-init and 51 more. Clang has 164 messages for this flag.
- Code
-Wpedantic- Severity
- warning
- Message
‘alignof’ on an incomplete array type is a C2y extension- Message
use of incomplete type {} in a ‘_Generic’ association is a C2y extension- Message
passing a type argument as the first operand to ‘_Generic’ is a C2y extension- Message
imaginary constants are a C2y extension- Message
‘- Message
–- Message
++- Message
[[]] attributes are a C23 extension
Clang has 4 messages for this flag.
- Code
-Wpedantic-core-features- Severity
- warning
- Message
{} is a core feature in- Message
OpenCL C- Message
C++ for OpenCL- Message
OpenCL extension {} is core feature or supported optional core feature - ignoring
Clang enables it by default. It also controls -Wbuiltin-macro-redefined, -Wdeprecated-pragma, -Wfinal-macro, -Wmacro-redefined, -Wrestrict-expansion.
- Code
-Wpedantic-macros- Severity
- warning
Function. -Wperf-constraint-implies-noexcept
Clang has 5 messages for this flag.
- Code
-Wperf-constraint-implies-noexcept- Severity
- warning
- Message
function- Message
constructor- Message
destructor- Message
lambda- Message
block
Clang has 2 messages for this flag.
- Code
-Wpessimizing-move- Severity
- warning
- Message
moving a temporary object prevents copy elision- Message
moving a local object in a return statement prevents copy elision
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wpgo-coverage- Severity
- warning
- Message
unsupported MC/DC boolean expression; number of conditions ({}) exceeds max ({}). Expression will not be covered- Message
unsupported MC/DC boolean expression; number of test vectors ({}) exceeds max ({}). Expression will not be covered
Clang enables some of the diagnostics that it controls by default. It also controls -Wgnu-pointer-arith. Clang has 3 messages for this flag.
- Code
-Wpointer-arith- Severity
- warning
- Message
invalid application of ‘{}’ to a function type- Message
invalid application of ‘{}’ to a void type- Message
subtraction of pointers to type {} of zero size has undefined behavior
Nonnull. -Wpointer-bool-conversion
Clang enables it by default. Clang has 8 messages for this flag.
- Code
-Wpointer-bool-conversion- Severity
- warning
- Message
nonnull- Message
function call- Message
parameter- Message
address of- Message
‘{}’- Message
function ‘{}’- Message
array ‘{}’- Message
lambda function pointer conversion operator
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wpointer-compare- Severity
- warning
- Message
comparing a pointer to a null character constant; did you mean to compare to- Message
NULL- Message
(void *)0
Clang enables it by default.
- Code
-Wpointer-integer-compare- Severity
- warning
- Message
comparison between pointer and integer ({} and {})
Clang enables it by default. Clang has 16 messages for this flag.
- Code
-Wpointer-sign- Severity
- warning
- Message
assigning to {} from {}- Message
assigning to different types- Message
passing {} to parameter of type {}- Message
passing to parameter of different type- Message
returning {} from a function with result type {}- Message
returning from function with different return type- Message
converting {} to type {}- Message
converting between types
Clang enables it by default. It also controls -Wvoid-pointer-to-enum-cast.
- Code
-Wpointer-to-enum-cast- Severity
- warning
- Message
cast to smaller integer type {} from {}
Clang enables it by default. It also controls -Wpointer-to-enum-cast, -Wvoid-pointer-to-int-cast.
- Code
-Wpointer-to-int-cast- Severity
- warning
- Message
cast to smaller integer type {} from {}
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wpointer-type-mismatch- Severity
- warning
- Message
pointer type mismatch- Message
({} and {})
- Code
-Wpoison-system-directories- Severity
- warning
- Message
include location ‘{}’ is unsafe for cross-compilation
Clang enables it by default.
- Code
-Wpotentially-direct-selector- Severity
- warning
- Message
@selector expression formed with potentially direct selector {}
Clang enables it by default.
- Code
-Wpotentially-evaluated-expression- Severity
- warning
- Message
expression with side effects will be evaluated despite being used as an operand to ‘typeid’
Clang enables it by default.
- Code
-Wpragma-clang-attribute- Severity
- warning
- Message
unused attribute {} in ‘#pragma clang attribute push’ region
Clang enables some of the diagnostics that it controls by default. It also controls -Wpragma-pack-suspicious-include. Clang has 2 messages for this flag.
- Code
-Wpragma-pack- Severity
- warning
- Message
the current #pragma pack alignment value is modified in the included file- Message
unterminated ‘#pragma pack (push, …)’ at end of file
- Code
-Wpragma-pack-suspicious-include- Severity
- warning
- Message
non-default #pragma pack value changes the alignment of struct or union members in the included file
Clang enables some of the diagnostics that it controls by default. It also controls -Wignored-pragmas, -Wpragma-clang-attribute, -Wpragma-pack, -Wunknown-pragmas. Clang has 4 messages for this flag.
- Code
-Wpragmas- Severity
- warning
- Message
setting the floating point evaluation method to `source` on a target without SSE is not supported- Message
#pragma redefine_extname is applicable to external C declarations only; not applied to- Message
function- Message
variable
- Code
-Wpre-c++2c-compat- Severity
- warning
- Code
-Wpre-c++2c-compat-pedantic- Severity
- warning
Clang has 3 messages for this flag.
- Code
-Wpre-c++2d-compat- Severity
- warning
- Message
defaulted postfix increment and decrement operators are incompatible with C++ standards before C++2d- Message
mathematical notation character {} in an identifier is incompatible with C++ standards before C++2d- Message
pack indexing for template names is incompatible with C++ standards before C++2d
- Code
-Wpre-c++2d-compat-pedantic- Severity
- warning
Clang has 17 messages for this flag.
- Code
-Wpre-c++14-compat- Severity
- warning
- Message
multiple return statements in constexpr function is incompatible with C++ standards before C++14- Message
variable declaration in a constexpr- Message
function- Message
constructor- Message
type definition in a constexpr- Message
function- Message
constructor- Message
use of this statement in a constexpr
It also controls -Wc++98-c++11-compat-binary-literal, -Wpre-c++14-compat.
- Code
-Wpre-c++14-compat-pedantic- Severity
- warning
Clang has 20 messages for this flag.
- Code
-Wpre-c++17-compat- Severity
- warning
- Message
constexpr if is incompatible with C++ standards before C++17- Message
‘constexpr’ on lambda expressions is incompatible with C++ standards before C++17- Message
‘static_assert’ with no message is incompatible with C++ standards before C++17- Message
structured binding declarations are incompatible with C++ standards before C++17- Message
pack fold expression is incompatible with C++ standards before C++17- Message
‘begin’ and ‘end’ returning different types ({} and {}) is incompatible with C++ standards before C++17- Message
‘- Message
if
It also controls -Wpre-c++17-compat. Clang has 4 messages for this flag.
- Code
-Wpre-c++17-compat-pedantic- Severity
- warning
- Message
hexadecimal floating literals are incompatible with C++ standards before C++17- Message
attributes on- Message
a namespace- Message
an enumerator
Clang has 45 messages for this flag.
- Code
-Wpre-c++20-compat- Severity
- warning
- Message
use of function template name with no prior declaration in function call with explicit template arguments is incompatible with C++ standards before C++20- Message
‘auto’ parameters are incompatible with C++ standards before C++20- Message
default member initializer for bit-field is incompatible with C++ standards before C++20- Message
captured structured bindings are incompatible with C++ standards before C++20- Message
constexpr constructor that does not initialize all members is incompatible with C++ standards before C++20- Message
function try block in constexpr- Message
function- Message
constructor
It also controls -Wpre-c++20-compat. Clang has 2 messages for this flag.
- Code
-Wpre-c++20-compat-pedantic- Severity
- warning
- Message
designated initializers are incompatible with C++ standards before C++20- Message
invoking a pointer to a ‘const &’ member function on an rvalue is incompatible with C++ standards before C++20
Clang has 31 messages for this flag.
- Code
-Wpre-c++23-compat- Severity
- warning
- Message
alias declaration in this context is incompatible with C++ standards before C++23- Message
‘auto’ as a functional-style cast is incompatible with C++ standards before C++23- Message
consteval if is incompatible with C++ standards before C++23- Message
definition of a- Message
static- Message
thread_local- Message
function- Message
constructor
- Code
-Wpre-c++23-compat-pedantic- Severity
- warning
Clang enables some of the diagnostics that it controls by default. Clang has 9 messages for this flag.
- Code
-Wpre-c++26-compat- Severity
- warning
- Message
an attribute specifier sequence attached to a structured binding declaration is incompatible with C++ standards before C++2c- Message
structured binding packs are incompatible with C++ standards before C++2c- Message
#embed is incompatible with C++ standards before C++2c- Message
structured binding declaration in a condition is incompatible with C++ standards before C++2c- Message
pack indexing is incompatible with C++ standards before C++2c- Message
placeholder variables are incompatible with C++ standards before C++2c- Message
‘static_assert’ with a user-generated message is incompatible with C++ standards before C++2c- Message
variadic ‘friend’ declarations are incompatible with C++ standards before C++2c
Clang enables some of the diagnostics that it controls by default. It also controls -Wpre-c++26-compat. Clang has 2 messages for this flag.
- Code
-Wpre-c++26-compat-pedantic- Severity
- warning
- Message
‘= delete’ with a message is incompatible with C++ standards before C++2c- Message
‘{}’ in a raw string literal delimiter is incompatible with C++ standards before C++2c
- Code
-Wpre-c2x-compat- Severity
- warning
- Code
-Wpre-c2x-compat-pedantic- Severity
- warning
‘. -Wpre-c2y-compat
Clang has 11 messages for this flag.
- Code
-Wpre-c2y-compat- Severity
- warning
- Message
‘- Message
if- Message
switch- Message
using static- Message
function- Message
variable- Message
‘{}’ is incompatible with C standards before C2y- Message
octal integer literals are incompatible with standards before C2y
It also controls -Wpre-c2y-compat. Clang has 7 messages for this flag.
- Code
-Wpre-c2y-compat-pedantic- Severity
- warning
- Message
‘alignof’ on an incomplete array type is incompatible with C standards before C2y- Message
use of incomplete type {} in a ‘_Generic’ association is incompatible with C standards before C2y- Message
passing a type argument as the first operand to ‘_Generic’ is incompatible with C standards before C2y- Message
imaginary constants are incompatible with C standards before C2y- Message
‘- Message
–- Message
++
- Code
-Wpre-c11-compat- Severity
- warning
- Message
‘{}’ is incompatible with C standards before C11
- Code
-Wpre-c11-compat-pedantic- Severity
- warning
It also controls -Wvariadic-macro-arguments-omitted. Clang has 21 messages for this flag.
- Code
-Wpre-c23-compat- Severity
- warning
- Message
use of a ‘#- Message
<BUG IF SEEN>- Message
elifdef- Message
elifndef- Message
#embed is incompatible with C standards before C23- Message
label at end of compound statement is incompatible with C standards before C23- Message
‘_Static_assert’ with no message is incompatible with C standards before C23- Message
‘…’ as the only parameter of a function is incompatible with C standards before C23
It also controls -Wpre-c23-compat. Clang has 6 messages for this flag.
- Code
-Wpre-c23-compat-pedantic- Severity
- warning
- Message
[[]] attributes are incompatible with C standards before C23- Message
enumeration types with a fixed underlying type are incompatible with C standards before C23- Message
label followed by a declaration is incompatible with C standards before C23- Message
declaration of non-local variable in ‘for’ loop is incompatible with C standards before C23- Message
non-variable declaration in ‘for’ loop is incompatible with C standards before C23- Message
‘restrict’ qualifier on an array of pointers is incompatible with C standards before C23
- Code
-Wpre-openmp-51-compat- Severity
- warning
- Message
specifying OpenMP directives with [[]] is incompatible with OpenMP standards before OpenMP 5.1
Clang enables it by default.
- Code
-Wpredefined-identifier-outside-function- Severity
- warning
- Message
predefined identifier is only valid inside function
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wpreferred-type-bitfield-enum-conversion- Severity
- warning
- Message
bit-field {} is not wide enough to store all enumerators of preferred type {}- Message
signed bit-field {} needs an extra bit to represent the largest positive enumerators of preferred type {}- Message
assigning value of preferred signed enum type {} to unsigned bit-field {}; negative enumerators of enum {} will be converted to positive values
- Code
-Wpreferred-type-bitfield-width- Severity
- warning
Clang enables it by default.
- Code
-Wprivate-extern- Severity
- warning
- Message
use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Wprivate-module- Severity
- warning
- Message
expected canonical name for private module ‘{}’- Message
private submodule ‘{}’ in private module map, expected top-level module- Message
module ‘{}’ already re-exported as ‘{}’- Message
no submodule named {} in module ‘{}’; using top level ‘{}’
Clang has 4 messages for this flag.
- Code
-Wprofile-instr-missing- Severity
- warning
- Message
profile data may be incomplete: of {} function- Message
s- Message
has- Message
have
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Wprofile-instr-out-of-date- Severity
- warning
- Message
profile data may be out of date: of {} function- Message
s- Message
has- Message
have
Clang enables it by default.
- Code
-Wprofile-instr-unprofiled- Severity
- warning
- Message
no profile data available for file “{}”
Clang enables it by default.
- Code
-Wproperty-access-dot-syntax- Severity
- warning
- Message
property {} not found on object of type {}; did you mean to access property {}?
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Wproperty-attribute-mismatch- Severity
- warning
- Message
property attribute in class extension does not match the primary class- Message
‘{}’ attribute on property {} does not match the property inherited from {}- Message
getter name mismatch between property redeclaration ({}) and its original declaration ({})- Message
attribute ‘readonly’ of property {} restricts attribute ‘readwrite’ of property inherited from {}
Clang enables it by default.
- Code
-Wprotocol- Severity
- warning
- Message
method {} in protocol {} not implemented
Property. -Wprotocol-property-synthesis-ambiguity
Clang enables it by default. Clang has 6 messages for this flag.
- Code
-Wprotocol-property-synthesis-ambiguity- Severity
- warning
- Message
property- Message
of type {}- Message
with attribute ‘{}’- Message
without attribute ‘{}’- Message
with getter {}- Message
with setter {}
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wpsabi- Severity
- warning
- Message
AVX vector- Message
return- Message
argument
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wptrauth-null-pointers- Severity
- warning
- Message
authenticating a null pointer will almost certainly trap- Message
signing a null pointer will yield a non-null pointer
Clang enables it by default.
- Code
-Wqualified-void-return-type- Severity
- warning
- Message
function cannot return qualified void type {}
It also controls -Wrange-loop-bind-reference, -Wrange-loop-construct.
- Code
-Wrange-loop-analysis- Severity
- warning
- Code
-Wrange-loop-bind-reference- Severity
- warning
- Message
loop variable {} binds to a temporary value produced by a range of type {}
Clang has 4 messages for this flag.
- Code
-Wrange-loop-construct- Severity
- warning
- Message
loop variable {}- Message
of type {} binds to a temporary constructed from type {}- Message
binds to a temporary constructed from a different type- Message
loop variable {} creates a copy from type {}
Clang enables it by default.
- Code
-Wread-only-types- Severity
- warning
- Message
object of type {} cannot be placed in read-only memory
Clang enables it by default.
- Code
-Wreadonly-iboutlet-property- Severity
- warning
- Message
readonly IBOutlet property {} when auto-synthesized may not work correctly with ‘nib’ loader
Clang enables it by default.
- Code
-Wreceiver-expr- Severity
- warning
- Message
receiver type {} is not ‘id’ or interface pointer, consider casting it to ‘id’
Clang enables some of the diagnostics that it controls by default. Clang has 2 messages for this flag.
- Code
-Wreceiver-forward-class- Severity
- warning
- Message
receiver {} is a forward class and corresponding @interface may not exist- Message
receiver type {} for instance message is a forward declaration
Clang enables it by default.
- Code
-Wredeclared-class-member- Severity
- warning
- Message
class member cannot be redeclared
Clang enables it by default.
- Code
-Wreduced-bmi-output-overrided- Severity
- warning
- Message
the implicit output of reduced BMI may be overrided by the output file specified by ‘–precompile’. please consider use ‘-fmodule-output=’ to specify the output file for reduced BMI explicitly
Clang enables it by default.
- Code
-Wredundant-attribute- Severity
- warning
- Message
redundant {} attribute
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wredundant-consteval-if- Severity
- warning
- Message
consteval if is always true in an- Message
unevaluated- Message
immediate
- Code
-Wredundant-decls- Severity
- warning
Clang enables it by default.
- Code
-Wredundant-defer- Severity
- warning
- Message
redundant use of ‘{}’; the deferred statement is executed immediately
- Code
-Wredundant-move- Severity
- warning
- Message
redundant move in return statement
- Code
-Wredundant-parens- Severity
- warning
- Message
redundant parentheses surrounding declarator
Clang enables it by default.
- Code
-Wreference-tu-local-entity-in-other-tu- Severity
- warning
- Message
instantiation of {} triggers reference to TU-local entity {} from other TU ‘{}’
Clang enables it by default. It also controls -Wdeprecated-register.
- Code
-Wregister- Severity
- error
- Message
ISO C++17 does not allow ‘register’ storage class specifier
Clang enables it by default. Clang has 7 messages for this flag.
- Code
-Wreinterpret-base-class- Severity
- warning
- Message
‘reinterpret_cast’- Message
from- Message
to- Message
to- Message
from- Message
virtual base- Message
base at non-zero offset
Clang has 2 messages for this flag.
- Code
-Wrelaxed-constant-fold- Severity
- warning
- Message
folding constant expression involving cast that performs the conversions of a reinterpret_cast is a Microsoft extension- Message
folding constant expression that takes field address of null pointer is a Microsoft extension
Clang enables some of the diagnostics that it controls by default. It also controls -Wreorder-ctor, -Wreorder-init-list.
- Code
-Wreorder- Severity
- warning
Field. -Wreorder-ctor
Clang has 5 messages for this flag.
- Code
-Wreorder-ctor- Severity
- warning
- Message
field- Message
base class- Message
field- Message
base- Message
initializer order does not match the declaration order
Clang enables it by default.
- Code
-Wreorder-init-list- Severity
- warning
- Message
ISO C++ requires field designators to be specified in declaration order; field {} will be initialized after field {}
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wrequires-super-attribute- Severity
- warning
- Message
{} attribute cannot be applied to- Message
methods in protocols- Message
dealloc
- Code
-Wreserved-attribute-identifier- Severity
- warning
- Message
{} is a reserved attribute identifier
- Code
-Wreserved-id-macro- Severity
- warning
Clang enables some of the diagnostics that it controls by default. It also controls -Wreserved-attribute-identifier, -Wreserved-macro-identifier, -Wreserved-module-identifier, -Wuser-defined-literals. Clang has 8 messages for this flag.
- Code
-Wreserved-identifier- Severity
- warning
- Message
‘long long’ is a reserved data type in OpenCL C- Message
identifier {} is reserved because- Message
<ERROR>- Message
it starts with ‘_’ at global scope- Message
it starts with ‘_’ and has C language linkage- Message
it starts with ‘__’- Message
it starts with ‘_’ followed by a capital letter- Message
it contains ‘__’
- Code
-Wreserved-macro-identifier- Severity
- warning
- Message
macro name is a reserved identifier
Clang enables it by default.
- Code
-Wreserved-module-identifier- Severity
- warning
- Message
{} is a reserved name for a module
Clang enables some of the diagnostics that it controls by default. It also controls -Wc++11-compat-reserved-user-defined-literal. Clang has 2 messages for this flag.
- Code
-Wreserved-user-defined-literal- Severity
- warning
- Message
invalid suffix on literal; C++11 requires a space between literal and identifier- Message
invalid suffix on literal; C++11 requires a space between literal and identifier
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wrestrict-expansion- Severity
- warning
- Message
macro {} has been marked as unsafe for use in headers- Message
: {}
- Code
-Wretained-language-linkage- Severity
- warning
- Message
friend function {} retaining previous language linkage is an extension
- Code
-Wreturn-local-addr- Severity
- warning
Clang has 10 messages for this flag.
- Code
-Wreturn-mismatch- Severity
- error
- Message
void function- Message
void method- Message
constructor- Message
destructor- Message
non-void- Message
function- Message
method- Message
non-void
Passing. -Wreturn-stack-address
Clang enables it by default. Clang has 14 messages for this flag.
- Code
-Wreturn-stack-address- Severity
- warning
- Message
passing- Message
address of- Message
reference to- Message
returning address of label, which is local- Message
returning- Message
address of- Message
reference to- Message
address of
- Code
-Wreturn-std-move- Severity
- warning
Clang enables it by default. It also controls -Wreturn-mismatch, -Wreturn-type-c-linkage. Clang has 6 messages for this flag.
- Code
-Wreturn-type- Severity
- warning
- Message
non-void- Message
function- Message
block- Message
lambda- Message
coroutine- Message
in all control paths
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wreturn-type-c-linkage- Severity
- warning
- Message
{} has C-linkage specified, but returns user-defined type {} which is incompatible with C- Message
{} has C-linkage specified, but returns incomplete type {} which could be incompatible with C
Clang enables it by default.
- Code
-Wrewrite-not-bool- Severity
- warning
- Message
ISO C++20 requires return type of selected ‘operator==’ function for rewritten ‘{}’ comparison to be ‘bool’, not {}
Clang enables it by default.
- Code
-Wriscv-be-experimental- Severity
- warning
- Message
big-endian RISC-V target support is experimental
Clang enables it by default. Clang has 6 messages for this flag.
- Code
-Wrtti- Severity
- warning
- Message
dynamic_cast will not work since RTTI data is disabled by- Message
-fno-rtti-data- Message
/GR-- Message
typeid will not work since RTTI data is disabled by- Message
-fno-rtti-data- Message
/GR-
Clang enables it by default.
- Code
-Wsarif-format-unstable- Severity
- warning
- Message
diagnostic formatting in SARIF mode is currently unstable
Clang has 22 messages for this flag.
- Code
-Wscalable-static-analysis-framework- Severity
- error
- Message
no summary extractor- Message
s- Message
was- Message
were- Message
failed to parse the value of ‘–ssaf-tu-summary-file={}’ the value must follow the ‘<path>.<format>’ pattern- Message
unknown output summary file format ‘{}’ specified by ‘–ssaf-tu-summary-file={}’- Message
must enable some summary extractors using the ‘–ssaf-extract-summaries=’ option- Message
option ‘
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Wsection- Severity
- warning
- Message
section attribute is specified on redeclared variable- Message
duplicate code segment specifiers- Message
codeseg- Message
section
It also controls -Wselector-type-mismatch.
- Code
-Wselector- Severity
- warning
- Message
no method with selector {} is implemented in this translation unit
- Code
-Wselector-type-mismatch- Severity
- warning
- Message
several methods with selector {} of mismatched types are found for the @selector expression
Clang enables some of the diagnostics that it controls by default. It also controls -Wself-assign-field, -Wself-assign-overloaded. Clang has 2 messages for this flag.
- Code
-Wself-assign- Severity
- warning
- Message
explicitly assigning value of variable of type {} to itself- Message
; did you mean to assign to member {}?
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wself-assign-field- Severity
- warning
- Message
assigning- Message
field- Message
instance variable
Clang has 2 messages for this flag.
- Code
-Wself-assign-overloaded- Severity
- warning
- Message
explicitly assigning value of variable of type {} to itself- Message
; did you mean to assign to member {}?
Clang has 2 messages for this flag.
- Code
-Wself-move- Severity
- warning
- Message
explicitly moving variable of type {} to itself- Message
; did you mean to move to member {}?
- Code
-Wsemicolon-before-method-body- Severity
- warning
- Message
semicolon before method body is ignored
Clang enables it by default. Clang has 5 messages for this flag.
- Code
-Wsentinel- Severity
- warning
- Message
missing sentinel in- Message
function call- Message
method dispatch- Message
block call- Message
not enough variable arguments in {} declaration to fit a sentinel
- Code
-Wsequence-point- Severity
- warning
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wserialized-diagnostics- Severity
- warning
- Message
unable to open file {} for serializing diagnostics ({})- Message
received warning after diagnostic serialization teardown was underway: {}- Message
unable to merge a subprocess’s serialized diagnostics
Clang enables some of the diagnostics that it controls by default. It also controls -Wshadow-field-in-constructor-modified, -Wshadow-ivar. Clang has 8 messages for this flag.
- Code
-Wshadow- Severity
- warning
- Message
declaration shadows a- Message
local variable- Message
variable in {}- Message
static data member of {}- Message
field of {}- Message
typedef in {}- Message
type alias in {}- Message
structured binding
Clang enables some of the diagnostics that it controls by default. It also controls -Wshadow, -Wshadow-field, -Wshadow-field-in-constructor, -Wshadow-uncaptured-local.
- Code
-Wshadow-all- Severity
- warning
Clang has 3 messages for this flag.
- Code
-Wshadow-field- Severity
- warning
- Message
parameter- Message
non-static data member- Message
of {}
It also controls -Wshadow-field-in-constructor-modified.
- Code
-Wshadow-field-in-constructor- Severity
- warning
- Message
constructor parameter {} shadows the field {} of {}
- Code
-Wshadow-field-in-constructor-modified- Severity
- warning
- Message
modifying constructor parameter {} that shadows a field of {}
- Code
-Wshadow-header- Severity
- warning
- Message
multiple candidates for header ‘{}’ found; directory ‘{}’ chosen, ignoring others including ‘{}’
Clang enables it by default.
- Code
-Wshadow-ivar- Severity
- warning
- Message
local declaration of {} hides instance variable
Clang has 8 messages for this flag.
- Code
-Wshadow-uncaptured-local- Severity
- warning
- Message
declaration shadows a- Message
local variable- Message
variable in {}- Message
static data member of {}- Message
field of {}- Message
typedef in {}- Message
type alias in {}- Message
structured binding
- Code
-Wshift-bool- Severity
- warning
- Message
right shifting a ‘bool’ implicitly converts it to ‘int’
Clang enables it by default.
- Code
-Wshift-count-negative- Severity
- warning
- Message
shift count is negative
Clang enables it by default.
- Code
-Wshift-count-overflow- Severity
- warning
- Message
shift count >= width of type
Clang enables it by default.
- Code
-Wshift-negative-value- Severity
- warning
- Message
shifting a negative signed value is undefined
Clang enables it by default.
- Code
-Wshift-op-parentheses- Severity
- warning
- Message
operator ‘{}’ has lower precedence than ‘{}’; ‘{}’ will be evaluated first
Clang enables it by default.
- Code
-Wshift-overflow- Severity
- warning
- Message
signed shift result ({}) requires {} bits to represent, but {} only has {} bits
- Code
-Wshift-sign-overflow- Severity
- warning
- Message
signed shift result ({}) sets the sign bit of the shift expression’s type ({}) and becomes negative
- Code
-Wshorten-64-to-32- Severity
- warning
- Message
implicit conversion loses integer precision: {} to {}
- Code
-Wsign-compare- Severity
- warning
- Message
comparison of integers of different signs: {} and {}
Clang has 3 messages for this flag.
- Code
-Wsign-conversion- Severity
- warning
- Message
implicit conversion changes signedness: {} to {}- Message
operand of ? changes signedness: {} to {}- Message
the resulting value is always non-negative after implicit conversion
- Code
-Wsign-promo- Severity
- warning
- Code
-Wsigned-enum-bitfield- Severity
- warning
- Message
enums in the Microsoft ABI are signed integers by default; consider giving the enum {} an unsigned underlying type to make this code portable
- Code
-Wsigned-unsigned-wchar- Severity
- error
- Message
‘{}’ cannot be signed or unsigned
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wsimdlen- Severity
- warning
- Message
the clause simdlen(1) has no effect when targeting aarch64- Message
the clause simdlen must fit the {}-bit lanes in the architectural constraints for SVE (min is 128-bit, max is 2048-bit, by steps of 128-bit)- Message
the value specified in simdlen must be a power of 2 when targeting Advanced SIMD
Clang enables it by default.
- Code
-Wsingle-bit-bitfield-constant-conversion- Severity
- warning
- Message
implicit truncation from {} to a one-bit wide bit-field changes value from {} to {}
Clang enables it by default.
- Code
-Wsizeof-array-argument- Severity
- warning
- Message
sizeof on array function parameter will return size of {} instead of {}
Clang enables it by default.
- Code
-Wsizeof-array-decay- Severity
- warning
- Message
sizeof on pointer operation will return size of {} instead of {}
Clang enables it by default.
- Code
-Wsizeof-array-div- Severity
- warning
- Message
expression does not compute the number of elements in this array; element type is {}, not {}
Clang enables it by default.
- Code
-Wsizeof-pointer-div- Severity
- warning
- Message
{} will return the size of the pointer, not the array itself
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Wsizeof-pointer-memaccess- Severity
- warning
- Message
‘{}’ call operates on objects of type {} while the size is based on a different type {}- Message
argument to ‘sizeof’ in {} call is the same pointer type {} as the- Message
destination- Message
source
Clang enables it by default.
- Code
-Wslash-u-filename- Severity
- warning
- Message
‘/U{}’ treated as the ‘/U’ option
Clang enables it by default.
- Code
-Wslh-asm-goto- Severity
- warning
- Message
speculative load hardening does not protect functions with asm goto
Clang has 15 messages for this flag.
- Code
-Wsometimes-uninitialized- Severity
- warning
- Message
variable {} is- Message
used- Message
captured- Message
‘{}’ condition is- Message
true- Message
false- Message
‘{}’ loop- Message
is entered
Clang enables it by default.
- Code
-Wsource-mgr- Severity
- warning
Clang enables some of the diagnostics that it controls by default. Clang has 3 messages for this flag.
- Code
-Wsource-uses-openacc- Severity
- warning
- Message
OpenACC construct ‘routine’ with implicit function not yet implemented, pragma ignored- Message
OpenACC directives will result in no runtime behavior; use -fclangir to enable runtime effect- Message
unexpected ‘#pragma acc …’ in program
Clang enables some of the diagnostics that it controls by default. Clang has 8 messages for this flag.
- Code
-Wsource-uses-openmp- Severity
- warning
- Message
‘#pragma omp declare variant’ cannot be applied to the function that was defined already; the original function might be used- Message
‘#pragma omp declare variant’ cannot be applied for function after first usage; the original function might be used- Message
variant function in ‘#pragma omp declare variant’ is itself marked as ‘#pragma omp declare variant’- Message
score expressions in the OpenMP context selector need to be constant; {} is not and will be ignored- Message
OpenMP only allows an ordered construct with the simd clause nested in a simd construct- Message
expected ‘#pragma omp end declare target’ at end of file to match ‘#pragma omp {}’- Message
unexpected ‘#pragma omp …’ in program- Message
isa trait ‘{}’ is not known to the current target; verify the spelling or consider restricting the context selector with the ‘arch’ selector further
Clang enables some of the diagnostics that it controls by default. Clang has 2 messages for this flag.
- Code
-Wspir-compat- Severity
- warning
- Message
‘{}’ sampler must use CLK_FILTER_NEAREST- Message
sampler initializer has invalid {} bits
- Code
-Wspirv-compat- Severity
- warning
Clang enables it by default.
- Code
-Wspirv-validation- Severity
- warning
- Message
spirv-val not found; resulting SPIR-V will not be validated
Clang enables it by default.
- Code
-Wstack-exhausted- Severity
- warning
- Message
stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely
Clang enables it by default.
- Code
-Wstack-protector- Severity
- warning
- Message
unable to protect inline asm that clobbers stack pointer against stack clash
Clang enables it by default. It also controls -Wgnu-static-float-init.
- Code
-Wstatic-float-init- Severity
- error
- Message
in-class initializer for static data member of type {} requires ‘constexpr’ specifier
Clang enables some of the diagnostics that it controls by default. Clang has 6 messages for this flag.
- Code
-Wstatic-in-inline- Severity
- warning
- Message
using static- Message
function- Message
variable- Message
using static- Message
function- Message
variable
Ignoring ‘. -Wstatic-inline-explicit-instantiation
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wstatic-inline-explicit-instantiation- Severity
- warning
- Message
ignoring ‘- Message
static- Message
inline
Clang enables it by default.
- Code
-Wstatic-local-in-inline- Severity
- warning
- Message
non-constant static local variable in inline function may be different in different files