Clang has 2 messages for this flag.
- Code
-Wfunction-effect-redeclarations- Severity
- warning
- Message
overriding function is missing ‘{}’ attribute from base declaration- Message
redeclaration is missing ‘{}’ attribute from previous declaration
Clang has 31 messages for this flag.
- Code
-Wfunction-effects- Severity
- warning
- Message
attribute ‘{}’ on overriding function conflicts with base declaration- Message
effects conflict when merging declarations; kept ‘{}’, discarded ‘{}’- Message
function- Message
constructor- Message
destructor- Message
lambda- Message
block- Message
member initializer of constructor
Clang enables it by default. It also controls -Wtarget-clones-mixed-specifiers. Clang has 7 messages for this flag.
- Code
-Wfunction-multiversion- Severity
- warning
- Message
body of cpu_dispatch function will be ignored- Message
priority of default version cannot be overridden; ignoring priority- Message
CPU list contains duplicate entries; attribute ignored- Message
version list contains duplicate entries- Message
version list contains entries that don’t impact code generation- Message
function version ‘{}’ is unreachable; ignoring version- Message
version priority ‘{}’ is outside the allowed range [1-255]; ignoring priority
- Code
-Wfuse-ld-path- Severity
- warning
- Message
‘-fuse-ld=’ taking a path is deprecated; use ‘–ld-path=’ instead
It also controls -Wc++14-attribute-extensions, -Wc++17-attribute-extensions, -Wc++20-attribute-extensions, -Wc++23-attribute-extensions.
- Code
-Wfuture-attribute-extensions- Severity
- warning
- Code
-Wfuture-compat- Severity
- warning
Clang enables some of the diagnostics that it controls by default. Clang has 9 messages for this flag.
- Code
-Wgcc-compat- Severity
- warning
- Message
‘diagnose_if’ is a clang extension- Message
‘enable_if’ is a clang extension- Message
__final is a GNU extension, consider using C++11 final- Message
GCC does not allow {} attribute in this position on a function definition- Message
GCC does not allow the ‘cleanup’ attribute argument to be anything other than a simple identifier- Message
GCC does not allow an attribute in this position on a function declaration- Message
GCC does not allow the {} attribute to be written on a type- Message
GCC requires a function with the {} attribute to be variadic
Clang enables it by default.
- Code
-Wgcc-install-dir-libstdcxx- Severity
- warning
- Message
future releases of the clang compiler will prefer GCC installations containing libstdc++ include directories; ‘{}’ would be chosen over ‘{}’
Clang has 2 messages for this flag.
- Code
-Wglobal-constructors- Severity
- warning
- Message
declaration requires a global constructor- Message
declaration requires a global destructor
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wglobal-isel- Severity
- warning
- Message
-fglobal-isel support for the ‘{}’ architecture is incomplete- Message
-fglobal-isel support is incomplete for this architecture at the current optimization level
Clang enables some of the diagnostics that it controls by default. It also controls -Wgnu-alignof-expression, -Wgnu-anonymous-struct, -Wgnu-auto-type, -Wgnu-binary-literal, -Wgnu-case-range, -Wgnu-complex-integer, -Wgnu-compound-literal-initializer, -Wgnu-conditional-omitted-operand, -Wgnu-designator, -Wgnu-empty-struct, -Wgnu-flexible-array-initializer, -Wgnu-flexible-array-union-member and 19 more.
- Code
-Wgnu- Severity
- warning
Clang enables it by default.
- Code
-Wgnu-alignof-expression- Severity
- warning
- Message
{} applied to an expression is a GNU extension
- Code
-Wgnu-anonymous-struct- Severity
- warning
- Message
anonymous structs are a GNU extension
- Code
-Wgnu-array-member-paren-init- Severity
- error
- Message
parenthesized initialization of a member array is a GNU extension
- Code
-Wgnu-auto-type- Severity
- warning
- Message
‘__auto_type’ is a GNU extension
- Code
-Wgnu-binary-literal- Severity
- warning
- Code
-Wgnu-case-range- Severity
- warning
- Message
case ranges are a GNU extension
- Code
-Wgnu-complex-integer- Severity
- warning
- Message
complex integer types are a GNU extension
Clang has 3 messages for this flag.
- Code
-Wgnu-compound-literal-initializer- Severity
- warning
- Message
initialization of an array- Message
of type {} from a compound literal of type {}- Message
from a compound literal
- Code
-Wgnu-conditional-omitted-operand- Severity
- warning
- Message
use of GNU ?: conditional expression extension, omitting middle operand
Clang enables some of the diagnostics that it controls by default. Clang has 3 messages for this flag.
- Code
-Wgnu-designator- Severity
- warning
- Message
use of GNU array range extension- Message
use of GNU ‘missing =’ extension in designator- Message
use of GNU old-style field designator extension
- Code
-Wgnu-empty-initializer- Severity
- warning
Empty. -Wgnu-empty-struct
Clang has 11 messages for this flag.
- Code
-Wgnu-empty-struct- Severity
- warning
- Message
empty- Message
struct- Message
union- Message
flexible array member {} in otherwise empty- Message
struct- Message
interface- Message
union- Message
class
- Code
-Wgnu-flexible-array-initializer- Severity
- warning
- Message
flexible array initialization is a GNU extension
- Code
-Wgnu-flexible-array-union-member- Severity
- warning
- Message
flexible array member {} in a union is a GNU extension
Clang enables some of the diagnostics that it controls by default. Clang has 5 messages for this flag.
- Code
-Wgnu-folding-constant- Severity
- warning
- Message
expression is not an- Message
integer- Message
integral- Message
in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension- Message
variable length array folded to constant array as an extension
- Code
-Wgnu-imaginary-constant- Severity
- warning
- Message
imaginary constants are a GNU extension
- Code
-Wgnu-include-next- Severity
- warning
- Message
#include_next is a language extension
Clang enables it by default.
- Code
-Wgnu-inline-cpp-without-extern- Severity
- warning
- Message
‘gnu_inline’ attribute without ‘extern’ in C++ treated as externally available, this changed in Clang 10
Clang has 2 messages for this flag.
- Code
-Wgnu-label-as-value- Severity
- warning
- Message
use of GNU address-of-label extension- Message
use of GNU indirect-goto extension
- Code
-Wgnu-line-marker- Severity
- warning
- Message
this style of line directive is a GNU extension
- Code
-Wgnu-null-pointer-arithmetic- Severity
- warning
- Message
arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
- Code
-Wgnu-offsetof-extensions- Severity
- warning
‘. -Wgnu-pointer-arith
Clang has 19 messages for this flag.
- Code
-Wgnu-pointer-arith- Severity
- warning
- Message
‘- Message
counted_by- Message
sized_by- Message
counted_by_or_null- Message
sized_by_or_null- Message
sized_by- Message
sized_by- Message
sized_by_or_null
- Code
-Wgnu-redeclared-enum- Severity
- warning
- Message
redeclaration of already-defined enum {} is a GNU extension
It also controls -Wgnu-statement-expression-from-macro-expansion.
- Code
-Wgnu-statement-expression- Severity
- warning
- Message
use of GNU statement expression extension
- Code
-Wgnu-statement-expression-from-macro-expansion- Severity
- warning
- Message
use of GNU statement expression extension from macro expansion
Clang enables it by default.
- Code
-Wgnu-static-float-init- Severity
- warning
- Message
in-class initializer for static data member of type {} is a GNU extension
Clang enables it by default.
- Code
-Wgnu-string-literal-operator-template- Severity
- warning
- Message
string literal operator templates are a GNU extension
- Code
-Wgnu-union-cast- Severity
- warning
- Message
cast to union type is a GNU extension
Clang enables it by default.
- Code
-Wgnu-variable-sized-type-not-at-end- Severity
- warning
- Message
field {} with variable sized type {} not at the end of a struct or class is a GNU extension
- Code
-Wgnu-zero-line-directive- Severity
- warning
- Message
#line directive with zero argument is a GNU extension
It also controls -Wvariadic-macro-arguments-omitted. Clang has 2 messages for this flag.
- Code
-Wgnu-zero-variadic-macro-arguments- Severity
- warning
- Message
token pasting of ‘,’ and ‘__VA_ARGS__’ is a GNU extension- Message
; consider using ‘__VA_OPT__(,)’ instead
Clang enables it by default.
- Code
-Wgpu-maybe-wrong-side- Severity
- warning
- Message
capture host side class data member by this pointer in device or host device lambda function may result in invalid memory access if this pointer is not accessible on device side
- Code
-Wgroupshared-initializer- Severity
- error
- Message
initializer of groupshared variable will be ignored
Clang enables it by default.
- Code
-Whexagon-reserved-caller-saved- Severity
- warning
- Message
reserving the caller-saved register ‘{}’ may lead to incorrect code if it is not also reserved in all other translation units and libraries; you are responsible for ensuring the register is managed consistently
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Whigher-precision-for-complex-division- Severity
- warning
- Message
excess precision is requested but the target does not support excess precision which may result in observable differences in complex division behavior- Message
, additional uses where the requested higher precision cannot be honored were found but not diagnosed
Clang enables it by default.
- Code
-Whip-deprecated-builtins- Severity
- warning
- Message
builtin {} is deprecated; use {} instead
- Code
-Whip-omp-target-directives- Severity
- error
- Message
HIP does not support OpenMP target directives; directive has been ignored
Clang enables it by default.
- Code
-Whip-only- Severity
- warning
- Message
‘{}’ is ignored since it is only supported for HIP
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Whlsl-202y-extensions- Severity
- warning
- Message
‘auto’ type specifier is a- Message
C++11- Message
HLSL 202y
Clang enables it by default. Clang has 5 messages for this flag.
- Code
-Whlsl-availability- Severity
- error
- Message
{} is only available- Message
in {} environment- Message
{} is unavailable- Message
support for groupshared parameter annotation not added until HLSL 202x- Message
passing groupshared variable to a parameter annotated with inout. See ‘groupshared’ parameter annotation added in 202x
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Whlsl-dxc-compatability- Severity
- warning
- Message
failed to embed source for ‘{}’ into dx.source.contents- Message
support for HLSL language version {} is incomplete, recommend using {} instead
Clang enables it by default.
- Code
-Whlsl-explicit-binding- Severity
- warning
- Message
assignment of {} to local resource {} is not to the same unique global resource
Clang enables it by default. It also controls -Whlsl-202y-extensions. Clang has 4 messages for this flag.
- Code
-Whlsl-extensions- Severity
- warning
- Message
access specifiers are a clang HLSL extension- Message
lambdas are a- Message
C++11- Message
clang HLSL
- Code
-Whlsl-implicit-binding- Severity
- warning
- Message
resource has implicit register binding
Clang enables it by default. Clang has 5 messages for this flag.
- Code
-Whlsl-semantic-signatures- Severity
- warning
- Message
semantic signature packing mode ‘{}’ is ignored as- Message
vertex shader inputs- Message
pixel shader outputs- Message
stacked- Message
indexed
- Code
-Widiomatic-parentheses- Severity
- warning
- Message
using the result of an assignment as a condition without parentheses
Clang enables it by default. It also controls -Wdllexport-explicit-instantiation. Clang has 212 messages for this flag.
- Code
-Wignored-attributes- Severity
- warning
- Message
‘trivial_abi’ cannot be applied to {}- Message
alias- Message
ifunc- Message
alias- Message
ifunc- Message
aliasee- Message
resolver- Message
requested alignment is less than minimum alignment of {} for type {}
Clang enables it by default.
- Code
-Wignored-availability-without-sdk-settings- Severity
- warning
- Message
{} availability is ignored without a valid ‘SDKSettings.json’ in the SDK
‘…’ qualifier. -Wignored-base-class-qualifiers
Clang enables some of the diagnostics that it controls by default. It also controls -Wignored-qualifiers. Clang has 4 messages for this flag.
- Code
-Wignored-base-class-qualifiers- Severity
- warning
- Message
‘{}’ qualifier- Message
s- Message
has- Message
have
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wignored-gch- Severity
- warning
- Message
precompiled header directory ‘{}’ was ignored because it contains no clang PCH files- Message
precompiled header ‘{}’ was ignored because it is not a clang PCH file
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wignored-optimization-argument- Severity
- warning
- Message
optimization flag ‘{}’ is not supported for target ‘{}’- Message
optimization flag ‘{}’ is not supported
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wignored-pragma-intrinsic- Severity
- warning
- Message
{} is not a recognized builtin- Message
; consider including <intrin.h> to access non-builtin intrinsics
- Code
-Wignored-pragma-optimize- Severity
- warning
Clang enables it by default. It also controls -Wignored-pragma-intrinsic, -Wignored-pragma-optimize. Clang has 67 messages for this flag.
- Code
-Wignored-pragmas- Severity
- warning
- Message
expected string- Message
literal- Message
failed to resolve ‘#pragma {}’ to a declaration- Message
‘#pragma- Message
push_macro- Message
pop_macro- Message
expected ‘=’ following ‘#pragma- Message
align
Clang enables some of the diagnostics that it controls by default. It also controls -Wignored-reference-qualifiers. Clang has 13 messages for this flag.
- Code
-Wignored-qualifiers- Severity
- warning
- Message
‘{}’ qualifier on function type {} has no effect and is a Clang extension- Message
ARC- Message
unused- Message
__unsafe_unretained- Message
__strong- Message
__weak- Message
__autoreleasing- Message
‘{}’ qualifier on omitted return type {} has no effect
Clang enables it by default.
- Code
-Wignored-reference-qualifiers- Severity
- warning
- Message
‘{}’ qualifier on reference type {} has no effect
Clang enables some of the diagnostics that it controls by default. It also controls -Wimplicit-function-declaration, -Wimplicit-int.
- Code
-Wimplicit- Severity
- warning
Clang has 2 messages for this flag.
- Code
-Wimplicit-atomic-properties- Severity
- warning
- Message
property is assumed atomic when auto-synthesizing the property- Message
property is assumed atomic by default
Clang enables it by default.
- Code
-Wimplicit-const-int-float-conversion- Severity
- warning
- Message
implicit conversion from {} to {} changes value from {} to {}
Clang enables it by default.
- Code
-Wimplicit-conversion-floating-point-to-bool- Severity
- warning
- Message
implicit conversion turns floating-point number into bool: {} to {}
Clang enables it by default.
- Code
-Wimplicit-enum-enum-cast- Severity
- warning
- Message
implicit conversion from enumeration type {} to different enumeration type {}
Clang enables it by default. Clang has 5 messages for this flag.
- Code
-Wimplicit-exception-spec-mismatch- Severity
- warning
- Message
function previously declared with an- Message
explicit- Message
implicit- Message
implicit- Message
explicit
It also controls -Wimplicit-fallthrough-per-function.
- Code
-Wimplicit-fallthrough- Severity
- warning
- Message
unannotated fall-through between switch labels
- Code
-Wimplicit-fallthrough-per-function- Severity
- warning
- Message
unannotated fall-through between switch labels in partly-annotated function
Clang enables it by default.
- Code
-Wimplicit-fixed-point-conversion- Severity
- warning
- Message
implicit conversion from {} cannot fit within the range of values for {}
Clang enables some of the diagnostics that it controls by default. It also controls -Wimplicit-int-float-conversion, -Wobjc-signed-char-bool-implicit-float-conversion. Clang has 2 messages for this flag.
- Code
-Wimplicit-float-conversion- Severity
- warning
- Message
implicit conversion loses floating-point precision: {} to {}- Message
implicit conversion when assigning computation result loses floating-point precision: {} to {}
Clang enables some of the diagnostics that it controls by default. Clang has 5 messages for this flag.
- Code
-Wimplicit-function-declaration- Severity
- error
- Message
call to undeclared function {}; ISO C99 and later do not support implicit function declarations- Message
implicitly declaring library function ‘{}’ with type {}- Message
call to undeclared library function ‘{}’ with type {}; ISO C99 and later do not support implicit function declarations- Message
use of unknown builtin {}- Message
implicit declaration of function {}
Clang enables some of the diagnostics that it controls by default. Clang has 3 messages for this flag.
- Code
-Wimplicit-int- Severity
- error
- Message
type specifier missing, defaults to ‘int’; ISO C99 and later do not support implicit int- Message
parameter {} was not declared, defaults to ‘int’; ISO C99 and later do not support implicit int- Message
type specifier missing, defaults to ‘int’
It also controls -Wimplicit-int-conversion-on-negation, -Wobjc-signed-char-bool-implicit-int-conversion, -Wshorten-64-to-32. Clang has 2 messages for this flag.
- Code
-Wimplicit-int-conversion- Severity
- warning
- Message
higher order bits are zeroes after implicit conversion- Message
implicit conversion loses integer precision: {} to {}
- Code
-Wimplicit-int-conversion-on-negation- Severity
- warning
- Message
implicit conversion loses integer precision: {} to {} on negation
Clang enables some of the diagnostics that it controls by default. It also controls -Wimplicit-enum-enum-cast.
- Code
-Wimplicit-int-enum-cast- Severity
- warning
- Message
implicit conversion from {} to enumeration type {} is invalid in C++
Clang enables some of the diagnostics that it controls by default. It also controls -Wimplicit-const-int-float-conversion.
- Code
-Wimplicit-int-float-conversion- Severity
- warning
- Message
implicit conversion from {} to {} may lose precision
It also controls -Wimplicit-overflow-behavior-conversion-assignment, -Wimplicit-overflow-behavior-conversion-assignment-pedantic, -Wimplicit-overflow-behavior-conversion-function-boundary, -Wimplicit-overflow-behavior-conversion-function-boundary-pedantic, -Wimplicit-overflow-behavior-conversion-pedantic.
- Code
-Wimplicit-overflow-behavior-conversion- Severity
- warning
- Message
implicit conversion from {} to {} discards overflow behavior
- Code
-Wimplicit-overflow-behavior-conversion-assignment- Severity
- warning
- Message
implicit conversion from {} to {} during assignment discards overflow behavior
- Code
-Wimplicit-overflow-behavior-conversion-assignment-pedantic- Severity
- warning
- Message
implicit conversion from {} to {} during assignment discards overflow behavior
- Code
-Wimplicit-overflow-behavior-conversion-function-boundary- Severity
- warning
- Message
passing argument of type {} to parameter of type {} discards overflow behavior at function boundary
- Code
-Wimplicit-overflow-behavior-conversion-function-boundary-pedantic- Severity
- warning
- Message
passing argument of type {} to parameter of type {} discards overflow behavior at function boundary
- Code
-Wimplicit-overflow-behavior-conversion-pedantic- Severity
- warning
- Message
implicit conversion from {} to {} discards overflow behavior
- Code
-Wimplicit-retain-self- Severity
- warning
- Message
block implicitly retains ‘self’; explicitly mention ‘self’ to indicate this is intended behavior
Clang has 13 messages for this flag.
- Code
-Wimplicit-void-ptr-cast- Severity
- warning
- Message
implicit conversion when- Message
assigning to {} from type {}- Message
assigning to type from type- Message
passing {} to parameter of type {}- Message
passing type to parameter of type- Message
returning {} from a function with result type {}- Message
returning type from a function with result type- Message
<CLANG BUG IF YOU SEE THIS>
Clang enables it by default.
- Code
-Wimplicitly-unsigned-literal- Severity
- warning
- Message
integer literal is too large to be represented in a signed integer type, interpreting as unsigned
- Code
-Wimport- Severity
- warning
Clang enables it by default.
- Code
-Wimport-implementation-partition-unit-in-interface-unit- Severity
- warning
- Message
importing an implementation partition unit in a module interface is not recommended. Names from {} may not be reachable
- Code
-Wimport-preprocessor-directive-pedantic- Severity
- warning
- Message
#import is a language extension
Clang enables it by default.
- Code
-Winaccessible-base- Severity
- warning
- Message
direct base {} is inaccessible due to ambiguity:{}
Clang enables it by default.
- Code
-Winclude-angled-in-module-purview- Severity
- warning
- Message
‘#include <filename>’ attaches the declarations to the named module ‘{}’, which is not usually intended; consider moving that directive before the module declaration
Clang enables it by default.
- Code
-Winclude-next-absolute-path- Severity
- warning
- Message
#include_next in file found relative to primary source file or found by absolute path; will search from start of include path
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Wincompatible-exception-spec- Severity
- warning
- Message
exception specifications of- Message
return- Message
argument- Message
target exception specification is not superset of source
Clang has 19 messages for this flag.
- Code
-Wincompatible-function-pointer-types- Severity
- error
- Message
incompatible function pointer types- 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 {}
Clang has 19 messages for this flag.
- Code
-Wincompatible-function-pointer-types-strict- Severity
- warning
- Message
incompatible function pointer types- 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 {}
Clang enables it by default.
- Code
-Wincompatible-library-redeclaration- Severity
- warning
- Message
incompatible redeclaration of library function {}
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Wincompatible-ms-pragma-section- Severity
- warning
- Message
`#pragma const_seg` for section {} will not apply to {} due to the presence of a- Message
mutable field- Message
non-trivial constructor- Message
non-trivial destructor
Clang has 2 messages for this flag.
- Code
-Wincompatible-ms-struct- Severity
- error
- Message
ms_struct may not produce Microsoft-compatible layouts for classes with base classes or virtual functions- Message
ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren’t a power of two
Clang enables it by default. It also controls -Wincompatible-function-pointer-types, -Wincompatible-pointer-types-discards-overflow-behavior, -Wincompatible-pointer-types-discards-qualifiers. Clang has 19 messages for this flag.
- Code
-Wincompatible-pointer-types- Severity
- error
- Message
incompatible pointer types- 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 {}
Assigning to … from …. -Wincompatible-pointer-types-discards-overflow-behavior
Clang enables it by default. Clang has 14 messages for this flag.
- Code
-Wincompatible-pointer-types-discards-overflow-behavior- 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
Assigning to … from …. -Wincompatible-pointer-types-discards-qualifiers
Clang enables it by default. Clang has 30 messages for this flag.
- Code
-Wincompatible-pointer-types-discards-qualifiers- 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.
- Code
-Wincompatible-property-type- Severity
- warning
- Message
property type {} is incompatible with type {} inherited from {}
Clang enables it by default.
- Code
-Wincompatible-sysroot- Severity
- warning
- Message
using sysroot for ‘{}’ but targeting ‘{}’
Clang enables it by default.
- Code
-Wincomplete-framework-module-declaration- Severity
- warning
- Message
skipping ‘{}’ because module declaration of ‘{}’ lacks the ‘framework’ qualifier
Clang enables it by default.
- Code
-Wincomplete-implementation- Severity
- warning
- Message
method definition for {} not found
Clang enables some of the diagnostics that it controls by default. It also controls -Wincomplete-umbrella, -Wnon-modular-include-in-module.
- Code
-Wincomplete-module- Severity
- warning
Clang enables it by default.
- Code
-Wincomplete-setjmp-declaration- Severity
- warning
- Message
declaration of built-in function ‘{}’ requires the declaration of the ‘jmp_buf’ type, commonly provided in the header <setjmp.h>
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wincomplete-umbrella- Severity
- warning
- Message
missing submodule ‘{}’- Message
umbrella directory ‘{}’ not found- Message
umbrella header for module ‘{}’ does not include header ‘{}’
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Winconsistent-dllimport- Severity
- warning
- Message
{} redeclared without {} attribute: previous {} ignored- Message
{} redeclared without ‘dllimport’ attribute: ‘dllexport’ attribute added
- Code
-Winconsistent-missing-destructor-override- Severity
- warning
- Message
{} overrides a destructor but is not marked ‘override’
Clang enables it by default.
- Code
-Winconsistent-missing-override- Severity
- warning
- Message
{} overrides a member function but is not marked ‘override’
Clang enables it by default. It also controls -Wdeprecated-increment-bool.
- Code
-Wincrement-bool- Severity
- error
- Message
ISO C++17 does not allow incrementing expression of type bool
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-WIndependentClass-attribute- Severity
- warning
- Message
‘objc_independent_class’ attribute may be put on a typedef only; attribute is ignored- Message
‘objc_independent_class’ attribute may be put on Objective-C object pointer type only; attribute is ignored
- Code
-Winfinite-recursion- Severity
- warning
- Message
all paths through this function will call itself
- Code
-Winit-priority-reserved- Severity
- error
- Message
requested ‘init_priority’ {} is reserved for internal use
- Code
-Winit-self- Severity
- warning
Clang enables it by default. Clang has 6 messages for this flag.
- Code
-Winitializer-overrides- Severity
- warning
- Message
initializer- Message
partially- Message
initializer- Message
partially- Message
initializer- Message
partially
Clang enables it by default. Clang has 5 messages for this flag.
- Code
-Winjected-class-name- Severity
- warning
- Message
ISO C++ specifies that qualified reference to {} is a constructor name rather than a- Message
template name- Message
type- Message
‘typename’- Message
‘template’
- Code
-Winline- Severity
- warning
Clang enables it by default.
- Code
-Winline-asm- Severity
- warning
Clang enables it by default.
- Code
-Winline-namespace-reopened-noninline- Severity
- warning
- Message
inline namespace reopened as a non-inline namespace
Clang enables it by default.
- Code
-Winline-new-delete- Severity
- warning
- Message
replacement function {} cannot be declared ‘inline’
Clang enables it by default. Clang has 22 messages for this flag.
- Code
-Winstallapi-violation- Severity
- warning
- Message
dynamic library symbol ‘{}’ is- Message
weak defined- Message
thread local- Message
glob ‘{}’ did not match any header file- Message
declaration ‘{}’ is marked- Message
available- Message
unavailable- Message
not
Clang enables it by default.
- Code
-Winstantiation-after-specialization- Severity
- warning
- Message
explicit instantiation of {} that occurs after an explicit specialization has no effect
Clang has 38 messages for this flag.
- Code
-Wint-conversion- Severity
- error
- Message
incompatible integer to pointer conversion- 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 {}
- Code
-Wint-conversions- Severity
- warning
Clang has 2 messages for this flag.
- Code
-Wint-in-bool-context- Severity
- warning
- Message
converting the enum constant to a boolean- Message
converting the result of ‘<<’ to a boolean; did you mean to compare with ‘0’?
Clang enables it by default. It also controls -Wint-to-void-pointer-cast.
- Code
-Wint-to-pointer-cast- Severity
- warning
- Message
cast to {} from smaller integer type {}
Clang enables it by default.
- Code
-Wint-to-void-pointer-cast- Severity
- warning
- Message
cast to {} from smaller integer type {}
Clang enables it by default.
- Code
-Winteger-overflow- Severity
- warning
- Message
overflow in expression; result is {} with type {}
Clang enables it by default. It also controls -Wignored-optimization-argument. Clang has 11 messages for this flag.
- Code
-Winvalid-command-line-argument- Severity
- warning
- Message
missing plugin argument for plugin {} in {}- Message
missing plugin name in {}- Message
the given MCU supports {} hardware multiply, but ‘-mhwmult’ is set to {}- Message
no MCU device specified, but ‘-mhwmult’ is set to ‘auto’, assuming no hardware multiply; use ‘-mmcu’ to specify an MSP430 device, or ‘-mhwmult’ to set the hardware multiply type explicitly- Message
the given MCU does not support hardware multiply, but ‘-mhwmult’ is set to {}- Message
the object size sanitizer has no effect at -O0, but is explicitly enabled: {}- Message
optimization level ‘{}’ is not supported; using ‘{}{}’ instead- Message
feature flag ‘{}’ must start with either ‘+’ to enable the feature or ‘-’ to disable it; flag ignored
Clang has 4 messages for this flag.
- Code
-Winvalid-constexpr- Severity
- warning
- Message
constexpr- Message
consteval- Message
function- Message
constructor
Clang enables it by default.
- Code
-Winvalid-feature-combination- Severity
- warning
- Message
invalid feature combination: {}
- Code
-Winvalid-gnu-asm-cast- Severity
- error
- Message
invalid use of a cast in an inline asm context requiring an lvalue
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Winvalid-iboutlet- Severity
- warning
- Message
instance variable- Message
property- Message
IBOutletCollection properties should be copy/strong and not assign
- Code
-Winvalid-ios-deployment-target- Severity
- error
- Message
invalid iOS deployment version ‘{}’, iOS 10 is the maximum deployment target for 32-bit targets
Clang enables it by default.
- Code
-Winvalid-no-builtin-names- Severity
- warning
- Message
‘{}’ is not a valid builtin name for {}
Clang enables it by default. Clang has 6 messages for this flag.
- Code
-Winvalid-noreturn- Severity
- warning
- Message
coroutine {} cannot be declared ‘noreturn’ as it always returns a coroutine handle- Message
function {} declared ‘noreturn’ should not return- Message
function- Message
block- Message
lambda- Message
coroutine
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Winvalid-offsetof- Severity
- warning
- Message
‘offsetof’ on non-POD type {}- Message
‘offsetof’ on non-standard-layout type {}
- Code
-Winvalid-or-nonexistent-directory- Severity
- warning
- Message
unable to find {} directory, expected to be in ‘{}’ found via {}
Class. -Winvalid-partial-specialization
Clang has 2 messages for this flag.
- Code
-Winvalid-partial-specialization- Severity
- warning
- Message
class- Message
variable
- Code
-Winvalid-pch- Severity
- warning
Clang enables it by default. Clang has 4 messages for this flag.
- Code
-Winvalid-pp-token- Severity
- warning
- Message
empty character constant- Message
missing terminating- Message
‘- Message
‘”’
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Winvalid-source-encoding- Severity
- warning
- Message
illegal character encoding in character literal- Message
illegal character encoding in string literal
Clang has 2 messages for this flag.
- Code
-Winvalid-specialization- Severity
- error
- Message
{} cannot be specialized- Message
: {}
The message. -Winvalid-static-assert-message
Clang has 4 messages for this flag.
- Code
-Winvalid-static-assert-message- Severity
- warning
- Message
the message- Message
the expression- Message
this static assertion- Message
this asm operand
- Code
-Winvalid-token-paste- Severity
- error
- Message
pasting formed ‘{}’, an invalid preprocessing token
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Winvalid-unevaluated-string- Severity
- warning
- Message
encoding prefix ‘{}’ on an unevaluated string literal has no effect- Message
and is incompatible with c++2c
- Code
-Winvalid-utf8- Severity
- warning
- Message
invalid UTF-8 in comment
Clang enables it by default.
- Code
-Winvalid-version-availability- Severity
- warning
- Message
invalid {} version ‘{}’ in availability attribute
Clang has 5 messages for this flag.
- Code
-Wjump-misses-init- Severity
- warning
- Message
jump from this goto statement to its label is incompatible with C++- Message
jump from this- Message
indirect- Message
asm- Message
jump from switch statement to this case label is incompatible with C++
Clang enables it by default.
- Code
-Wjump-seh-finally- Severity
- warning
- Message
jump out of __finally block has undefined behavior
Clang enables it by default. Clang has 3 messages for this flag.
- Code
-Wkeyword-compat- Severity
- warning
- Message
keyword ‘{}’ will be made available as an identifier- Message
here- Message
for the remainder of the translation unit
- Code
-Wkeyword-macro- Severity
- warning
- Message
keyword is hidden by macro definition
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wknr-promoted-parameter- Severity
- warning
- Message
promoted type {} of K&R function parameter is not compatible with the parameter type {}- Message
promoted type of K&R function parameter is not compatible with parameter type
- Code
-Wlanguage-extension-token- Severity
- warning
- Message
extension used
Clang enables it by default. Clang has 2 messages for this flag.
- Code
-Wlarge-by-value-copy- Severity
- warning
- Message
{} is a large ({} bytes) pass-by-value argument; pass it by reference instead?- Message
return value of {} is a large ({} bytes) pass-by-value object; pass it by reference instead?
Clang enables it by default. Clang has 14 messages for this flag.
- Code
-Wlegacy-constant-register-binding- Severity
- error
- Message
binding type ‘b’ only applies to constant buffers. The ‘bool constant’ binding type is no longer supported- Message
binding type ‘i’ ignored. The ‘integer constant’ binding type is no longer supported- Message
binding type ‘c’ ignored in buffer declaration. Did you mean ‘packoffset’?- Message
binding type ‘- Message
t- Message
u- Message
b- Message
s
- Code
-Wliblto- Severity
- warning
It also controls -Wlifetime-safety-permissive, -Wlifetime-safety-strict.
- Code
-Wlifetime-safety- Severity
- warning
It also controls -Wlifetime-safety, -Wlifetime-safety-suggestions, -Wlifetime-safety-validations.
- Code
-Wlifetime-safety-all- Severity
- warning
It also controls -Wlifetime-safety-inapplicable-lifetimebound, -Wlifetime-safety-misplaced-lifetimebound.
- Code
-Wlifetime-safety-annotation-placement- Severity
- warning
A group of warnings. -Wlifetime-safety-annotation-verification
It also controls -Wlifetime-safety-lifetimebound-violation, -Wlifetime-safety-noescape.
- Code
-Wlifetime-safety-annotation-verification- Severity
- warning
- Code
-Wlifetime-safety-cross-tu-constructor-suggestions- Severity
- warning
- Message
parameter in cross-TU constructor should be marked [[clang::lifetimebound]]
- Code
-Wlifetime-safety-cross-tu-misplaced-lifetimebound- Severity
- warning
- Message
‘lifetimebound’ attribute on this definition is not visible to callers in other translation units; add it to the declaration instead
It also controls -Wlifetime-safety-cross-tu-constructor-suggestions. Clang has 2 messages for this flag.
- Code
-Wlifetime-safety-cross-tu-suggestions- Severity
- warning
- Message
parameter in cross-TU function should be marked [[clang::lifetimebound]]- Message
implicit this in cross-TU function should be marked [[clang::lifetimebound]]
- Code
-Wlifetime-safety-dangling-field- Severity
- warning
- Message
stack memory associated with {} escapes to the {} which will dangle
- Code
-Wlifetime-safety-dangling-field-lambda-capture- Severity
- warning
- Message
stack memory associated with {} may escape to the {} which will dangle. This could be a false positive as the field was captured by a lambda and may have been reset before escaping
- Code
-Wlifetime-safety-dangling-field-moved- Severity
- warning
- Message
stack memory associated with {} may escape to the {} which will dangle. This could be a false positive as the storage may have been moved. Consider moving first and then aliasing later to resolve the issue
- Code
-Wlifetime-safety-dangling-global- Severity
- warning
- Message
stack memory associated with {} escapes to the {} which will dangle
- Code
-Wlifetime-safety-dangling-global-in-main- Severity
- warning
- Message
stack memory associated with {} escapes to the {} which will dangle after main returns
- Code
-Wlifetime-safety-dangling-global-moved- Severity
- warning
- Message
stack memory associated with {} may escape to the {} which will dangle. This could be a false positive as the storage may have been moved. Consider moving first and then aliasing later to resolve the issue
It also controls -Wlifetime-safety-experimental-destructor-use, -Wlifetime-safety-experimental-field-origin-escape, -Wlifetime-safety-experimental-invalidation.
- Code
-Wlifetime-safety-experimental- Severity
- warning
Clang has 2 messages for this flag.
- Code
-Wlifetime-safety-experimental-destructor-use- Severity
- warning
- Message
{} is later invalidated- Message
{} does not live long enough
- Code
-Wlifetime-safety-experimental-field-origin-escape- Severity
- warning
- Message
return value depends on the object referenced by {}, not on ‘*this’
Clang has 3 messages for this flag.
- Code
-Wlifetime-safety-experimental-invalidation- Severity
- warning
- Message
{} escapes to the {} and is later invalidated- Message
{} escapes to the {} and is later invalidated- Message
{} is later invalidated
- Code
-Wlifetime-safety-inapplicable-lifetimebound- Severity
- warning
- Message
‘lifetimebound’ attribute has no effect on parameter of type {}. The attribute only applies to reference types, pointer types, and non-owner record types
- Code
-Wlifetime-safety-intra-tu-constructor-suggestions- Severity
- warning
- Message
parameter in intra-TU constructor should be marked [[clang::lifetimebound]]
- Code
-Wlifetime-safety-intra-tu-misplaced-lifetimebound- Severity
- warning
- Message
‘lifetimebound’ attribute on this definition is not visible to callers before the definition; add it to the declaration instead
It also controls -Wlifetime-safety-intra-tu-constructor-suggestions. Clang has 2 messages for this flag.
- Code
-Wlifetime-safety-intra-tu-suggestions- Severity
- warning
- Message
parameter in intra-TU function should be marked [[clang::lifetimebound]]- Message
implicit this in intra-TU function should be marked [[clang::lifetimebound]]
Clang has 4 messages for this flag.
- Code
-Wlifetime-safety-lifetimebound-violation- Severity
- warning
- Message
could not verify that the return value can be lifetime bound to- Message
an unnamed parameter- Message
‘{}’- Message
the implicit this parameter
A group of warnings. -Wlifetime-safety-misplaced-lifetimebound
It also controls -Wlifetime-safety-cross-tu-misplaced-lifetimebound, -Wlifetime-safety-intra-tu-misplaced-lifetimebound.
- Code
-Wlifetime-safety-misplaced-lifetimebound- Severity
- warning
- Code
-Wlifetime-safety-noescape- Severity
- warning
- Message
parameter is marked [[clang::noescape]] but escapes
It also controls -Wlifetime-safety-dangling-field, -Wlifetime-safety-dangling-global, -Wlifetime-safety-return-stack-addr, -Wlifetime-safety-use-after-free, -Wlifetime-safety-use-after-scope.
- Code
-Wlifetime-safety-permissive- Severity
- warning
- Code
-Wlifetime-safety-return-stack-addr- Severity
- warning
- Message
stack memory associated with {} is returned
- Code
-Wlifetime-safety-return-stack-addr-moved- Severity
- warning
- Message
stack memory associated with {} may be returned later. This could be a false positive as the storage may have been moved. Consider moving first and then aliasing later to resolve the issue
It also controls -Wlifetime-safety-dangling-field-lambda-capture, -Wlifetime-safety-dangling-field-moved, -Wlifetime-safety-dangling-global-in-main, -Wlifetime-safety-dangling-global-moved, -Wlifetime-safety-permissive, -Wlifetime-safety-return-stack-addr-moved, -Wlifetime-safety-use-after-scope-moved.
- Code
-Wlifetime-safety-strict- Severity
- warning
It also controls -Wlifetime-safety-cross-tu-suggestions, -Wlifetime-safety-intra-tu-suggestions.
- Code
-Wlifetime-safety-suggestions- Severity
- warning
- Code
-Wlifetime-safety-use-after-free- Severity
- warning
- Message
{} does not live long enough