mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
2cb2cd242c
C89 allowed a type specifier to be elided with the resulting type being int, aka implicit int behavior. This feature was subsequently removed in C99 without a deprecation period, so implementations continued to support the feature. Now, as with implicit function declarations, is a good time to reevaluate the need for this support. This patch allows -Wimplicit-int to issue warnings in C89 mode (off by default), defaults the warning to an error in C99 through C17, and disables support for the feature entirely in C2x. It also removes a warning about missing declaration specifiers that really was just an implicit int warning in disguise and other minor related cleanups.
9 lines
410 B
C++
9 lines
410 B
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t/abc/def/ijk/qwe
|
|
// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %/t/abc/def/ijk/qwe/test.cpp\",\"file\":\"%/t/abc/def/ijk/qwe/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
|
|
// RUN: cp "%s" "%t/abc/def/ijk/qwe/test.cpp"
|
|
// RUN: not clang-check "%t/abc/def/ijk/qwe/test.cpp" 2>&1 | FileCheck %s
|
|
|
|
// CHECK: a type specifier is required
|
|
invalid;
|