Age | Commit message (Collapse) | Author | Files | Lines |
|
------------------------------------------------------------------------
r195877 | llunak | 2013-11-27 13:14:43 -0800 (Wed, 27 Nov 2013) | 3 lines
strip UTF-8 BOM in -frewrite-includes (PR#15664)
------------------------------------------------------------------------
llvm-svn: 195987
|
|
------------------------------------------------------------------------
r195149 | grosbach | 2013-11-19 12:18:39 -0800 (Tue, 19 Nov 2013) | 6 lines
ARM: embedded v7 'darwin' doesn't get min-version defines.
Make sure armv7 doesn't get the iOS deployment version definitions when
it's being used for non-iOS.
rdar://15497681
------------------------------------------------------------------------
llvm-svn: 195225
|
|
llvm-svn: 195048
|
|
After r195009, the test would write a .o file to the test dir. Send that to
/dev/null instead. Also fix the typo in test/Frontend/invalid-o-level.c.
llvm-svn: 195047
|
|
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
llvm-svn: 195009
|
|
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.
llvm-svn: 194919
|
|
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.
llvm-svn: 194814
|
|
llvm-svn: 194070
|
|
llvm-svn: 193578
|
|
These arch arguments are used for embedded targets (obviously) which need a
different calling convention to iOS.
llvm-svn: 193328
|
|
r'\', on win32.
llvm-svn: 189591
|
|
llvm-svn: 189562
|
|
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.
llvm-svn: 188939
|
|
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
llvm-svn: 188037
|
|
Patch by David Wiberg.
llvm-svn: 187888
|
|
command-line.
rdar://14556182
llvm-svn: 187207
|
|
llvm-svn: 186764
|
|
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.
llvm-svn: 186763
|
|
This is at least good documentation, but also opens the possibility of
using pipefail.
llvm-svn: 185652
|
|
This avoids depending on pipefail not being used.
llvm-svn: 185648
|
|
llvm-svn: 185127
|
|
* 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.
llvm-svn: 185091
|
|
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.
llvm-svn: 179677
|
|
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
llvm-svn: 179616
|
|
This is a better way of ensuring that we match the output of the
rewriter and not the CHECK line.
llvm-svn: 179308
|
|
The escaping interaction between Python and grep doesn't work on my
system. This change fixes the tests for me.
llvm-svn: 179214
|
|
rdar://13610250
llvm-svn: 179145
|
|
that indicates return from another file.
llvm-svn: 179143
|
|
Fixes PR15642.
llvm-svn: 178540
|
|
yet, so turning it off. This fixes a test breakage caused by r177336.
llvm-svn: 177655
|
|
Issue reported by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=15377
llvm-svn: 177336
|
|
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
llvm-svn: 172497
|
|
llvm-svn: 171422
|
|
Patch by Krzysztof Parzyszek!
llvm-svn: 171415
|
|
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.
llvm-svn: 166551
|
|
"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.
llvm-svn: 166281
|
|
VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
llvm-svn: 166280
|
|
"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.
llvm-svn: 166279
|
|
llvm-svn: 164607
|
|
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.
llvm-svn: 163034
|
|
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.
llvm-svn: 161650
|
|
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).
llvm-svn: 160068
|
|
Review feedback/bot failure from r158459 by Simon Atanasyan and Benjamin Kramer (on IRC).
llvm-svn: 158464
|
|
llvm-svn: 158459
|
|
llvm-svn: 158458
|
|
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.
llvm-svn: 158418
|
|
llvm-svn: 158149
|
|
only expands #include directives.
Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).
llvm-svn: 158093
|
|
% 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 %.
llvm-svn: 152956
|
|
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.
llvm-svn: 150612
|