| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'
With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.
This matches the gcc behavior (with a warning added)
Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
Expected Passes : 6721
Expected Failures : 20
Unsupported Tests : 17
(which was not the case of http://llvm-reviews.chandlerc.com/D2125)
Differential Revision: http://llvm-reviews.chandlerc.com/D2212
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195009 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang -cc1 skips the driver so it never made sense to include these with the
Driver tests.
Basic type tests and flag tests generally both go in Frontend.
Now that the final -cc1 tests have been moved out of test/Driver, add a
local substitution to enforce and detect future mistakes.
These miscategorized tests were probably the source of confusion in r194817.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194919 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
| |
By adding a default config.excludes pattern we can avoid individual
suppressions in subdirectories.
This matches LLVM's lit.cfg which also excludes a few other common non-test
filenames for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194814 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194070 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193578 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
These arch arguments are used for embedded targets (obviously) which need a
different calling convention to iOS.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193328 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
r'\', on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189591 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189562 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original idea was to implement it all on the driver, but to do that the
driver needs to know the sse level and to do that it has to know the default
features of a cpu.
Benjamin Kramer pointed out that if one day we decide to implement support for
' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to
keep its knowledge of default features of a cpu.
To avoid duplicating which part of clang handles default cpu features,
it is probably better to handle -mfpmath in the frontend.
For ARM this patch is just a small improvement. Instead of a cpu list, we
check if neon is enabled, which allows us to reject things like
-mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon
For X86, since LLVM doesn't support an independent ssefp feature, we just
make sure the selected -mfpmath matches the sse level.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188939 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
| |
This option prints information about #included files to stderr. Clang could
already do it, this patch just teaches the existing code about the /showIncludes
style and adds the flag.
Differential Revision: http://llvm-reviews.chandlerc.com/D1333
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188037 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
Patch by David Wiberg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187888 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
| |
command-line.
rdar://14556182
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187207 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186764 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
| |
Every #include is surrounded by #if 0 in order to comment it out, which adds
lines. That is fixed up right after, but that all can be inside #if part
that is not processed, so fix up also after every end of a conditional part.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186763 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
This is at least good documentation, but also opens the possibility of
using pipefail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
This avoids depending on pipefail not being used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185648 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185127 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
| |
* Use a single stat to find out if the file exists and if it is a regular file.
* Use early returns when possible.
* Add comments explaining why we have each check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185091 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VerifyDiagnosticConsumer previously would not check that the diagnostic and
its matching directive referenced the same source file. Common practice was
to create directives that referenced other files but only by line number,
and this led to problems such as when the file containing the directive
didn't have enough lines to match the location of the diagnostic in the
other file, leading to bizarre file formatting and other oddities.
This patch causes VerifyDiagnosticConsumer to match source files as well as
line numbers. Therefore, a new syntax is made available for directives, for
example:
// expected-error@file:line {{diagnostic message}}
This extends the @line feature where "file" is the file where the diagnostic
is generated. The @line syntax is still available and uses the current file
for the diagnostic. "file" can be specified either as a relative or absolute
path - although the latter has less usefulness, I think! The #include search
paths will be used to locate the file and if it is not found an error will be
generated.
The new check is not optional: if the directive is in a different file to the
diagnostic, the file must be specified. Therefore, a number of test-cases
have been updated with regard to this.
This closes out PR15613.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179677 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This broke e.g. compiling a crash report from a glibc system on Darwin. Sadly,
the implementation had to game the lexer a lot as we're not using a real
preprocessor here. It also doesn't handle special cases like arbitrary macros in
__has_include, but since this macro isn't common outside of clang's headers we
can get away with that.
Fixes PR14422.
Differential Revision: http://llvm-reviews.chandlerc.com/D594
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179616 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
This is a better way of ensuring that we match the output of the
rewriter and not the CHECK line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179308 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
The escaping interaction between Python and grep doesn't work on my
system. This change fixes the tests for me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179214 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
rdar://13610250
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179145 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
that indicates return from another file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179143 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
Fixes PR15642.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178540 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
yet, so turning it off. This fixes a test breakage caused by r177336.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177655 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
Issue reported by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=15377
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177336 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
| |
driver needs to process the
warning options to setup diagnostic state, but should not be emitting warnings as these would be
rudndant with what the frontend emits.
rdar://13001556
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172497 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171422 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
Patch by Krzysztof Parzyszek!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171415 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
will be represented in the IR as a plain "i32" type. This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.
This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166551 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
| |
"expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive.
This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file.
Patch reviewed by David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166281 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
| |
"expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule.
Patch reviewed by David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166279 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164607 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
expression expanded from a macro. This is of dubious utility in general, but is specifically a major issue for the linux kernel. This resolves PR13747.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163034 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old behavior was to re-scan any files (like modules) where we may have
directives but won't actually be parsing during the -verify invocation.
Now, we keep the old behavior in Debug builds as a sanity check (though
modules are a known entity), and expect all legitimate directives to come
from comments seen by the preprocessor.
This also affects the ARC migration tool, which captures diagnostics in
order to filter some out. This change adds an explicit cleanup to
CaptureDiagnosticsConsumer in order to let its sub-consumer handle the
real end of diagnostics.
This was originally split into four patches, but the tests do not run
cleanly without all four, so I've combined them into one commit.
Patches by Andy Gibbs, with slight modifications from me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161650 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler,
which then only reads the -verify directives that are actually in live
blocks of code. It also makes it simpler to handle -verify directives that
appear in header files, though we still have to manually reparse some files
depending on how they are generated.
This requires some test changes. In particular, all PCH tests now have their
-verify directives outside the "header" portion of the file, using the @line
syntax added in r159978. Other tests have been modified mostly to make it
clear what is being tested, and to prevent polluting the expected output with
the directives themselves.
Patch by Andy Gibbs! (with slight modifications)
The new Frontend/verify-* tests exercise the functionality of this commit,
as well as r159978, r159979, and r160053 (Andy's other -verify enhancements).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160068 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
| |
Review feedback/bot failure from r158459 by Simon Atanasyan and Benjamin Kramer (on IRC).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158464 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158459 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158458 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
| |
override whether headers are system headers by checking for prefixes of the
header name specified in the #include directive.
This allows warnings to be disabled for third-party code which is found in
specific subdirectories of include paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158418 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158149 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
| |
only expands #include directives.
Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158093 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
| |
% is a common character in IR so we'd crash on almost any malformed IR. The
diagnostic formatter expects a formatting directive when it sees an unescaped %.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152956 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This option was added in r129614 and doesn't have any use case that I'm aware
of. It's possible that external tools are using these names - and if that's
the case we can certainly reassess the functionality, but for now it lets us
shave out a few unneeded bits from clang.
Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool.
This removes the actual diagnostic name strings from clang entirely.
Reviewed by Chris Lattner & Ted Kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150612 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149566 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149123 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148582 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
|
|
| |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148141 91177308-0d34-0410-b5e6-96231b3b80d8
|