| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
return types.
llvm-svn: 167518
|
| |
|
|
|
|
| |
parameter types.
llvm-svn: 167515
|
| |
|
|
| |
llvm-svn: 167279
|
| |
|
|
| |
llvm-svn: 167274
|
| |
|
|
| |
llvm-svn: 167062
|
| |
|
|
|
|
|
|
|
| |
we had the -ccc-clang-cxx and -ccc-no-clang-cxx options to force them
on or off for testing.
Clang c++ support is now production quality and these options are dead.
llvm-svn: 166986
|
| |
|
|
| |
llvm-svn: 166656
|
| |
|
|
| |
llvm-svn: 166655
|
| |
|
|
|
|
|
| |
modifiers. (From an idea by Eric...)
<rdar://problem/12284092>
llvm-svn: 166647
|
| |
|
|
|
|
| |
off. // rdar://12501960
llvm-svn: 166150
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang itself. This dates back to clang's early days and while it looks like
some of it is still used (for kext for example), other parts are probably dead.
Remove the -ccc-clang-archs option and associated code. I don't think there
is any remaining setup where clang doesn't support an architecture but it can
expect an working gcc cross compiler to be available.
A nice side effect is that tests no longer need to differentiate architectures
that are included in production builds of clang and those that are not.
llvm-svn: 165545
|
| |
|
|
|
|
|
| |
mess by handling all pragmas which the parser touches uniformly.
<rdar://problem/12248901>, etc.
llvm-svn: 165195
|
| |
|
|
|
|
| |
it into -Wgnu.
llvm-svn: 164272
|
| |
|
|
|
|
|
|
| |
warning to an error. C++ bans it, and both GCC and EDG diagnose it as
an error. Microsoft allows it, so we still warn in Microsoft
mode. Fixes <rdar://problem/11135644>.
llvm-svn: 163831
|
| |
|
|
|
|
| |
ExtWarn and the other a vanilla warning. This addresses PR13705, where const char const * wouldn't warn unless -pedantic was specified under the right conditions.
llvm-svn: 162793
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Wpedantic.
While -Wpedantic was reasonable, -Wno-pedantic would turn off a bunch of warnings that
are on by default. This counters the intention of this warning flag.
To fix this, -Wpedantic now includes extentions that are not on by default. The
remaining warnings will manifest anyway, and won't accidentally get turned off
by -Wno-pedantic.
Fixes <rdar://problem/12076105>
llvm-svn: 161695
|
| |
|
|
|
|
|
|
|
|
| |
'clang-cpp'.
For now, the test uses "REQUIRES: shell" to determine if the host system
supports "ln -s", which it uses to create a 'clang-cpp' symlink. This is a bit
hacky and should likely be directly supported by lit.cfg.
llvm-svn: 161317
|
| |
|
|
|
|
| |
<rdar://problem/10987863>.
llvm-svn: 160706
|
| |
|
|
|
|
|
|
| |
scope to -Wc++11-extensions. Move extra semicolon after member function
definition diagnostic out of -pedantic, since C++ allows a single semicolon
there. Keep it in -Wextra-semi, though, since it's still questionable.
llvm-svn: 160618
|
| |
|
|
|
|
| |
Cleaned up test case.
llvm-svn: 160190
|
| |
|
|
|
|
| |
Silence buildbot so I can figure out the right flag to put this warning under.
llvm-svn: 159967
|
| |
|
|
|
|
| |
directly under -Wpedantic, and enhance warning-flags.c test to test that this set does not grow.
llvm-svn: 159893
|
| |
|
|
|
|
|
| |
- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32
- Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic.
llvm-svn: 159892
|
| |
|
|
|
|
|
|
|
|
| |
-Weverything." It broke several builds.
I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test.
> 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp
llvm-svn: 159886
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces some magic in tablegen to create a "Pedantic" diagnostic
group which automagically includes all warnings that are extensions. This
allows a user to suppress specific warnings traditionally under -pedantic used
an ordinary warning flag. This also allows users to use #pragma to silence
specific -pedantic warnings, or promote them to errors, within blocks of text
(just like any other warning).
-Wpedantic is NOT an alias for -pedantic. Instead, it provides another way
to (a) activate -pedantic warnings and (b) disable them. Where they differ
is that -pedantic changes the behavior of the preprocessor slightly, whereas
-Wpedantic does not (it just turns on the warnings).
The magic in the tablegen diagnostic emitter has to do with computing the minimal
set of diagnostic groups and diagnostics that should go into -Wpedantic, as those
diagnostics that already members of groups that themselves are (transitively) members
of -Wpedantic do not need to be included in the Pedantic group directly. I went
back and forth on whether or not to magically generate this group, and the invariant
was that we always wanted extension warnings to be included in -Wpedantic "some how",
but the bookkeeping would be very onerous to manage by hand.
-no-pedantic (and --no-pedantic) is included for completeness, and matches many of the
same kind of flags the compiler already supports. It does what it says: cancels out
-pedantic. One discrepancy is that if one specifies --no-pedantic and -Weverything or
-Wpedantic the pedantic warnings are still enabled (essentially the -W flags win). We
can debate the correct behavior here.
Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp
that determine whether to include the "-pedantic" flag in the warning output. This is
no longer needed, as all extensions now have a -W flag.
This patch also significantly reduces the number of warnings not under flags from 229
to 158 (all extension warnings). That's a 31% reduction.
llvm-svn: 159875
|
| |
|
|
| |
llvm-svn: 159600
|
| |
|
|
|
|
|
|
| |
undefined behaviour, and move the diagnostic for '' from an Error into
an ExtWarn in this group. This is important for some users of the preprocessor,
and is necessary for gcc compatibility.
llvm-svn: 159335
|
| |
|
|
|
|
| |
// rdar://11741435 pr13184
llvm-svn: 159213
|
| |
|
|
| |
llvm-svn: 159054
|
| |
|
|
| |
llvm-svn: 158954
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In standard C since C89, a 'translation-unit' is syntactically defined to have
at least one "external-declaration", which is either a decl or a function
definition. In Clang the latter gives us a declaration as well.
The tricky bit about this warning is that our predefines can contain external
declarations (__builtin_va_list and the 128-bit integer types). Therefore our
AST parser now makes sure we have at least one declaration that doesn't come
from the predefines buffer.
Also, remove bogus warning about empty source files. This doesn't catch source
files that only contain comments, and never fired anyway because of our
predefines.
PR12665 and <rdar://problem/9165548>
llvm-svn: 158085
|
| |
|
|
|
|
|
|
| |
a warning for an extra semi-colon after function definitions. Added logic
so that a block of semi-colons on a line will only get one warning instead
of a warning for each semi-colon.
llvm-svn: 156934
|
| |
|
|
| |
llvm-svn: 156261
|
| |
|
|
|
|
| |
output including the term "gc" (in lowercase).
llvm-svn: 155892
|
| |
|
|
|
|
| |
Dmitri Gribenko!
llvm-svn: 155872
|
| |
|
|
|
|
|
| |
Don't know if it is an anathema to include '#' in the warning name. I'm fine
with changing it, but this was the most obvious name.
llvm-svn: 152886
|
| |
|
|
|
|
|
| |
This is consistent with -Wbool-conversion. Let me know if you prefer
a different flag name.
llvm-svn: 151934
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation.
These are now fixed, with regression tests added to catch them both (not Darwin-specific).
Original log:
====================
Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h
Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
---------------------
I also reverted r151641 which was enhancement on top of r151638.
====================
llvm-svn: 151712
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original log:
---------------------
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
---------------------
I also reverted r151641 which was enhancement on top of r151638.
llvm-svn: 151667
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function, and ensure they are properly scoped.
This fixes code such as:
enum e {x, y};
int f(enum {y, x} n) {
return 0;
}
This finally fixes PR5464 and PR5477.
llvm-svn: 151638
|
| |
|
|
|
|
| |
parenthesized braced-init-list in the base/member initialization list.
llvm-svn: 150625
|
| |
|
|
| |
llvm-svn: 150409
|
| |
|
|
|
|
|
|
| |
not integer constant expressions. In passing, fix the 'folding is an extension'
diagnostic to not claim we're accepting the code, since that's not true in
-pedantic-errors mode, and add this diagnostic to -Wgnu.
llvm-svn: 148209
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
scope, when no other indication is provided that the user intended to declare a
function rather than a variable.
Remove some false positives from the existing 'parentheses disambiguated as a
function' warning by suppressing it when the declaration is marked as 'typedef'
or 'extern'.
Add a new warning group -Wvexing-parse containing both of these warnings.
The new warning is enabled by default; despite a number of false positives (and
one bug) in clang's test-suite, I have only found genuine bugs with it when
running it over a significant quantity of real C++ code.
llvm-svn: 147599
|
| |
|
|
|
|
|
| |
'is an extension'. The former is inappropriate and confusing when building with
-Werror/-pedantic-errors.
llvm-svn: 147357
|
| |
|
|
|
|
| |
Patch by Dimitry Andric!
llvm-svn: 146982
|
| |
|
|
|
|
|
| |
behaviour to be an error, so it's useful to be able to make it an error in clang
too.
llvm-svn: 146755
|
| |
|
|
|
|
|
| |
A mistyped function call becomes an inmplicit function declaration in C.
Suggest typo correction when one can be found.
llvm-svn: 145930
|
| |
|
|
|
|
| |
flag.
llvm-svn: 145418
|
| |
|
|
| |
llvm-svn: 144678
|