• Home
  • History
  • Annotate
  • only in /external/clang/test/Preprocessor/
History log of /external/clang/test/Preprocessor/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3c7f538a10524d02a03b6344915fb7930079ede0 08-Sep-2012 Anton Korobeynikov <asl@math.spbu.ru> Add some ARM EABI preprocessor builtins tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163467 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
3e1ec72e9ef097562774e43bd2847aac57b73d3d 31-Aug-2012 Joao Matos <ripzonetriton@gmail.com> Normalize line endings of r163022.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163023 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoft-ext.c
181cd5bdebf0b88e8194c3f58da60f7f5b918b33 31-Aug-2012 Joao Matos <ripzonetriton@gmail.com> Emulate MSVC's preprocessor macro argument separator behavior by not considering commas from nested macro expansions as argument separators. Fixes parsing of VS 2012 headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163022 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoft-ext.c
c30981a563a8947cb26b1e308d122fa2ef90fceb 30-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Make preprocessor act in a GCC-compatible fashion when a macro is redefined
within its own argument list. The original definition is used for the immediate
expansion, but the new definition is used for any subsequent occurences within
the argument list or after the expansion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162906 91177308-0d34-0410-b5e6-96231b3b80d8
acro_arg_directive.c
600a513a0ff19c7dbedc4292866caddeceb94f57 29-Aug-2012 Simon Atanasyan <satanasyan@mips.com> Define __mips64 / __mips64__ macros for MIPS 64-bit targets.
The patch suggested by Brad Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162858 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
e40c4238a572bf8241a04e0005f70550cbfc1cfb 29-Aug-2012 Alexander Kornienko <alexfh@google.com> Fixed a problem with #pragma push_macro/pop_macro implementation.

Summary:
The problem was with the following sequence:
#pragma push_macro("long")
#undef long
#pragma pop_macro("long")
in case when "long" didn't represent a macro.
Fixed crash and removed code duplication for #undef/pop_macro case. Added regression tests.

Reviewers: doug.gregor, klimek

Reviewed By: doug.gregor

CC: cfe-commits, chapuni

Differential Revision: http://llvm-reviews.chandlerc.com/D31

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162845 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-pushpop-macro.c
260e5067f3cca1630c6ed88757a15b23622b52d1 29-Aug-2012 Simon Atanasyan <satanasyan@mips.com> Define _MIPS_ARCH and _MIPS_ARCH_<cpu name> macros for MIPS targets.
The patch suggested by Logan Chien.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162840 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
10caec2600089449b58c065d56fc449d095b4536 13-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> c: small refactoring of checking for __attribute__(const))
per Richard's comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161786 91177308-0d34-0410-b5e6-96231b3b80d8
as_attribute.c
6bd3291605a3034b858c8aeecc6990fa4f979f6c 10-Aug-2012 Dylan Noblesmith <nobled@dreamwidth.org> Frontend: define _LP64 in a target-independent way

Instead of adding it to each individual subclass in
Targets.cpp, simply check the appropriate target
values.

Where before it was only on x86_64 and ppc64, it's now
also defined on mips64 and nvptx64.

Also add a bunch of negative tests to ensure it is *not*
defined on any other architectures while we're here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161685 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
f23e8d2b928b0baa361dbf34df10862a5bcd01c4 08-Aug-2012 Dylan Noblesmith <nobled@dreamwidth.org> Preprocessor: fix __OPTIMIZE_SIZE__ and -Oz

Add some tests for __OPTIMIZE_SIZE__ and __NO_INLINE__,
removing the superfluous copies in the target-specific
tests, since it's target-independent.

This uncovered a bug in the handling of -Oz: it would
attempt to store the value 2 in the 1-bit bitfield OptimizeSize,
leaving a value of 0 and never defining __OPTIMIZE_SIZE__.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161495 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
3b198a97d2aceb1620483586c8c3cabf9e5e8078 27-Jul-2012 Dylan Noblesmith <nobled@dreamwidth.org> Preprocessor: add __BYTE_ORDER__ predefined macro

The __BYTE_ORDER__ predefined macro was added in GCC 4.6:
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html

It's used like the following:

#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
...
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
...
#else
#error insane architecture like the pdp-11
#endif

There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it
mainly exist to accommodate fairly obscure architectures and ARM's
old FPA instructions, so it doesn't seem nearly as useful.

The tests are updated to check for the correct(at least, based on
clang's current output) value of the macro on each target. So now the
suite will catch bugs like the one fixed in r157626.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160879 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
77a4d57cd25f3a458cd6d171d1431824b99ecc51 27-Jul-2012 Dylan Noblesmith <nobled@dreamwidth.org> test/Preprocessor: add NVPTX predefine tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160866 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
455e72e7625a8f87c2c302d8d82baee5c111e094 19-Jul-2012 Bob Wilson <bob.wilson@apple.com> Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.

This macro was being unconditionally set to zero, preceded by a FIXME comment.
This fixes <rdar://problem/11845441>. Patch by Michael Gottesman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160491 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-macros.c
4b49756fdc066688e30f6ca69feffd5f7686cb1b 11-Jul-2012 Jordan Rose <jordan_rose@apple.com> Start testing some commented-out cases of badly-formed __has_include.

Filed PR13334 for the cases that cause the compiler to crash, and
PR13335 for the cases where we should be recovering more gracefully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160070 91177308-0d34-0410-b5e6-96231b3b80d8
as_include.c
78541c433049322b27b4f437973076ba29cff709 11-Jul-2012 Jordan Rose <jordan_rose@apple.com> Allow -verify directives to be filtered by preprocessing.

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
ine-directive.c
acro_paste_c_block_comment.c
arning_tests.c
84f30809a2ce02183609a738aaa116d832e61da3 07-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Wire up -mrdrnd for X86.

For some reason GCC decided to call the feature rdrnd instead of rdrand,
which requires translating it for LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159897 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
a1b62273f8cb823e74e7b67685c0c681efb8ff9d 05-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Define __mips_dsp_rev / __mips_dspr2 / __mips_dsp macros
if -mdsp or -mdspr2 options are provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159774 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
1176bcdb21945c7913d684973887e6f588a49236 05-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Define __mips16 macro if -mips16 option is provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159753 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
11d3f4cc27e6b923fc32481dc1bb5ec46c7d1f4b 03-Jul-2012 David Chisnall <csdavec@swan.ac.uk> Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
runtime to gnustep from gnu. Fix EH for the GCC runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159684 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
on_fragile_feature1.m
39d5fa131ff0f2de0f04b16dca086c51102cb1bf 03-Jul-2012 Hal Finkel <hfinkel@anl.gov> Add additional architecture defines for PPC targets.

Patch by Andy Gibbs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159665 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
540f9ae1023bba27052c742cd92d0b32361b28eb 26-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> preprocessing: gcc supports #line 0. So, treat this
as a gcc supported extension with usual treatment
with -pedantic (warn) and -pedantic-errors (error).
// rdar://11550996


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159226 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
9f728cd37476c6588b06d241fa778d2df6e277da 23-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Minor improvements to some C99 variadic-macro-related diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159054 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
986f317944658ecb1c8c279c1c8a0079396d42bf 21-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Do not complain about junk on the end of a #endif in a skipped block. Such junk
is permitted by all relevant language standards. Patch by Andy Gibbs!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158883 91177308-0d34-0410-b5e6-96231b3b80d8
isabled-cond-diags2.c
260611a32535c851237926bfcf78869b13c07d5b 20-Jun-2012 John McCall <rjmccall@apple.com> Restructure how the driver communicates information about the
target Objective-C runtime down to the frontend: break this
down into a single target runtime kind and version, and compute
all the relevant information from that. This makes it
relatively painless to add support for new runtimes to the
compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,
available at the driver level as a better and more general
alternative to -fgnu-runtime and -fnext-runtime. This new
concept of an Objective-C runtime also encompasses what we
were previously separating out as the "Objective-C ABI", so
fragile vs. non-fragile runtimes are now really modelled as
different kinds of runtime, paving the way for better overall
differentiation.

As a sort of special case, continue to accept the -cc1 flag
-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.

I won't go so far as to say "no functionality change", even
ignoring the new driver flag, but subtle changes in driver
semantics are almost certainly not intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
on_fragile_feature1.m
0cdd1fe3ec29b5cbff9a728966ace5c5b5d614f7 16-Jun-2012 Jordan Rose <jordan_rose@apple.com> [-E] Emit a rewritten _Pragma on its own line.

1. Teach Lexer that pragma lexers are like macro expansions at EOF.
2. Treat pragmas like #define/#undef when printing.
3. If we just printed a directive, add a newline before any more tokens.
(4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp)

PR10594 and <rdar://problem/11562490> (two separate related problems)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158571 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-location.c
omment_save.c
1a8354659a6007bbae3b5d9161a56ecc8f61a219 15-Jun-2012 David Blaikie <dblaikie@gmail.com> Fix PR13065.

This condition (added in r158093) was overly conservative.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158483 91177308-0d34-0410-b5e6-96231b3b80d8
omment_save.c
c5f7459b2d60ad55ed2ab3cfd281d9c718f5a8df 13-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix issue where a token paste which forms a /* or // would discard the rest of
the input: token-pasting was producing a tok::eof.

Patch by Andy Gibbs!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158412 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_c_block_comment.c
acro_paste_identifier_error.c
02a84277864e5476b12c0ec687ed09f0b2922471 12-Jun-2012 Hal Finkel <hfinkel@anl.gov> Add PPC support for translating gcc-style -mcpu options into LLVM -target-cpu options.

This functionality is based on what is done on ARM, and enables selecting PPC CPUs
in a way compatible with gcc's driver. Also, mirroring gcc (and what is done on x86),
-mcpu=native support was added. This uses the host cpu detection from LLVM
(which will also soon be updated by refactoring code currently in backend).

In order for this to work, the target needs a list of valid CPUs -- we now accept all CPUs accepted by LLVM.
A few preprocessor defines for common CPU types have been added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158334 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b6af69ec6c93f4eba67b638a3f0fece23ad6954b 10-Jun-2012 Craig Topper <craig.topper@gmail.com> Add XOP feature flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158284 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
d73ef135ba029db59c0b5649e6117845d9e39600 06-Jun-2012 Jordan Rose <jordan_rose@apple.com> Add pedantic warning -Wempty-translation-unit (C11 6.9p1).

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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158085 91177308-0d34-0410-b5e6-96231b3b80d8
ndef-error.c
3dbcc889c1ce291b7aa227597d22c009d5c489e3 05-Jun-2012 Simon Atanasyan <satanasyan@mips.com> Mips: Define __mips_hard_float macro additional to __mips_single_float
when single float ABI is selected.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157996 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
bd8a18db67232edf1ca95d6f2fbf193900138b29 03-Jun-2012 Craig Topper <craig.topper@gmail.com> Add __POPCNT__ to test cases for corei7 and corei7-avx

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157905 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
2ae950726990c09f790931edcf9e6763851ee077 03-Jun-2012 Craig Topper <craig.topper@gmail.com> Add fma feature flag for Intel FMA instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157904 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
4dfa5ad7b1f70520f02c754750209138e94b6eb5 29-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Define __SSE4A__ when targeting new AMD CPUs.

This doesn't really fit the existing SSELevel so it gets an extra flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157630 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
66c44e700fb3f244b2c443bfbd6a05b5f1843ec0 10-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Make sure that MacroExpands callbacks are always in source order.

Fixes assertion hit in the preprocessing record. rdar://11426523

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156557 91177308-0d34-0410-b5e6-96231b3b80d8
p-record.c
50e8a270cf58770fef90f9b8f610a007a800380b 09-May-2012 Simon Atanasyan <satanasyan@mips.com> Pass a target triple explicitly to check platform specific macros definitions.
That allows to run the tests on all platforms successfully.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156500 91177308-0d34-0410-b5e6-96231b3b80d8
mx.c
redefined-arch-macros.c
0513448ae71478fd08d7e925bab46db1ddac3dfa 04-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the standard values for the __cplusplus macro, even when in GNU mode. GCC
dropped its prior behavior of always defining __cplusplus to 1 in GNU mode in
version 4.7.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156113 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
3206403316fa505fbacea92c99ae13c5b664bc3e 26-Apr-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Define __ANDROID__ macro on -androideabi targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155632 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
fd93630cce9b9bce6b4d735e1277be2c7e3a7fbf 26-Apr-2012 Craig Topper <craig.topper@gmail.com> Enable AVX/AVX2 for Sandy Bridge, Ivy Bridge, and Haswell CPUs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155624 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
030c7e9d105fdd9b5cb11b5b16c258bcb39bdac1 16-Apr-2012 David Blaikie <dblaikie@gmail.com> Fix tests that weren't actually verifying anything.

Passing -verify to clang without -cc1 or -Xclang silently passes (with a
printed warning, but lit doesn't care about that). This change adds -cc1 or,
as is necessary in one case, -Xclang to fix this so that these tests are
actually verifying as intended.

I'd like to change the driver so this kind of mistake could not be made, but
I'm not entirely sure how. Further, since the driver only warns about unknown
flags in general, we could have similar bugs with a misspellings of arguments
that would be nice to find.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154776 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_sysheader.c
fafbf06732746f3ceca21d452d77b144ba8652ae 11-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Provide, and document, a set of __c11_atomic_* intrinsics to implement C11's
<stdatomic.h> header.

In passing, fix LanguageExtensions to note that C11 and C++11 are no longer
"upcoming standards" but are now actually standardized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154513 91177308-0d34-0410-b5e6-96231b3b80d8
eature_tests.c
5e219cf7f896873c1c1e64b9e87a7dade99debba 08-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Teach Clang about PIE compilations. This is the first step of PR12380.

First, this patch cleans up the parsing of the PIC and PIE family of
options in the driver. The existing logic failed to claim arguments all
over the place resulting in kludges that marked the options as unused.
Instead actually walk all of the arguments and claim them properly.

We now treat -f{,no-}{pic,PIC,pie,PIE} as a single set, accepting the
last one on the commandline. Previously there were lots of ordering bugs
that could creep in due to the nature of the parsing. Let me know if
folks would like weird things such as "-fPIE -fno-pic" to turn on PIE,
but disable full PIC. This doesn't make any sense to me, but we could in
theory support it.

Options that seem to have intentional "trump" status (-static, -mkernel,
etc) continue to do so and are commented as such.

Next, a -pie-level flag is threaded into the frontend, rigged to
a language option, and handled preprocessor, setting up the appropriate
defines. We'll now have the correct defines when compiling with -fpie.

The one place outside of the preprocessor that was inspecting the PIC
level (as opposed to the relocation model, which is set and handled
separately, yay!) is in the GNU ObjC runtime. I changed it to exactly
preserve existing behavior. If folks want to change its behavior in the
face of PIE, they can do that in a separate patch.

Essentially the only functionality changed here is the preprocessor
defines and bug-fixes to the argument management.

Tests have been updated and extended to test all of this a bit more
thoroughly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154291 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
95794225e9f80d4b45d4767e0b4b43f818c585da 08-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Rephrase the preprocessor test to directly use CC1 and not bother
testing any of the strange driver behavior. We already have some tiny
tests for the driver behavior, and I'm going to expand them greatly in
the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154290 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
65ea45a447c1862da654e3eb56bea80f89c0d5b7 08-Apr-2012 Chandler Carruth <chandlerc@gmail.com> FileCheck-ize this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154289 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
aba3f0f8658b099fabd17f29f67bf6dd8ee5ddfd 06-Apr-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Move tests check float ABI macros definitions to the more appropriate place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154184 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
7a521806831b8724364ff714c959b354bbf5a438 06-Apr-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Add tests for predefined macros for MIPS targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154168 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
85ff9693b178658f9d8af7be30a086fb1ab81fdd 05-Apr-2012 Daniel Dunbar <daniel@zuster.org> [Lex] Add support for 'user specified system frameworks' (see test case).
- Developers of system frameworks need a way for their framework to be treated as a "system framework" during development. Otherwise, they are unable to properly test how their framework behaves when installed because of the semantic changes (in warning behavior) applied to system frameworks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154105 91177308-0d34-0410-b5e6-96231b3b80d8
nputs/TestFramework.framework/.system_framework
nputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework/Headers/AnotherTestFramework.h
nputs/TestFramework.framework/Headers/TestFramework.h
ser_defined_system_framework.c
a06642a3a3a8a9c82d6c636cd3f2c18c4fac66c4 04-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] In Preprocessor::CachingLex() check whether there were more tokens
cached during the non-cached lex, otherwise we are going to drop them.

Fixes a bogus "_Pragma takes a parenthesized string literal" error when
expanding consecutive _Pragmas in a macro argument.

Part of rdar://11168596

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153994 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-in-macro-arg.c
14e645557ae91c6770d62beb00a1c522e0bfd5d6 03-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Correct handling of _Pragma macro inside a macro argument.

If we are pre-expanding a macro argument don't actually "activate"
the pragma at that point, activate the pragma whenever we encounter
it again in the token stream.
This ensures that we will activate it in the correct location
or that we will ignore it if it never enters the token stream, e.g:

\#define EMPTY(x)
\#define INACTIVE(x) EMPTY(x)
INACTIVE(_Pragma("clang diagnostic ignored \"-Wconversion\""))

This also fixes the crash in rdar://11168596.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153959 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-in-macro-arg.c
db81d38d9cd468a9eeffe8ab092be4d48e43888e 27-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Handle correctly inclusion directives that have macro expansions, e.g
"#include MACRO(STUFF)".

-As an inclusion position for the included file, use the file location of the file where it
was included but *after* the macro expansions. We want the macro expansions to be considered
as before-in-translation-unit for everything in the included file.

-In the preprocessing record take into account that only inclusion directives can be encountered
as "out-of-order" (by comparing the start of the range which for inclusions is the hash location)
and use binary search if there is an extreme number of macro expansions in the include directive.

Fixes rdar://11111779

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153527 91177308-0d34-0410-b5e6-96231b3b80d8
p-record.c
p-record.h
a7d66b55a62cf032813a4dc709dc2c986b2a0740 19-Mar-2012 Matt Beaumont-Gay <matthewbg@google.com> line endings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153046 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoft-import.c
4207edaf03da28fa917a94b31c5c1eef0e6417dc 18-Mar-2012 Aaron Ballman <aaron@aaronballman.com> Turns #import in MS Mode into an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153009 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoft-import.c
dc72dc806cfa48ae7dbe32eb811a8151feec982d 10-Mar-2012 Aaron Ballman <aaron@aaronballman.com> Updated the test so that it checks for ms-compatibility in addition to ms-extensions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152516 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-macros.c
5b31d55ab3a72c026a0781b6dcf9bc1dd462e8b9 10-Mar-2012 Aaron Ballman <aaron@aaronballman.com> No longer defining GNUC mode when compiling for Microsoft compatibility. This allows people's cross-platform compiler-specific macros to work properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152512 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-macros.c
4c55c54db8e676aa3e042188773d9d82d59fff91 02-Mar-2012 Aaron Ballman <aaron@aaronballman.com> Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151949 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
178a9b8b22cb77b4291bf076c0cd8d6561c7e711 02-Mar-2012 Hal Finkel <hfinkel@anl.gov> Fix an ABI problem with ptrdiff_t and intptr_t on PPC32

ptrdiff_t on PPC32 on Linux, etc. should be int not long.
This does not matter for C, but it does matter for C++ because of
name mangling.

The preprocessor test has been changed accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151935 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
9a0b7052432b572024a95cf5026351b859add9bd 01-Mar-2012 Jean-Daniel Dupas <devlists@shadowlab.org> Merge __has_attribute tests. Patch by Jonathan Sauer!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151819 91177308-0d34-0410-b5e6-96231b3b80d8
as_attribute.c
8a5e7fdd2c7d3f46685396e13ed76798f4573c02 01-Mar-2012 Jean-Daniel Dupas <devlists@shadowlab.org> Implement double underscore names support in __has_attribute



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151809 91177308-0d34-0410-b5e6-96231b3b80d8
as_attribute.c
10285d9113c14d1e523f86a55b193eb752638ea5 01-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Revert r151800, which was committed without review and has correctness issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151804 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
7abe1666f225b6d1a11aa7ed19d9a0dcc49391cb 01-Mar-2012 Aaron Ballman <aaron@aaronballman.com> Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151800 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
07a4b0488b03fc1590326ab7c812627a546feb14 01-Mar-2012 Nico Weber <nicolasweber@gmx.de> Move suport for redefining operator keywords from -fms-extensions to -fms-compatibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151776 91177308-0d34-0410-b5e6-96231b3b80d8
xx_oper_keyword_ms_compat.cpp
xx_oper_keyword_ms_ext.cpp
f4fb07ed4dfd144a39d904fc77b3b0bab580eb2e 29-Feb-2012 Nico Weber <nicolasweber@gmx.de> Allow operator keywords to be #defined in ms-ext mode.

Fixes PR10606.

I'm not sure if this is the best way to go about it, but
I locally enabled this code path without the msext conditional,
and all tests pass, except for test/Preprocessor/cxx_oper_keyword.cpp
which explicitly checks that operator keywords can't be redefined.

I also parsed chromium/win with a clang with and without this patch.
It introduced no new errors, but removes 43 existing errors.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151768 91177308-0d34-0410-b5e6-96231b3b80d8
xx_oper_keyword_ms_ext.cpp
5297d71e8c85f9b04dc31c690e91c6a2f7eddb90 25-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Accept __has_feature(__feature__) as a synonym for __has_feature(feature) (and
likewise for __has_extension). Patch by Jonathan Sauer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151445 91177308-0d34-0410-b5e6-96231b3b80d8
eature_tests.c
34a2c42ba8cc58a404238a3c1cbc4a7442e57832 02-Feb-2012 Ted Kremenek <kremenek@apple.com> Per discussion on cfe-dev, remove '#error' and '#warning' from diagnostic text.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149566 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
6e1d2eaa7d7f1008a5bac12f73fbf6167802a46d 31-Jan-2012 Nico Weber <nicolasweber@gmx.de> Fix "long double" and __SIZE_TYPE__ on powerpc, now with test fix.

Fixes PR11867. Patch from Jeremy Huddleston!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149334 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
9ec60dfe771ff28a84889dced6f8fd3748d3d55e 20-Jan-2012 Sebastian Pop <spop@codeaurora.org> rename -ccc-host-triple into -target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148582 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
86_target_features.c
31cbe684302a5ccb001fa2131c0e4aeaa372f5c0 13-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert r148138; it's causing test failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148141 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
86_target_features.c
edd4f3c39101912605c2a1868dd2be71aa218798 13-Jan-2012 Sebastian Pop <spop@codeaurora.org> rename -ccc-host-triple into -target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148138 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
86_target_features.c
c0004df84fca9225b66a50adc66cf21c34298227 11-Jan-2012 Douglas Gregor <dgregor@apple.com> C11 allows typedefs to be redefined. Implement this in C11 mode, and
downgrade the default-error warning to an ExtWarn in
C90/99. <rdar://problem/10668057>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147925 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
62d0fabffdeda9f76ecb6e0444c7fd07443c972b 03-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added testcases for -Wdisabled-macro-expansion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147473 91177308-0d34-0410-b5e6-96231b3b80d8
arn-disabled-macro-expansion.c
ba9186c6fca2b8dd7885c909e7b1fd76c537c4ed 03-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Teach the frontend to provide the builtin preprocessor defines for
-ffast-math.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147440 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-macros.c
b406669fea7c8db83a377f368f1689c848296974 28-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 with sse disabled.

x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD
to "2".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147311 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
a3ca4d655974ad66e432a6c78dd08b277a639edf 16-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Don't allow #include (and its friends #import, #include_next and
#__include_macros) in the arguments of a function-style macro. Directives in the
arguments of such macros have undefined behaviour, and GCC does not correctly
support these cases. In some situations, this can lead to better diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146765 91177308-0d34-0410-b5e6-96231b3b80d8
acro_arg_directive.c
acro_arg_directive.h
53f8217a5abbc6beb00396938861c638c78a842d 14-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch test over to using -verify instead of using grep. PR11552.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146544 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_c_block_comment.c
53ac3d88f9089affe6c5a93dc31d45a4a6f77447 27-Nov-2011 Rafael Espindola <rafael.espindola@gmail.com> Make our handling of MMX x SSE closer to what gcc does:

* Enabling sse enables mmx.
* Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already).
* The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145194 91177308-0d34-0410-b5e6-96231b3b80d8
mx.c
4c7ce36a761b65a659aa6c4728a318e5d06f5f95 26-Nov-2011 Rafael Espindola <rafael.espindola@gmail.com> Set __OPTIMIZE_SIZE__ on -Os and -Oz. This matches gcc's behaviour on both OS X
and linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145142 91177308-0d34-0410-b5e6-96231b3b80d8
ptimize.c
a6d81f9a2d236ae21491455f649ea765123f6fc7 23-Nov-2011 James Molloy <james.molloy@arm.com> AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and aapcs-linux.

Original behaviour of defining wchar_t as signed int has been kept for apcs-gnu as I don't have any spec for this to validate against.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145102 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
0cad538ae17f8e05375d1edf1d9f49bb4049e39b 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Change this test to reflect the state we are moving in. The Clang
builtin headers are no longer going to receive the old 'implicit extern
"C" block' semantics. This hint is actually ignored by both Clang and
GCC at this point, and Clang's own builtin headers can simply be changed
if there is any issue with this. Clang should be free to include these
however it wants, and so shorter and simpler is better.

Note: *nothing* is changing about the *system* stddef.h include. That
should always have the exact same include semantics, whether with Clang
or GCC or any other compiler. Only the compiler-builtin header search
path is changing.

If anyone knows of some risk that this introduces that I've not thought
of, please chime in. So far, only Windows has switched to the Brave New
World, but others should be switching soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143806 91177308-0d34-0410-b5e6-96231b3b80d8
eader_lookup1.c
1592c6cf0d1ef35b9f4e6729cb4f071ade6f019e 25-Oct-2011 Dan Gohman <gohman@apple.com> Remove more SystemZ (s390) tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142883 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
78cf13db148c3a7f86a3f2148591a7a2c1b8e711 25-Oct-2011 Dan Gohman <gohman@apple.com> Remove the Blackfin backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142881 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
183a8dead4c3c07efe27fb2db7ede6ed7ac8e2f2 12-Oct-2011 Ted Kremenek <kremenek@apple.com> Add test case for __has_warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141806 91177308-0d34-0410-b5e6-96231b3b80d8
arning_tests.c
209dfbe638d8a2ea85eac255a919381962b80704 12-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle the case where preprocessor entities are not received in order,
fixes http://llvm.org/PR11120

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141788 91177308-0d34-0410-b5e6-96231b3b80d8
p-record.c
p-record.h
d1e40d5389a4382cbebc97d54792f41ee0414af4 02-Oct-2011 John McCall <rjmccall@apple.com> Make -fobjc-nonfragile-abi the -cc1 default, since it's the
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.

This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.

Most, though, it involved a perl script to translate a ton
of test cases.

Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140957 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
on_fragile_feature.m
on_fragile_feature1.m
redefined-exceptions.m
49defe63013f6a97aed2f35e50c6b6c69bc0dcf8 28-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Generate tests for all of the x86 SIMD instruction feature set
predefines based on the output of GCC as well as the CPU predefines.

Invert tests for __AVX__, Clang's AVX feature is hard coded off still.

Switch Atom from 'SSE3' to 'SSSE3'. This matches GCC's behavior, Intel's
documentation, and ICC's documentation (such as I could dig up).

Switch Athlon and Geode to enable 3dnowa rather than just 3dnow and
nothing (resp.).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140692 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
f1aabcf9263a14f1cd4fc321af35ce6b9d2c8d27 28-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Add a little banner to this test. This lets my scripts more easily
automate the process of updating and generating these tests.

If anyone is really interested, I can check my scripts for generating
this test in, but its a horrible pile of shell... Not sure its really
worth it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140691 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
53bf4f94185dbd1144724cdd5101d2163890b049 28-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Fix a think-o on my part that got enshrined in a FIXME by setting up the
__tune_...__ define as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140690 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
26a3914eeda65e0dd6b55899f6d76ef99fc021c6 28-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Teach Clang to reject 32-bit only CPUs when compiling in 64-bit mode.
Add 64-bit preprocessor macro tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140688 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
f6cf1c28fbdeafee3cee95423a6a76be7278867e 28-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Begin fixing Clang's predefined macros for various architectures. This
is *very* much a WIP that I'll be refining over the next several
commits, but I need to get this checkpoint in place for sanity.

This also adds a much more comprehensive test for architecture macros,
which is roughly generated by inspecting the behavior of a trunk build
of GCC. It still requires some massaging, but eventually I'll even check
in the script that generates these so that others can use it to append
more tests for more architectures, etc.

Next up is a bunch of simplification of the Targets.cpp code, followed
by a lot more test cases once we can reject invalid architectures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140673 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
redefined-arch-macros.c
eced60c185c92a34953090b98d8458fb2df9dc81 12-Sep-2011 Douglas Gregor <dgregor@apple.com> Only predefine the __EXCEPTIONS macro if C++ exceptions are turned on.
Only predefine the OBJC_ZEROCOST_EXCEPTIONS macro if Objective-C
exceptions are turned on. Fixes PR10910.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139496 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
redefined-exceptions.m
f84139a1331c63c998e8b7d54148c75ac0b48ccd 31-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Change err_pp_file_not_found back to an Error; when it's a Warning, we suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.)

Fixes <rdar://10041960>. And also brings down the number of warnings without a flag by one :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138842 91177308-0d34-0410-b5e6-96231b3b80d8
issing-system-header.c
issing-system-header.h
88710f22be1acb04b7d812aebe87bea56394c07c 03-Aug-2011 Eli Friedman <eli.friedman@gmail.com> A couple fixes for preprocessor expressions:

1. Be more tolerant of comments in -CC (comment-preserving) mode. We were missing a few cases.

2. Make sure to expand the second FOO in "#if defined FOO FOO". (See also
r97253, which addressed the case of "#if defined(FOO FOO".)

Fixes PR10286.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136748 91177308-0d34-0410-b5e6-96231b3b80d8
omment_save_if.c
xpr_define_expansion.c
95b59eae3532902753d1a588953c7dfcc1ef698d 11-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Reenable test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134928 91177308-0d34-0410-b5e6-96231b3b80d8
arn-macro-unused.c
d0c13585b64bbd24463e938d6451722f068f8b86 11-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add missing header file for the test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134927 91177308-0d34-0410-b5e6-96231b3b80d8
arn-macro-unused.h
df574f0ac2acf774a874752f6421f1f6f85cb2cc 11-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Test is broken; XFAIL it until Argyrios gets a chance to look at it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134925 91177308-0d34-0410-b5e6-96231b3b80d8
arn-macro-unused.c
1f8dcfca6c57606b9f4f96404642c02562289b83 11-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for unused macro when undef'ing it, if it comes from an included file. rdar://9745065

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134919 91177308-0d34-0410-b5e6-96231b3b80d8
arn-macro-unused.c
db257698e0721e5e32e5b285869ae6d73b4d21a1 11-Jul-2011 NAKAMURA Takumi <geek4civic@gmail.com> test/Preprocessor/include-directive2.c: Get rid of using <float.h> to avoid #include_next on mingw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134896 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive2.c
0fd9c48dfc6a324d8399b0b43ab4b943a1b1b843 07-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When expanding macro arguments, treat '##' coming from an argument as a normal token.

e.g.

#define M(x) A x B
M(##) // should expand to 'A ## B', not 'AB'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134588 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_hashhash.c
c09ce1224dedc470fce9747e5936ff83cc6762eb 22-Jun-2011 Douglas Gregor <dgregor@apple.com> Copy diagnostic pragmas to the preprocessed output, from Richard Osborne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133633 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic_output.c
0678899e0d619df03eae2e2d43c3fe1fa958d03a 20-Jun-2011 Douglas Gregor <dgregor@apple.com> Define __cplusplus to 201103L when in (non-GNU) C++0x mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133437 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b11e43c31dc5d395a7ec6a07259c078dadd4f47b 14-Jun-2011 Chris Lattner <sabre@nondot.org> revert r133003 and fix the bug properly: the issue was that ## in a token
lexer is not a paste operator, it is a normal token. This fixes a conformance
issue shown here:
http://p99.gforge.inria.fr/c99-conformance/c99-conformance-clang-2.9.html

and it defines away the crash from before.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133005 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
acro_paste_simple.c
0e0b6931598be8a50ac5c6e0be595b35da276df9 14-Jun-2011 Chris Lattner <sabre@nondot.org> Fix a crash on the testcase in PR9981 / rdar://9486765.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133003 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
f6f7f57c34164038e860713ee8d2f4ebd01cd9e4 23-May-2011 Chris Lattner <sabre@nondot.org> attempt to fix windows testers, which generate #line by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131882 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_sysheader.c
784c257c8f5c3a737b0ae1dceb5d54d29b6637cf 23-May-2011 Chris Lattner <sabre@nondot.org> Invoke the FileChanged callback before pushing the linemarker for a system
header. Getting it in the wrong order generated incorrect line markers in -E
mode. In the testcase from PR9861 we used to generate:

# 1 "test.c" 2
# 1 "./foobar.h" 1
# 0 "./foobar.h"
# 0 "./foobar.h" 3
# 2 "test.c" 2

now we properly produce:

# 1 "test.c" 2
# 1 "./foobar.h" 1
# 1 "./foobar.h" 3
# 2 "test.c" 2

This fixes PR9861.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131871 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_sysheader.c
e26224e61c8a3b607c73c52f2cd0344065d7b412 21-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Only ignore extra tokens after #else if we skip it, otherwise warn. Fixes rdar://9475098.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131788 91177308-0d34-0410-b5e6-96231b3b80d8
f_warning.c
277d1e1efd4d450667e7856550c02eed19aa081c 30-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Some small improvements to the builtin (-ffreestanding) stdint.h; in
particular, make sure to handle WCHAR_MIN correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130618 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
338d7f7362d18fa9c39c6bb5282b4e20574a9309 28-Apr-2011 Francois Pichet <pichet2000@gmail.com> Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin defines to real types.

Otherwise statements like:
__int64 var = __int64(0);

would be expanded to:
long long var = long long(0);

and fail to compile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130369 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
f8c247d247f9f7ab2bf4965677e6d056711c99d5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Move all of the logic for __DEPRECATED to the driver based on comments
from dgregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130066 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
1cfeefdb383b106f63d91dd715f54339467d6aa8 21-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129907 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-pushpop-macro.c
ad1a4c6e89594e704775ddb6b036ac982fd68cad 31-Mar-2011 Daniel Dunbar <daniel@zuster.org> Change Clang's __VERSION__ to include the same basic info as in clang -v.
- Please never ever ever ever write a tool that sniffs this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128599 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
a7689efa25bf54452c758c672bd1a5608d5757cc 27-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Diagnose uninitialized uses of a variable within its own initializer.
This is basically the same idea as the warning on uninitialized uses of
fields within an initializer list. As such, it is on by default and
under -Wuninitialized.

Original patch by Richard Trieu, with some massaging from me on the
wording and grouping of the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128376 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic_sections.cpp
2ed42287b9b88a0bb08ab10e95e306da3f294ba9 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL
comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127910 91177308-0d34-0410-b5e6-96231b3b80d8
raditional-cpp.c
84021556baceb76eedf7d44be8ba71d9b8cfacce 28-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Rename tok::eom to tok::eod.

The previous name was inaccurate as this token in fact appears at
the end of every preprocessing directive, not just macro definitions.
No functionality change, except for a diagnostic tweak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126631 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
9d3f5f7550a2fab4178ed01425758c349b73a609 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Make LexOnOffSwitch a Preprocessor member function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125473 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
fd6b874f3af26bc64a1d5781833c197b314afb8b 26-Jan-2011 Ted Kremenek <kremenek@apple.com> Merge -Wuninitialized-experimental into -Wuninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124279 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic_sections.cpp
a33e0504f61132ac43f4f89af43b12c87e987c20 18-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When redefining a macro don't warn twice if it's not used and don't warn for duplicate
definition by command line options. Fixes rdar://8875916.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123767 91177308-0d34-0410-b5e6-96231b3b80d8
arn-macro-unused.c
12e8464da2769bbc1205194714d84c905a571081 12-Jan-2011 Douglas Gregor <dgregor@apple.com> wint_t is defined as 'unsigned int' on Linux. Fixes PR8938.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123320 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
ba3ca5271a01eae7cbd6a19ace004d75012c02a8 06-Jan-2011 Chris Lattner <sabre@nondot.org> fix rdar://8823139, a crash on a comment in a preprocessed .s file
that contains the ## operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122946 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
ee933e1cc2718bd829c4649d060fc9f686005990 24-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle locations coming from macro instantiations properly in SourceManager::isBeforeInTranslationUnit().
Fixes rdar://8790245 and http://llvm.org/PR8821.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122536 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic_sections.cpp
0827408865e32789e0ec4b8113a302ccdc531423 15-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix diagnostic pragmas.

Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state.
Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect
a lot of places, like C++ inline methods, template instantiations, the lexer, etc.

Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location.

Fixes rdar://8365684.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121873 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic_sections.cpp
ba772ba69ba0661f059f49c58395f870eb5c4df3 16-Nov-2010 Chandler Carruth <chandlerc@gmail.com> This really seems like a boring set of fixes to our tests to make them more
independent of the underlying system. Let me know if any of these are too
aggressive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119345 91177308-0d34-0410-b5e6-96231b3b80d8
lang_headers.c
as_include.c
eader_lookup1.c
nclude-directive2.c
091f23f1d6d4bcffd6641cda72a6831e08c02ea7 09-Nov-2010 John McCall <rjmccall@apple.com> Split out -Wconversion warnings about constant precision into their
own subcategory, -Wconstant-conversion, which is on by default.

Tweak the constant folder to give better results in the invalid
case of a negative shift amount.

Implements rdar://problem/6792488



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118636 91177308-0d34-0410-b5e6-96231b3b80d8
ushable-diagnostics.c
13f8cbfbd273999c75999947689234a385514469 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Add test for Windows predefined macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117000 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-macros.c
e6a7dabdefd328729bdcf15a434108b4c0bc64fb 19-Oct-2010 Ted Kremenek <kremenek@apple.com> In ~Preprocessor(), also cleanup the MacroInfo objects left-over from stray "#pragma push_macro" uses. This
fixes a potential memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116826 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-pushpop-macro.c
757e685512b8616c9de918b3d3fad8247562dce2 11-Oct-2010 Chris Lattner <sabre@nondot.org> Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116191 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
1b2ad2fd9e2d5352144481aa1fd995d333d9adc9 20-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r114316, -Wunused-value enabled by default was intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114318 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
6dff2288a8054bdbc97217568e5831bcce809db8 19-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114316 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
2a24065dbbe6b88c21da66f588b913e5f3b403fa 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Fix this test to use -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114156 91177308-0d34-0410-b5e6-96231b3b80d8
rint_line_empty_file.c
2346513da49f0a3e4f0deaf198e708d18390b41e 17-Sep-2010 Ted Kremenek <kremenek@apple.com> Handle '#line' in '-E' that has an empty file name. Fixes <rdar://problem/8439412>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114142 91177308-0d34-0410-b5e6-96231b3b80d8
rint_line_empty_file.c
c79f767941fdfedb02d20296a042ad951a593890 08-Sep-2010 Daniel Dunbar <daniel@zuster.org> tests: Use -ffreestanding when including stdint.h, to avoid platform dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113301 91177308-0d34-0410-b5e6-96231b3b80d8
bjc-pp.m
6493a4d7129673f7878da2382dedf4f9abc57e4c 30-Aug-2010 Douglas Gregor <dgregor@apple.com> Now that GCC will have #pragma push/pop (in GCC 4.6), allow the
#pragma without requiring it to be in the "clang" namespace, from
Louis Gerbarg!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112484 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic.c
ushable-diagnostics.c
1ef8a2e7675f3d8b6e8d9963b00378086e1dcdc7 29-Aug-2010 John McCall <rjmccall@apple.com> Add support for Microsoft's __pragma in the preprocessor.
Patch by Francois Pichet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112391 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
f051d060ab438ba062d3a9bd1a862dc945237c1c 21-Aug-2010 Chris Lattner <sabre@nondot.org> filecheckize test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111702 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_comma_swallow.c
496af57256566c0db39b6a538bf7e4c6634afb2a 21-Aug-2010 Chris Lattner <sabre@nondot.org> fix PR7943, a corner case with the GNU __VA_ARGS__ comma
swallowing extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111701 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_comma_swallow.c
f47724bf78299c7a50f008e0443c5f9f9f279ddc 17-Aug-2010 Chris Lattner <sabre@nondot.org> Implement #pragma push_macro, patch by Francois Pichet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111234 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-pushpop-macro.c
2f05449fa1c9015a84b74c3308b856fc704662be 08-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Push location through the MacroUndefined PPCallback and use it to print #undefs in -dD mode. (PR7818)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110523 91177308-0d34-0410-b5e6-96231b3b80d8
ump-macros-undef.c
72283806e717442536eef55941fd573d4b552393 06-Aug-2010 Douglas Gregor <dgregor@apple.com> Define _INTEGRAL_MAX_BITS for the win32 and win64 targets, from Per Lindén!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110442 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
1d832436e9cd9223cbad66c5ca9ac87ed5c8560c 03-Aug-2010 Eli Friedman <eli.friedman@gmail.com> PR7795: Fix the definition of __WCHAR_MAX__ with -fshort-wchar.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110126 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
920bf45bd739334c25633ec9a29d903cab50be23 17-Jul-2010 Chris Lattner <sabre@nondot.org> Add another terrible VC++ compatibility hack: allow users to
allow invalid token pastes (when in -fms-extensions mode)
with -Wno-invalid-token-paste


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108624 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_msextensions.c
3e88dcf26e43db4b5e85b3ad681ebe53ee23d35f 17-Jul-2010 Chris Lattner <sabre@nondot.org> rename test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108623 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_mscomment.c
acro_paste_msextensions.c
7f3a545ba6ccfbe8b7f5268e4cfbee52ec2c4d4c 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> Headers: Define __INT64_TYPE__ in terms of getInt64Type(), which isn't always
'long'. The practical upshot is so that the uint64_t we define in our stdint.h
ends up being compatible with that defined by gcc (at least on Darwin), which
otherwise could lead to type incompatibilities with other system headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107255 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
96d38c100d5a37f7a3343c526507de5b50f68c27 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> Headers: Change [u]intmax_t to be defined in terms of __[U]INTMAX_TYPE__, instead of intN_t.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107254 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
c4b8e923a18ba56ecd76de5dfd7edf7f307123e3 26-Jun-2010 Daniel Dunbar <daniel@zuster.org> clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106914 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
6133aeb97da5cab2d75c5f2c2f2561ea1b8fd0ff 12-Jun-2010 Chris Lattner <sabre@nondot.org> fix PR7360: -P mode turns off line markers, but not blank space.
Apparently some programs which abuse the preprocessor depend
on this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105889 91177308-0d34-0410-b5e6-96231b3b80d8
rint_line_track.c
cfeac3441afb44c9af86eef0c911a5d90d561192 28-May-2010 Dan Gohman <gohman@apple.com> Add several more predefines from modern versions of GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104906 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
cf00ac81354b397d12e528cd87b06f86b3b85197 30-Apr-2010 Douglas Gregor <dgregor@apple.com> Fix pasto in this test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102687 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
4290fbd89e851c1f1240a007461f4afd940cbb47 30-Apr-2010 Douglas Gregor <dgregor@apple.com> Add Clang version inspection macros. Fixes PR6681.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102686 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
6b15f8e9097c9a738cfd0ed9faa1112100ede334 29-Apr-2010 Ted Kremenek <kremenek@apple.com> Add test case for __has_feature(objc_weak_class).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102639 91177308-0d34-0410-b5e6-96231b3b80d8
on_fragile_feature.m
1c6c64b5181a960c7d4cace4995a938d4dfa6fbf 17-Apr-2010 Chris Lattner <sabre@nondot.org> emit warn_char_constant_too_large at most once per literal, fixing PR6852


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101580 91177308-0d34-0410-b5e6-96231b3b80d8
f_warning.c
66791df8d8b65c68de9ecf3246e895919af75bc2 16-Apr-2010 Douglas Gregor <dgregor@apple.com> Only predefine the macro _GNU_SOURCE in C++ mode when we're on a
platform that typically uses glibc. Fixes a Boost.Thread compilation
failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101450 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
86d0ef74303e9164a0860ce849af597d34f937ab 14-Apr-2010 Chris Lattner <sabre@nondot.org> Improve line marker directive locations, patch by Jordy Rose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101226 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive-output.c
8877321ca66b2887c2f377a7f724a62f34fdf1cd 14-Apr-2010 Chris Lattner <sabre@nondot.org> make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."
when avoiding paste. Patch by David Peixotto!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101218 91177308-0d34-0410-b5e6-96231b3b80d8
utput_paste_avoid.c
88aae9188a64fe6385c7057af068aaeb8fc96b8e 13-Apr-2010 Chris Lattner <sabre@nondot.org> make the preprocessor listen to linemarker directives in -E mode,
PR6101. This is based on a patch and testcase by Jordy Rose!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101097 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive-output.c
5863b41004144470b935d18e6d52ebf11aca8597 07-Apr-2010 Chris Lattner <sabre@nondot.org> convert to -verify mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100674 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_usual_conversions.c
3edbeb78fe5ea7fffea7a94575478cde19e830e0 29-Mar-2010 Chris Lattner <sabre@nondot.org> add support for -MQ flag to quote targets in dependency file,
PR6661, patch by Ori Avtalion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99821 91177308-0d34-0410-b5e6-96231b3b80d8
ependencies-and-pp.c
8ff66de0d036842450eb979882f826d5252100f4 26-Mar-2010 Chris Lattner <sabre@nondot.org> fix a case where macro expansion should be disabled, patch by
Abramo Bagnara!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99626 91177308-0d34-0410-b5e6-96231b3b80d8
acro_disable.c
c7cf27f3cb7839d2bf65cf580db7b7d034196043 26-Mar-2010 Chris Lattner <sabre@nondot.org> merge all the macro disable tests by using filecheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99625 91177308-0d34-0410-b5e6-96231b3b80d8
acro_disable.c
acro_disable2.c
acro_disable3.c
acro_disable4.c
86851109b8f70eee7a743bc914219e4f0d8bf9f4 26-Mar-2010 Chris Lattner <sabre@nondot.org> fix a bug in paste avoidance which would cause us to accidentally
form a >>=. Patch by Abramo Bagnara, testcase by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99624 91177308-0d34-0410-b5e6-96231b3b80d8
utput_paste_avoid.c
19943151b8d01768b42218ae36189aecd41951b0 26-Feb-2010 Chris Lattner <sabre@nondot.org> fix rdar://7683173, rejecting an invalid conditional



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97253 91177308-0d34-0410-b5e6-96231b3b80d8
irective-invalid.c
fcd302b5e44e21fce82b5d78133c5c8ba6ed0727 16-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> Re-applying 96173. Looks like finally I got the test case right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96321 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
5591a6b5a8dc1498cf997a4f748a5fb035107be4 15-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> reverting back 96242 as it still causes a test failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96244 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
aed63cbe10bbef09e2bb75592760b7dc8007bbfe 15-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> Re-applying 96173 with corresponding changes in test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96242 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
13d283d6a2f50cc4a2b03357191d49672de0eb9b 12-Feb-2010 Chris Lattner <sabre@nondot.org> Fix PR6282: the include guard optimization cannot happen if the
guard macro is already defined for the first occurrence of the
header. If it is, the body will be skipped and not be properly
analyzed for the include guard optimization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95972 91177308-0d34-0410-b5e6-96231b3b80d8
i_opt2.c
i_opt2.h
f45b646244705410866d62f1d8bf017a047ed662 22-Jan-2010 Chris Lattner <sabre@nondot.org> revert my patch for rdar://7520940 that warns when a published header
is #included with "foo.h" style syntax instead of framework syntax.
It produced too much noise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94120 91177308-0d34-0410-b5e6-96231b3b80d8
oo.framework/Headers/bar.h
oo.framework/Headers/foo.h
ramework-include.m
79bff4350e751aaabeb8f28c2b9ca8d05649bb3d 14-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Forgot to commit these

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93458 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
92fe5204370f3e61cdf3c72a4a2a0460366fb613 10-Jan-2010 Chris Lattner <sabre@nondot.org> try to make this more stable?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93090 91177308-0d34-0410-b5e6-96231b3b80d8
ramework-include.m
28b6bdb12ca584912e9831cce5387242e9c95a57 10-Jan-2010 Chris Lattner <sabre@nondot.org> add comment to test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93085 91177308-0d34-0410-b5e6-96231b3b80d8
oo.framework/Headers/foo.h
804f65271953f358dc01bfcf74a93e8c93c5b2d6 10-Jan-2010 Chris Lattner <sabre@nondot.org> implement rdar://7520940: published framework headers should
import other headers within the same framework with the full
framework path, not with a relative include.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93083 91177308-0d34-0410-b5e6-96231b3b80d8
oo.framework/Headers/bar.h
oo.framework/Headers/foo.h
ramework-include.m
a91320b8af7143f7af4c0665ffa62a3b244c0bd9 22-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
- Correctly is in quotes, because we are following what I interpreted as GCC's
intent (which diverges from practice, naturally).
- Also, fix the arch define for arm1136jf-s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91855 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
5796df9464762134d8edf4bd4edc673db311ffd4 21-Dec-2009 Chris Lattner <sabre@nondot.org> a really old testcase I apparently forgot to 'svn add'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91800 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic.c
eac7c53f16bc12bcd9baac756b6f9bb77b74b0ad 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Fix predefines (__ARM_ARCH_..., __REGISTER_PREFIX).
- This should be done leveraging the backend, but I'm a little refactored
out. I'll fix it one day, I promise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91700 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
80737ad5e0a67d6e3dd0a0ba48446344215a5fd5 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang instead of 'clang', and forcibly disable use of '
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91460 91177308-0d34-0410-b5e6-96231b3b80d8
ependencies-and-pp.c
ump-options.c
eader_lookup1.c
acro-multiline.c
ic.c
ragma_sysheader.c
rint_line_count.c
86_target_features.c
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-dependency.c
Pragma-dependency2.c
Pragma-location.c
Pragma-physloc.c
Pragma.c
ssembler-with-cpp.c
uiltin_line.c
90.c
99-6_10_3_3_p4.c
99-6_10_3_4_p5.c
99-6_10_3_4_p6.c
99-6_10_3_4_p7.c
99-6_10_3_4_p9.c
lang_headers.c
omment_save.c
omment_save_if.c
omment_save_macro.c
xx_and.cpp
xx_bitand.cpp
xx_bitor.cpp
xx_compl.cpp
xx_not.cpp
xx_not_eq.cpp
xx_oper_keyword.cpp
xx_oper_spelling.cpp
xx_or.cpp
xx_true.cpp
xx_xor.cpp
isabled-cond-diags.c
ump-macros-spacing.c
ump_macros.c
umptokens_phyloc.c
xpr_comma.c
xpr_invalid_tok.c
xpr_liveness.c
xpr_multichar.c
xpr_usual_conversions.c
xtension-warning.c
eature_tests.c
unction_macro_file.c
as_include.c
ash_line.c
ash_space.c
f_warning.c
fdef-recover.c
mport_self.c
nclude-directive1.c
nclude-directive2.c
nclude-directive3.c
nclude-macros.c
nclude-pth.c
ndent_macro.c
nit.c
ine-directive.c
acro_arg_keyword.c
acro_disable.c
acro_disable2.c
acro_disable3.c
acro_disable4.c
acro_expand.c
acro_expandloc.c
acro_expandloc2.c
acro_fn.c
acro_fn_comma_swallow.c
acro_fn_disable_expand.c
acro_fn_lparen_scan.c
acro_fn_lparen_scan2.c
acro_fn_placemarker.c
acro_fn_preexpand.c
acro_fn_varargs_iso.c
acro_fn_varargs_named.c
acro_misc.c
acro_not_define.c
acro_paste_bad.c
acro_paste_bcpl_comment.c
acro_paste_c_block_comment.c
acro_paste_commaext.c
acro_paste_empty.c
acro_paste_hard.c
acro_paste_hashhash.c
acro_paste_mscomment.c
acro_paste_none.c
acro_paste_simple.c
acro_paste_spacing.c
acro_paste_spacing2.c
acro_rescan.c
acro_rescan2.c
acro_rescan_varargs.c
acro_rparen_scan.c
acro_rparen_scan2.c
acro_space.c
acro_undef.c
i_opt.c
on_fragile_feature.m
on_fragile_feature1.m
bjc-pp.m
ptimize.c
utput_paste_avoid.c
verflow.c
r2086.c
ragma_microsoft.c
ragma_poison.c
ragma_unknown.c
rint_line_track.c
ushable-diagnostics.c
kipping_unclean.c
tdint.c
tringize_misc.c
tringize_space.c
tringize_space2.c
ndef-error.c
nterminated.c
01ed063edbddd72c1b3f3f7b060bf9a0766e5d09 14-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Make tests use the new clang -cc1 flag.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91303 91177308-0d34-0410-b5e6-96231b3b80d8
on_fragile_feature.m
on_fragile_feature1.m
bjc-pp.m
83d4c969a015a14615b1af56423d02c2381ba240 14-Dec-2009 Chris Lattner <sabre@nondot.org> this was a couple bugzillas too


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91267 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_disable_expand.c
a3e008abc51933d567303a1b4bd17e68c798f60e 14-Dec-2009 Chris Lattner <sabre@nondot.org> fix rdar://7466570 - Be more bug compatible with GCC when it comes to
expanding directives withing macro expansions. This is undefined behavior
according to 6.10.3p11, so we might as well be undefined in ways similar to
GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91266 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_disable_expand.c
0dcfbc5879694debfa83520ec09635d51afdf9de 14-Dec-2009 Chris Lattner <sabre@nondot.org> filecheckize


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91265 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_disable_expand.c
a498ca67b3d6bb65443c00ef8aa8e3c83ef19b6d 09-Dec-2009 Daniel Dunbar <daniel@zuster.org> Improve test portability; I can't figure out how to get the regexp library to
match $ correctly with \r\n, unfortunately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90907 91177308-0d34-0410-b5e6-96231b3b80d8
ump_macros.c
68822391c14b4c4cd8852a7e320b3a484e5ebbd8 08-Dec-2009 Daniel Dunbar <daniel@zuster.org> Don't use MS extensions in this test, we expect header include markers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90880 91177308-0d34-0410-b5e6-96231b3b80d8
eader_lookup1.c
807b93ee6ae2806b53131abc779d2b146d853aed 07-Dec-2009 Chris Lattner <sabre@nondot.org> fix -dM with variadic macros, PR5699


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90735 91177308-0d34-0410-b5e6-96231b3b80d8
ump_macros.c
5146b1b69feac638ab14ce82037931eb3b23391b 07-Dec-2009 Chris Lattner <sabre@nondot.org> rename names for consistency


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90734 91177308-0d34-0410-b5e6-96231b3b80d8
ump_macros.c
9944f788781bb632569e4f3a47298a84f273c52f 07-Dec-2009 Chris Lattner <sabre@nondot.org> filecheckize


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90733 91177308-0d34-0410-b5e6-96231b3b80d8
ump_macros.c
30bd7a00901037c6d5471b0999d96287a7a5f70f 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Drop Preprocessor/open-failure test, it breaks running the test suite as root,
and I can't figure out how to write it more portably.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90705 91177308-0d34-0410-b5e6-96231b3b80d8
pen-failure.c
2ffb14f004affc363d86d6c7c63c356190db3679 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.

Also, update SourceManager.h doxyments for getBuffer() to reflect reality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90701 91177308-0d34-0410-b5e6-96231b3b80d8
pen-failure.c
78d5590d896cb95eea972754ad40735927ae585f 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Use '-FOO' 'BAR' instead of '-FOO=BAR' in tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90122 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
8a90ac0e85e8c5758b585fe486ee7db01c53fb98 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Normalize options to use '-FOO' instead of '--FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90071 91177308-0d34-0410-b5e6-96231b3b80d8
eature_tests.c
682899db9ac82d3ecc9a0a45f51f81704b935005 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Use '-x' 'foo' instead of '-x=foo'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90069 91177308-0d34-0410-b5e6-96231b3b80d8
xx_true.cpp
nit.c
a75a92dfffee2b34a43f1d0e9f8d1949feb190ad 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove unnecessary -fms-extensions=0 from tests (this command line syntax is going away).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90066 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
ine-directive.c
acro_paste_bcpl_comment.c
7674352cf3e8f699914a2f739f1ae8c8c3480813 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90054 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
3e945c8cd8519d0973f14088d938fbc8eee9dc3c 22-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define __SIG_ATOMIC_WIDTH__ for use in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89597 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
fdb4324286651ef03abb404ee8388edae13c8bfa 20-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Avoid unwanted expansion in macros that paste together INT<n>_C(v) and
UINT<n>_C(v) macros.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89461 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
a2e92846f114ae639e1b285b4ef5d763dd2596d4 20-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Avoid unwanted expansion in macros that paste together INT<n>_MIN, INT<n>_MAX,
and UINT<n>_MAX defintions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89460 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
aface1b7e0013b3054991c9d54c82d6c890ee554 20-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Avoid unwanted macro expansion in macros that paste together int<n>_t and
uint<n>_t definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89459 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
63e6561343b6bacf6509399a6d8fcce1c039d987 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define __WCHAR_WIDTH__ for use in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89353 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
bfec4b0274ba2b35da277feec495f2d1a6996baa 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Parameterize WINT_MIN and WINT_MAX with __WINT_WIDTH__ to support arbitrary
widths. This corrects the values of these definitions for MSP430 and PIC16.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89350 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
7635d2151d6045f8106bf947a8e536c1497a7c4e 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in
stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89348 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
7484e5d8e2f2d79750b712c749d6dbfd741b14d5 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add __SIZE_WIDTH__ to eventually replace __SIZE_TYPE__ in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89346 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
8241d73c6415a2f5ab4c041c5501a95d7ee32663 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Restore __INTMAX_TYPE__, __UINTMAX_TYPE__, __PTRDIFF_TYPE__, and
__INTPTR_TYPE__ as the last is used in the test/CodeGen/const-init.c and all
could potentially be in use in the wild. My apologies.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89345 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
cf2f71f91d6a619772a6fcba63684f28ca7bc72d 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Remove __PTRDIFF_TYPE__ as it is no longer needed by stdint.h. It has been
replaced with __PTRDIFF_WIDTH__.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89344 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
d00c75179c8c0b38e7bcd6365547ca5ba64bf491 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add __PTRDIFF_WIDTH__ macro to eventually replace __PTRDIFF_TYPE__ in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89342 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
ed116e95bc01f002918343d6003b573bd17e26a3 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Remove __INTPTR_TYPE__ as it is no longer needed by stdint.h, which uses
__INTPTR_WIDTH__ instead.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89340 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
08321b445af4fb2a2b348f132261d78c3ce8fea1 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define intptr_t and uintptr_t in terms of their equivalent exact-width types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89237 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
d896e1ad8634ba84f2f2b2e9e35257b3845fc40b 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Predefine __INTPTR_WIDTH__ for future use in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89231 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
eec59a7364cfb4ce409afb2074038dd315bbce96 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Remove the __INTMAX_TYPE__ and __UINTMAX_TYPE__ built-in macros as they are no
longer used by stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89230 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
832b710f597d7d02bcfc83f7c1c1726209f28c50 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define INTMAX_C and UINTMAX_C in terms of the corresponding exact-width
INTn_C and UINTn_C macros.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89226 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
db57ce577108104a0ecacda2f9a9da5609ebd9d8 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define INTMAX_MIN, INTMAX_MAX, and UINTMAX_MAX in terms of the limit macros for
their corresponding exact-width type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89224 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
36fac077b4912375f394ab666ab9ac37b5399dfa 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define intmax_t and uintmax_t as the [u]intN_t type corresponding to
__INTMAX_WIDTH__.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89221 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
186696bee3b3544d942bb43041595e210de577c6 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Predefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros in
stdint.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89203 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b0887562894b387d658893033ccb475f12b5ceec 17-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Replace (-INT8_C(128)), which uses an illegally out-of-range argument for
INT8_C, with (-INT8_C(127)-1) in the definition of INT8_MIN. Apply similar
changes to the definitions of INT16_MIN and INT24_MIN.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89120 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
81638410cf390d517b2e99e9abe4da1a39889206 17-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Use the INTn_C integer constant macros to generate limit constants with correct
suffixes. This corrects the suffixes for the limit constants of the 32-bit
types on MSP430 and PIC16, and the 64-bit types on PPC64, SystemZ, X86_64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89101 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
6ab25f482c6df53caf7a225028dc8bb7d12f0206 17-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Remove unnecessary parens around the bodies of integer constant macros. C99
requires that their arguments be decimal, hex, octal constants---no signs
allowed---making the parens unnecessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89095 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
23afaad895486d4a9ea672f497b63ebc4c588955 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't #include <stdio.h> when tests don't need it, or use clang instead of clang-cc when they do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89070 91177308-0d34-0410-b5e6-96231b3b80d8
eader_lookup1.c
bjc-pp.m
c5a97ec19408c3dca4b6a6385f11d8c783b94d0b 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89058 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
1f95e6567faab67f4363d650f73121359c4bdbab 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move char-is-signed defaulting to driver, instead of using
getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89053 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
eef22efce8dd9d0ba9adb8f4746b96b584f2521d 16-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Parameterize the constant-generating macros in stdint.h with new built-in
__INTn_C_SUFFIX__ macros that are defined for types with corresponding
constant suffixes (i.e. long and long long).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88914 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
dcdd2a064a6d3ea7712169629328ef80d6cb28ec 12-Nov-2009 Chris Lattner <sabre@nondot.org> Generalize stdint.h for non-8-bit-multiple types, patch by
Ken Dyck!

"This adds definitions for types of 8-bit multiples
from 8 to 64 to stdint.h and rationalizes the selection of types
for the exact-width definitions in InitPreprocessor.cpp."



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86977 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
9184646509d015ea66e796113a8c68598681374b 12-Nov-2009 Chris Lattner <sabre@nondot.org> do not store wchar/char16/char32/intmax width/alignment info
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86976 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
2475d76920b43014e661690836642ca3c9967179 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove RUN: true lines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86432 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
nit.c
ic.c
tdint.c
86_target_features.c
4fcfde4d5c8f25e40720972a5543d538a0dcb220 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-dependency.c
Pragma-physloc.c
ssembler-with-cpp.c
uiltin_line.c
omment_save_macro.c
xx_and.cpp
xx_bitand.cpp
xx_bitor.cpp
xx_compl.cpp
xx_not.cpp
xx_not_eq.cpp
xx_oper_keyword.cpp
xx_or.cpp
xx_true.cpp
xx_xor.cpp
ependencies-and-pp.c
ump-options.c
ump_macros.c
xpr_comma.c
xpr_invalid_tok.c
xpr_liveness.c
eature_tests.c
ash_line.c
f_warning.c
nclude-pth.c
nit.c
ine-directive.c
acro-multiline.c
acro_disable.c
acro_expand.c
acro_fn_comma_swallow.c
acro_fn_disable_expand.c
acro_fn_lparen_scan.c
acro_fn_preexpand.c
acro_fn_varargs_iso.c
acro_fn_varargs_named.c
acro_paste_c_block_comment.c
acro_paste_commaext.c
acro_paste_empty.c
acro_paste_hard.c
acro_rescan.c
acro_rescan2.c
ptimize.c
ic.c
ragma_unknown.c
rint_line_track.c
tdint.c
86_target_features.c
9099e7bcda3922cee0cffcdf21332ac4aa193cea 05-Nov-2009 Chris Lattner <sabre@nondot.org> clean up integer preprocessor type definitions, patch by Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86177 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
06dcf6b09257ac2382a969fc8c7b954adbc4a344 05-Nov-2009 Chris Lattner <sabre@nondot.org> A simple reordering of the definitions in stdint.h and
introduces no new function changes. Patch by Ken Dyck!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86062 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
e6113de52df132b89c3a5a6141f17d37e83322ae 03-Nov-2009 Chris Lattner <sabre@nondot.org> Implement support for the -undef command line option, patch by
Roman Divacky! PR5363


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85932 91177308-0d34-0410-b5e6-96231b3b80d8
acro_undef.c
9617a7867bbe64f404c5085e39f580282e63f23d 03-Nov-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Fixed for running on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85854 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
92bd8c70a6837b647a6c55964f8d0a50bf561dbc 02-Nov-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Added __has_include and __has_include_next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85834 91177308-0d34-0410-b5e6-96231b3b80d8
as_include.c
bceaf8614b2e161840dc4077861855dff151d948 29-Oct-2009 Chris Lattner <sabre@nondot.org> add two new and very exhaustive preprocessor tests, patch by
Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85482 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
b3eca29e2b1f11d2daa06feb23e006f69be759c7 27-Oct-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Disabling some MS extensions which cause these tests to fail

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85236 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
8121ecdff86ef11e977bf23e6add42f513c52b36 27-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> fix tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85223 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
utput_paste_avoid.c
9a4c1055fcf5b7d56a4549925a022089d086becb 27-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Typo in revision 85201.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85202 91177308-0d34-0410-b5e6-96231b3b80d8
omment_save_macro.c
9b0cffe19ea19e29e3d868e25605278b0a48638b 27-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Convert Preprocessor Clang tests to FileCheck in regards to PR5307.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85201 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
omment_save_macro.c
86fb835194f54ccecc33bfaf71f38b636993baab 27-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix a broken test in rev. 85199.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85200 91177308-0d34-0410-b5e6-96231b3b80d8
omment_save_macro.c
b396a37a235b4d11da3520bc981f07419d7fc31b 27-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Convert Preprocessor Clang tests to FileCheck in regards to PR5307.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85199 91177308-0d34-0410-b5e6-96231b3b80d8
99-6_10_3_4_p5.c
99-6_10_3_4_p6.c
99-6_10_3_4_p7.c
99-6_10_3_4_p9.c
omment_save.c
omment_save_macro.c
acro_paste_mscomment.c
acro_rescan_varargs.c
utput_paste_avoid.c
tringize_misc.c
848b9b6227e8319efabc9d65aa6ca58c24b85f8b 27-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Preprocessor tests are whitespace sensitive, as per Revision: 85170 review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85194 91177308-0d34-0410-b5e6-96231b3b80d8
99-6_10_3_3_p4.c
acro_disable3.c
acro_rparen_scan2.c
70881dfdd85394575cf95f9cf618742b46b6e1e7 26-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Convert a few tests to FileCheck for PR5307.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85170 91177308-0d34-0410-b5e6-96231b3b80d8
99-6_10_3_3_p4.c
acro_disable3.c
acro_rparen_scan2.c
79162ce8caaf6d1f66666cdd52f677de812af47a 22-Oct-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Disable Microsoft extensions to fix failure on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84893 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bcpl_comment.c
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
fe9dcb345fa8347cea55142c0295b797fddeb30f 01-Sep-2009 Daniel Dunbar <daniel@zuster.org> Force triple for this test (non-fragile ABI is default on x86_64-apple-darwin9).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80645 91177308-0d34-0410-b5e6-96231b3b80d8
on_fragile_feature1.m
cbf30b78bdbcc6755f9c624435a00a72a83892d7 31-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Added test cases for presence and absence of __has_feature(objc_nonfragile_abi) with and without -fobjc-nonfragile-abi.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80593 91177308-0d34-0410-b5e6-96231b3b80d8
on_fragile_feature.m
on_fragile_feature1.m
025f80dfc21a24b910f2b8442a16796ce5de8379 25-Jul-2009 Daniel Dunbar <daniel@zuster.org> MultiTestRunner: Validate '&&' at the end of RUN lines.
- This is just to normalize, these will go away soon hopefully.

Added all the missing '&&'s that have crept in. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77062 91177308-0d34-0410-b5e6-96231b3b80d8
acro-multiline.c
acro_fn_comma_swallow.c
acro_paste_mscomment.c
04ae2df026b275aae5dddfc0db5ca55ff4e62179 12-Jul-2009 Chris Lattner <sabre@nondot.org> add push/pop semantics for diagnostics. Patch by Louis Gerbarg!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75431 91177308-0d34-0410-b5e6-96231b3b80d8
ushable-diagnostics.c
6896a371e302c63ce3d4a99ad2c32e42dde6a9e4 15-Jun-2009 Chris Lattner <sabre@nondot.org> Fix #pragma GCC system_header by making it insert a virtual linemarker into
the file at the point of the pragma. This allows clang to know that all
sourcelocations after the pragma are in a system header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73376 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_sysheader.c
ragma_sysheader.h
a81aae2cb8bc839deea6d4a6e676e10c16c4f643 15-Jun-2009 Chris Lattner <sabre@nondot.org> rename test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73375 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-dependency2.c
Pragma-syshdr2.c
ea9ff8d4952a7c903d49eb3374be2d31518b8a1c 15-Jun-2009 Chris Lattner <sabre@nondot.org> convert this test to -verify mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73374 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-syshdr2.c
3ee211fd15dfeeb51bb69681084cdfcea427f314 15-Jun-2009 Chris Lattner <sabre@nondot.org> Fix PR2741 by making our newline tracking be aware of newlines that
can occur in the middle of comment tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73365 91177308-0d34-0410-b5e6-96231b3b80d8
rint_line_count.c
1b63e4f732dbc73d90abf886b4d21f8e3a165f6d 14-Jun-2009 Chris Lattner <sabre@nondot.org> Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
eature_tests.c
148772a841cae6f32db16d890e788b92a763bb3f 13-Jun-2009 Chris Lattner <sabre@nondot.org> implement and document a new __has_feature and __has_builtin magic
builtin preprocessor macro. This appears to work with two caveats:
1) builtins are registered in -E mode, and 2) target-specific builtins
are unconditionally registered even if they aren't supported by the
target (e.g. SSE4 builtin when only SSE1 is enabled).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73289 91177308-0d34-0410-b5e6-96231b3b80d8
eature_tests.c
3e753e279d2457cf16b45be88032c4a117f9adb3 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4288: Make -dD (dump macros with preprocessed source) play nicely with
# line directives.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72724 91177308-0d34-0410-b5e6-96231b3b80d8
ump-macros-spacing.c
2a1c363f38e59a5044fc349aa7e538a50954c244 01-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4283: Don't truncate multibyte character constants in the
preprocessor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72686 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_multichar.c
8c0d8a2cc4844ebed87842821930a0ebd3dc8924 28-May-2009 Chris Lattner <sabre@nondot.org> update test for r72519


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72520 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
cfcceab862141b7cc3df42ced5f421d76e536a36 28-May-2009 Eli Friedman <eli.friedman@gmail.com> Make the bad paste diagnostic print the entire pasted token.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72497 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
3240469102eca90fa5123ec9636fa0364df3034c 25-May-2009 Chris Lattner <sabre@nondot.org> Fix a couple of bugs:
1. When we accept "#garbage" in asm-with-cpp mode, change the token kind
of the # to unknown so that the preprocessor won't try to process it as
a real #. This fixes a crash on the attached example
2. Fix macro definition extents processing to handle #foo at the end of a
macro to say the definition ends with the foo, not the #.

This is a follow-on fix to r72283, and rdar://6916026


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72388 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
c5b7e8d1c0ebbdbb3e6c81616498b9acc612e157 25-May-2009 Chris Lattner <sabre@nondot.org> fix this test to fail when the patch isn't applied.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72385 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
4c3ba6c1944e6a4758f1b3a0aec8a7ff4c561051 24-May-2009 Eli Friedman <eli.friedman@gmail.com> Make sure an invalid concatentaion doesn't insert whitespace before
the RHS. Fixes assembler-with-cpp issue reported on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72370 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
c25d8058958d9cda0d9d6216b475180ba2f7c71d 22-May-2009 Daniel Dunbar <daniel@zuster.org> In assembler-with-cpp mode, don't error on '#' (stringize) operator applied to
non-argument names, pass the tokens through.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72283 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
3265a42e5a87269fce5d7a7cdd7bafe62c7becfe 16-May-2009 Eli Friedman <eli.friedman@gmail.com> PR3942: Don't warn on unsigned overflow in preprocessor expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71960 91177308-0d34-0410-b5e6-96231b3b80d8
verflow.c
766703b76dc1eb0c49d11cafc2a17c7407876ebc 13-May-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6880630 - # in _Pragma does not start a preprocessor directive.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71643 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma.c
6fd34f9a26fcb9657966b77bd39614033f3fd881 13-May-2009 Chris Lattner <sabre@nondot.org> convert test to use -verify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71642 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma.c
0a1a0ec541a7dbc885ac703dc856969d9bf1e593 13-May-2009 Chris Lattner <sabre@nondot.org> rename test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71641 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-syshdr.c
Pragma.c
9fc9e77c2fd15a88bd19ff3fdc9eb9716742f720 13-May-2009 Chris Lattner <sabre@nondot.org> When we expect two arguments but have zero, make sure to add
two empty arguments. Also, add an assert so that this bug
manifests as an assertion failure, not a valgrind problem.

This fixes rdar://6880648 - [cpp] crash in ArgNeedsPreexpansion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71616 91177308-0d34-0410-b5e6-96231b3b80d8
acro_expand.c
3ac79049abf396487546e8807e8763403f444a07 06-May-2009 Daniel Dunbar <daniel@zuster.org> Handle -march for the LLVM recognized cpu names.
- x86 target feature handling should not be feature complete, even if
the code quality is lacking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71123 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
17ca3638e852ba81f389e9f896ed0420b52ae606 06-May-2009 Daniel Dunbar <daniel@zuster.org> More x86 target feature support.
- Apologies for the extremely gross code duplication, I want to get
this working and then decide how to get this information out of the
back end.

- This replaces -m[no-]sse4[12] by -m[no-]sse4, it appears gcc
doesn't distinguish them?

- -msse, etc. now properly disable/enable related features.

- Don't always define __SSE3__...

- The main missing functionality bit here is that we don't initialize
the features based on the CPU for all -march options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71117 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
686a21bf859f955ff8d3d179da64b7a23c0fed44 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix the testcase for PR4132.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70796 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_spacing2.c
d9b856fddd07b48388307127687a634235271849 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4132: make sure to insert whitespace consistently before a
pasted token.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70793 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_spacing2.c
e5393fb93eb879d9ebbef102ae9311fa77e023cc 03-May-2009 Daniel Dunbar <daniel@zuster.org> PR4063, with feeling: Chain PP callbacks by default.
- This is somewhat cleaner and also fixes PR4063 for real, I had the
order wrong so we were just creating an empty dependency file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70687 91177308-0d34-0410-b5e6-96231b3b80d8
epencies-and-pp.c
ependencies-and-pp.c
0a70c64b090ea8b34db1b2764a46f9c364193a7a 03-May-2009 Daniel Dunbar <daniel@zuster.org> PR4063: Fix dependency generation with -E.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70686 91177308-0d34-0410-b5e6-96231b3b80d8
epencies-and-pp.c
eb32fde032a250091134db56a3aeaea6b09f6594 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Simplify the scheme used for keywords, and change the classification
scheme to be more useful.

The new scheme introduces a set of categories that should be more
readable, and also reflects what we want to consider as an extension
more accurately. Specifically, it makes the "what is a keyword"
determination accurately reflect whether the keyword is a GNU or
Microsoft extension.

I also introduced separate flags for keyword aliases; this is useful
because the classification of the aliases is mostly unrelated to the
classification of the original keyword.

This patch treats anything that's in the implementation
namespace (prefixed with "__", or "_X" where "X" is any upper-case
letter) as a keyword without marking it as an extension. This is
consistent with the standards in that an implementation is allowed to define
arbitrary extensions in the implementation namespace without violating
the standard. This gets rid of all the nasty "extension used" warnings
for stuff like __attribute__ in -pedantic mode. We still warn for
extensions outside of the the implementation namespace, like typeof.
If someone wants to implement -Wextensions or something like that, we
could add additional information to the keyword table.

This also removes processing for the unused "Boolean" language option;
such an extension isn't supported on any other C implementation, so I
don't see any point to adding it.

The changes to test/CodeGen/inline.c are required because previously, we
weren't actually disabling the "inline" keyword in -std=c89 mode.

I'll remove Boolean and NoExtensions from LangOptions in a follow-up
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70281 91177308-0d34-0410-b5e6-96231b3b80d8
xtension-warning.c
d0359af5113c1936ff3f699c7d700adff59351f2 27-Apr-2009 Chris Lattner <sabre@nondot.org> Change our silencing of C typedef redefinition handling to what we had
before r69391: typedef redefinition is an error by default, but if
*either* the old or new definition are from a system header, we silence
it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70177 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
04ad9b278c27319e873e9f6ccf991f68f5fcc8a3 27-Apr-2009 Chris Lattner <sabre@nondot.org> make -Wtypedef-redefinition an extwarn instead of defaulting
to error, doing this breaks too many programs (e.g. Adium).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70170 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
a864cf7c1d774a0f790bfc46befc87d9dbf1f65c 24-Apr-2009 Chris Lattner <sabre@nondot.org> fix rdar://6816766 - Crash with function-like macro test at end of directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69964 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
e1614bb01cc429658b414a9e00603c66ae96d8f5 22-Apr-2009 Chris Lattner <sabre@nondot.org> apply Eli's patch to fix PR4008, with a testcase. Thanks Eli!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69750 91177308-0d34-0410-b5e6-96231b3b80d8
utput_paste_avoid.c
97e2de171de555feb1ef422e71874082a67498c9 20-Apr-2009 Chris Lattner <sabre@nondot.org> fix the second half of PR4006 and rdar://6807000 by treating
() as being either zero arguments or one empty argument depending
on situation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69627 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
5b912d9832606a040bb3b56a66301863a6548338 20-Apr-2009 Chris Lattner <sabre@nondot.org> Fix PR4007: clang doesn't know -Werror-foo is the same as -Werror=foo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69557 91177308-0d34-0410-b5e6-96231b3b80d8
f_warning.c
4d8aac3778b40c161bed9964125948ee01c08821 19-Apr-2009 Chris Lattner <sabre@nondot.org> Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't
support it. I don't know what evaluation method we use for complex
arithmetic, so I don't know whether/if we should warn about use of
CX_LIMITED_RANGE.

This concludes my planned hacking on STDC pragmas, flame away :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69556 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
6c5cf4a2e234923ab66127de0874a71cb6bfdd83 19-Apr-2009 Chris Lattner <sabre@nondot.org> diagnose invalid syntax of STDC pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69554 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
f545be5552b6fd40a4c766fbf82dab0ab5305790 19-Apr-2009 Chris Lattner <sabre@nondot.org> reject invalid stuff in the STDC namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69551 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
062f23246510393c19b537b68ec88b6a08ee8996 19-Apr-2009 Chris Lattner <sabre@nondot.org> stub out STDC #pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69550 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
af7cdf45da4925f788e87a4c318ee67404646088 19-Apr-2009 Chris Lattner <sabre@nondot.org> basic support for -Wunknown-pragmas, more coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69547 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
332ee08e2fe78fde281e0868ec039b546cb6e0f4 19-Apr-2009 Chris Lattner <sabre@nondot.org> move token paste poisoning diagnostics to after the instantiation loc
for a token is set, this makes the diagnostic "expanded from stack" work
for this diagnostic. Add a testcase for PR3918.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69544 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
6efcef58f3d201c6a1c1a28ca71c066f6af45583 19-Apr-2009 Chris Lattner <sabre@nondot.org> pick a smaller header, one that we control to test this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69540 91177308-0d34-0410-b5e6-96231b3b80d8
bjc-pp.m
7b6dbc66f918ece79b85ff39643551baf46c1502 19-Apr-2009 Chris Lattner <sabre@nondot.org> rename test for consistency with other pragma test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69539 91177308-0d34-0410-b5e6-96231b3b80d8
oison.c
ragma_poison.c
bf6044561cd167569be534142ee8fd393db88414 19-Apr-2009 Chris Lattner <sabre@nondot.org> merge pragma poison tests into one file with -verify mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69538 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-poison.c
acro_paste_bad.c
oison.c
oison_expansion.c
db56df6e5ed0353767f8d3911b2c8648d75c8a55 19-Apr-2009 Chris Lattner <sabre@nondot.org> merge two tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69537 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
aste_bad.c
b5e9cb4631877f60824447e1aff4fd2fa17f6d2c 19-Apr-2009 Chris Lattner <sabre@nondot.org> convert to -verify mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69532 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
8fde5978a63bcce5c294a93b2a5dd424d7628971 19-Apr-2009 Chris Lattner <sabre@nondot.org> Fix PR4006, incorrect handling of __VA_ARGS__ when it was the first token
in a function-like macro body. This has the added bonus of moving some
function-like macro specific code out of the object-like macro codepath.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69530 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
f5db8f82d5e3b1be3540775329ccd95449fe8721 19-Apr-2009 Chris Lattner <sabre@nondot.org> fix rdar://6804322 by wiring up -fdollars-in-identifiers
with assembler-with-cpp mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69520 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
c39c3d47962083061daaae26e572d9c14d143487 19-Apr-2009 Chris Lattner <sabre@nondot.org> convert to -verify mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69518 91177308-0d34-0410-b5e6-96231b3b80d8
aste_bad.c
dff070fb0f2880806ef1ae5471ace37a97dd9e6a 19-Apr-2009 Chris Lattner <sabre@nondot.org> Fix PR3917: the location of a #line directive is the location of the first _.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69485 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
dc8c90da158030c0d0c62539e2da0adccc09f271 18-Apr-2009 Chris Lattner <sabre@nondot.org> more fun with line markers: the digit string is required to be interpreted
as decimal, even if it starts with 0. Also, since things like 0x1 are
completely illegal, don't even bother using numericliteralparser for them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69454 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
5c497a80c60061ba5bc3d8bd1518c15b7d7556dd 18-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR3927 by being more careful about the pp test for identifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69423 91177308-0d34-0410-b5e6-96231b3b80d8
acro_expand.c
bc81682756a2406e1788b14c576b3c8b515d97a3 18-Apr-2009 Chris Lattner <sabre@nondot.org> second half of PR3940: #line requires simple digit sequence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69422 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
d92fa477d54e42c1f0cf9a785b53659a638b8eeb 18-Apr-2009 Chris Lattner <sabre@nondot.org> this is really just a recommendation, not a requirement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69416 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
6272bcfe5dc148d293ccce9db19df9e71c991cde 18-Apr-2009 Chris Lattner <sabre@nondot.org> enforce requirements imposed by C90 6.8 TC1, fixing PR3919.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69415 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
8fe00e783eda289c28a25eea452fd4d467963a82 18-Apr-2009 Chris Lattner <sabre@nondot.org> Fix PR3938 by taking into account C99 6.10p4.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69413 91177308-0d34-0410-b5e6-96231b3b80d8
f_warning.c
ae7cbf1a0fa652217f2fb5ed2c3a173f55b49958 18-Apr-2009 Chris Lattner <sabre@nondot.org> convert test to -verify style.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69412 91177308-0d34-0410-b5e6-96231b3b80d8
f_warning.c
0a4f1b9550b81b1391d79c0dd5a416951f4df9a6 18-Apr-2009 Chris Lattner <sabre@nondot.org> Substantially restructure function-like macro argument parsing.
Highlights: PP::isNextPPTokenLParen() no longer eats the (
when present. We now simplify slightly the logic parsing
macro arguments. We now handle PR3937 and other related cases
correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69411 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
9cb51ce03caf0755759f7e67aea7d4be684ff738 18-Apr-2009 Chris Lattner <sabre@nondot.org> Fix two problems from PR3916, and one problem I noticed while hacking
on the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69404 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive2.c
58e91d57510a5ce4fd424fe7fd1cdfa86701ef35 18-Apr-2009 Chris Lattner <sabre@nondot.org> implement PR3940: #line numbers not fully checked


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69403 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
ab82f41b217ce588a9456c0b4411f219d3ed0df8 18-Apr-2009 Chris Lattner <sabre@nondot.org> #line is allowed to have macros that expand to nothing after them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69401 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
32b06752d05630996b43c543c80796e1e16dadde 18-Apr-2009 Chris Lattner <sabre@nondot.org> tweak redefinition of a typedef a bit to fix a couple of problems:
1. We had logic in sema to decide whether or not to emit the error
based on manually checking whether in a system header file.
2. we were allowing redefinitions of typedefs in class scope in C++
if in header file.
3. there was no way to force typedef redefinitions to be accepted
by the C compiler, which annoys me when stripping linemarkers out
of .i files.

The fix is to split the C++ class typedef redefinition path from the
C path, and change the C path to be a warning that normally maps to
error. This causes it to properly be ignored in system headers,
etc. and gives us a way to control it. Passing
-Wtypedef-redefinition now turns the error into a warning.

One behavior change is that we now diagnose cases where you redefine
a typedef in your .c file that was defined in a header file. This
seems like reasonable behavior, and the diagnostic now indicates that
it can be controlled with -Wtypedef-redefinition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69391 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
d82df3ad430397d7f9ef511e7c5157f997c41f53 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement support for GCC's -dD mode, which dumps -E output *and*
macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68884 91177308-0d34-0410-b5e6-96231b3b80d8
ump-options.c
4fa37accaea4b1f2cf675c28375d7dd3500c715c 10-Apr-2009 Chris Lattner <sabre@nondot.org> use doug's new %S thing to make this work when run from different locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68788 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive3.c
nclude-macros.c
748dd20b55f64bc7e398a3f2210136581531fc7a 09-Apr-2009 Daniel Dunbar <daniel@zuster.org> Force triple for these tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68651 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
fd10511b3e686c5b045f8324b0632f3624d9ef05 08-Apr-2009 Chris Lattner <sabre@nondot.org> finish the implementation of -imacros. The driver still needs to be hooked up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68640 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-macros.c
3bbc75302fd43cf13d868b46c94ff8794b302e43 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> More fixes to builtin preprocessor defines.
- Add -static-define option driver can use when __STATIC__ should be
defined (instead of __DYNAMIC__).

- Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.

- Set __NO_INLINE__ following GCC 4.2.

- Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.

- Set __EXCEPTIONS for Objective-C NonFragile ABI.

- Set __STRICT_ANSI__ for standard conforming modes.

- I added a clang style test case in utils for this, but its not
particularly portable and I don't think it belongs in the test
suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68621 91177308-0d34-0410-b5e6-96231b3b80d8
ptimize.c
9fd0b1f845a61e71dd8099f596532d34c519630a 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set __PIC__ (more) correctly.
- Add -pic-level clang-cc option to specify the value for the define,
updated driver to pass this.

- Added __pic__

- Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68584 91177308-0d34-0410-b5e6-96231b3b80d8
ic.c
ef88e58360db75cc61cf4468cb0464cc5230210e 07-Apr-2009 Anders Carlsson <andersca@mac.com> Fix broken test case. I have no idea why this ever worked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68526 91177308-0d34-0410-b5e6-96231b3b80d8
ptimize.c
82fc0cb7883747942326d6d6ca1333b27bd647f0 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Use %s in test, not hard coded name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68521 91177308-0d34-0410-b5e6-96231b3b80d8
ptimize.c
0b51415dcf72e42a047612e2dcfe656d3c4442ce 07-Apr-2009 Chris Lattner <sabre@nondot.org> implement rdar://6762183. I'm not sure if it is more insane that
GCC ignores macro definitions after \n's or that real code depends
on this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68511 91177308-0d34-0410-b5e6-96231b3b80d8
acro-multiline.c
4ca076fffdfa72ebfab364c8de091b89fc291ae6 06-Apr-2009 Anders Carlsson <andersca@mac.com> Define __OPTIMIZE__ and __OPTIMIZE_SIZE__ if the -O[12] and -Os flags are passed to the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68450 91177308-0d34-0410-b5e6-96231b3b80d8
ptimize.c
0b5b0da1580a5e4aca7605d31abf3c066838670c 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Pull clang-cc code for generating PTH files based on the input type.
- <rdar://problem/6741594> [pth] don't abuse -x to drive pth
generation

- Simpler, and fixes PR3915.

Cleanup test cases for PTH:
- Update to use -emit-pth

- Removed PTH test of carbon.c and cocoa.mm; these didn't actually
verify anything, and since PTH is token based the extra coverage
(over cocoa.m) isn't particularly helpful.

- Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase
available parallelism when running tests.

Ted, could you update the PTH test cases (include-pth.c and
cocoa-pth.m) to have some sort of positive check that the PTH is
getting used? "# of PTH cache hits" or "tokens read from PTH cache"
statistics would work great. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68189 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-pth.c
4fcb4cd6556cd783b2a8cd2b7266ae4696e605bb 25-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3880, fixing a comma swallowing bug handling macros that only take
... arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67706 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_comma_swallow.c
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-dependency.c
Pragma-location.c
Pragma-physloc.c
Pragma-poison.c
Pragma-syshdr.c
Pragma-syshdr2.c
ssembler-with-cpp.c
uiltin_line.c
99-6_10_3_3_p4.c
99-6_10_3_4_p5.c
99-6_10_3_4_p6.c
99-6_10_3_4_p7.c
99-6_10_3_4_p9.c
lang_headers.c
omment_save.c
omment_save_if.c
omment_save_macro.c
xx_and.cpp
xx_bitand.cpp
xx_bitor.cpp
xx_compl.cpp
xx_not.cpp
xx_not_eq.cpp
xx_oper_keyword.cpp
xx_oper_spelling.cpp
xx_or.cpp
xx_true.cpp
xx_xor.cpp
isabled-cond-diags.c
ump_macros.c
umptokens_phyloc.c
xpr_comma.c
xpr_invalid_tok.c
xpr_liveness.c
xpr_usual_conversions.c
xtension-warning.c
unction_macro_file.c
ash_line.c
ash_space.c
eader_lookup1.c
f_warning.c
fdef-recover.c
mport_self.c
nclude-directive1.c
nclude-directive2.c
nclude-directive3.c
nclude-pth.c
ndent_macro.c
ine-directive.c
acro_arg_keyword.c
acro_disable.c
acro_disable2.c
acro_disable3.c
acro_disable4.c
acro_expand.c
acro_expandloc.c
acro_expandloc2.c
acro_fn_comma_swallow.c
acro_fn_disable_expand.c
acro_fn_lparen_scan.c
acro_fn_lparen_scan2.c
acro_fn_placemarker.c
acro_fn_preexpand.c
acro_fn_varargs_iso.c
acro_fn_varargs_named.c
acro_misc.c
acro_not_define.c
acro_paste_bad.c
acro_paste_bcpl_comment.c
acro_paste_c_block_comment.c
acro_paste_commaext.c
acro_paste_empty.c
acro_paste_hard.c
acro_paste_hashhash.c
acro_paste_mscomment.c
acro_paste_none.c
acro_paste_simple.c
acro_paste_spacing.c
acro_rescan.c
acro_rescan2.c
acro_rescan_varargs.c
acro_rparen_scan.c
acro_rparen_scan2.c
acro_space.c
i_opt.c
bjc-pp.m
utput_paste_avoid.c
aste_bad.c
oison.c
oison_expansion.c
r2086.c
ragma_microsoft.c
ragma_unknown.c
rint_line_track.c
kipping_unclean.c
tringize_misc.c
tringize_space.c
tringize_space2.c
ndef-error.c
nterminated.c
f1538de18370c202263d7d1bc326cbc2c5434e1d 23-Mar-2009 Chris Lattner <sabre@nondot.org> The individual pieces of an invalid paste as still candidates for expansion.
This matters in assembler mode, where this is silently allowed.
This fixes rdar://6709206.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67539 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
01c499db507eb8318c2bb377581aefe5e91ee670 21-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix include-pth.c test case to (hopefully) more resilient to where and how tests
are executed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67419 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-pth.c
600cfab4743c9a842c50453ca4e873e2aa8fbf1f 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Add test case for '-include-pth'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67386 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-pth.c
e966d9ae3e2d0b021e6290f91fb90b28cf736d84 20-Mar-2009 Chris Lattner <sabre@nondot.org> add tests for the various .S bugs I fixed on wednesday.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67381 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
15154b40d405948f6cae7834a6145b243ea5f0b3 20-Mar-2009 Chris Lattner <sabre@nondot.org> rename this test from .S to .c so that it gets run.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67380 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.S
ssembler-with-cpp.c
688a248e03f31312161db97e5e11a950b5b1369c 09-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3764 - A redefinition of a pre-processor macro fails

Redefinition checking should ignore the leading whitespace and
start of line flags on the first token of an expansion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66442 91177308-0d34-0410-b5e6-96231b3b80d8
acro_misc.c
c3c489e64219b132c23110d6ba8d0d4e121bc5f8 09-Mar-2009 Chris Lattner <sabre@nondot.org> convert this to use -verify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66441 91177308-0d34-0410-b5e6-96231b3b80d8
acro_misc.c
5a7a8489195fd376afb7a024f171b7907d3904b4 09-Mar-2009 Chris Lattner <sabre@nondot.org> rename test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66440 91177308-0d34-0410-b5e6-96231b3b80d8
acro_defined.c
acro_misc.c
b627c8d683c4d3facd774c432b1fdc2d35819369 06-Mar-2009 Chris Lattner <sabre@nondot.org> #import is not considered an extension for ObjC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66246 91177308-0d34-0410-b5e6-96231b3b80d8
bjc-pp.m
c8fbd44eb02d2f3ca6810fe16632096f475c654a 15-Feb-2009 Chris Lattner <sabre@nondot.org> fix PR3579: __LINE__ expands to the presumed location of the
*end* of a macro instantiation, not the start of it. This is
really all about bug-for-bug compatibility with GCC, but not
doing this breaks the FreeBSD kernel.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64603 91177308-0d34-0410-b5e6-96231b3b80d8
uiltin_line.c
e7fb48466afcbf2c4ccdfa658824282fdc3c512c 15-Feb-2009 Chris Lattner <sabre@nondot.org> track "just a little more" location information for macro instantiations.
Now instead of just tracking the expansion history, also track the full
range of the macro that got replaced. For object-like macros, this doesn't
change anything. For _Pragma and function-like macros, this means we track
the locations of the ')'.

This is required for PR3579 because apparently GCC uses the line of the ')'
of a function-like macro as the location to expand __LINE__ to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64601 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-dependency.c
3855b9a8f05d3f6aba14dcd9aff3147eb8ff57bd 13-Feb-2009 Mike Stump <mrs@apple.com> Fix limits.h for linux, as glibc does a #include_next unless
_GCC_LIMITS_H_ is defined, when __GNUC__ is defined.

Also, we need to stay away from possible conflicts with header guards.
We should use CLANG_ to prefix all header guards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64408 91177308-0d34-0410-b5e6-96231b3b80d8
lang_headers.c
f73903a1ded46748e1dfda151f5d037b7b3d31f9 06-Feb-2009 Chris Lattner <sabre@nondot.org> Add an implementation of -dM that follows GCC closely enough to permit
diffing the output of:
clang -dM -o - -E -x c foo.c | sort


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63926 91177308-0d34-0410-b5e6-96231b3b80d8
ump_macros.c
c8f2d9a831aa40730b83395c3107af540050c94e 04-Feb-2009 Chris Lattner <sabre@nondot.org> smaller header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63766 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive2.c
be5c64d7a765acaf9454e7a511233771472bf811 04-Feb-2009 Chris Lattner <sabre@nondot.org> Fix PR3464 by searching for headers from the predefines
buffer as if the #include happened from the main file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63764 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive1.c
nclude-directive3.c
d62ef1a951d586241e86f300d3321b3f04c2275c 04-Feb-2009 Chris Lattner <sabre@nondot.org> Ok, we need a system header for this test to pass in the clang/test directory as well as from the pp directory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63763 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive2.c
cd22f81f539606c9185704cd16146343dc0388a0 04-Feb-2009 Chris Lattner <sabre@nondot.org> fix test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63762 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive1.c
df23f2b38cd1dd55cbafb66e7b6268d64488046d 04-Feb-2009 Chris Lattner <sabre@nondot.org> rename again


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63761 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive1.c
nclude.c
72650adf04c2d08a47a4cbfdac4258b391c1e786 04-Feb-2009 Chris Lattner <sabre@nondot.org> rename some tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63759 91177308-0d34-0410-b5e6-96231b3b80d8
nclude-directive2.c
nclude.c
ncludeexpand.c
ncludeexpand2.c
4da9f9cbb94269f55cef697f18c5a7f14bc542d4 04-Feb-2009 Chris Lattner <sabre@nondot.org> include smaller header for test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63758 91177308-0d34-0410-b5e6-96231b3b80d8
ncludeexpand2.c
137b6a6149c53dbbcb8fba98e524d9ad0f3c8736 04-Feb-2009 Chris Lattner <sabre@nondot.org> Implement handling of file entry/exit notifications from GNU
line markers, including maintenance of the virtual include stack.

For something like this:

# 42 "bar.c" 1
# 142 "bar2.c" 1

#warning zappa
# 92 "bar.c" 2
#warning gonzo
# 102 "foo.c" 2
#warning bonkta


we now produce these three warnings:

#1:
In file included from foo.c:3:
In file included from bar.c:42:
bar2.c:143:2: warning: #warning zappa
#warning zappa
^

#2:
In file included from foo.c:3:
bar.c:92:2: warning: #warning gonzo
#warning gonzo
^

#3:
foo.c:102:2: warning: #warning bonkta
#warning bonkta
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63722 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
bd16209c76e122d50b23af7f65067670946953d8 04-Feb-2009 Chris Lattner <sabre@nondot.org> # 42 doesn't change system header state either, add test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63721 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
6b3066780bda02e3117d71a18ca2f430ed1454af 04-Feb-2009 Chris Lattner <sabre@nondot.org> make getFileCharacteristic linetable aware. line markers that
play around with the 'is system header' bit now function correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63720 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
953b4b0950cb074156d66b45e8dab26725d4bccb 04-Feb-2009 Chris Lattner <sabre@nondot.org> Add simple #line directive test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63713 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
4c9a1669eee930865fc24bf1e2d36d441dabeba5 30-Jan-2009 Chris Lattner <sabre@nondot.org> add testcase for PR3437 and r63405


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63407 91177308-0d34-0410-b5e6-96231b3b80d8
rint_line_track.c
b9c3f966b103f7cfe8e5e60007c4c8b38f7298eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63098 91177308-0d34-0410-b5e6-96231b3b80d8
umptokens_phyloc.c
202fd2c4fb8d98ea9990df9bc157b11bc26ac2fa 27-Jan-2009 Chris Lattner <sabre@nondot.org> Fix a bug that I noticed by inspection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63094 91177308-0d34-0410-b5e6-96231b3b80d8
kipping_unclean.c
478a18ec47fdb7e0e580a2635648456e9db9ad4f 26-Jan-2009 Chris Lattner <sabre@nondot.org> add parsing and constraint enforcement for GNU line marker directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63003 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
8e60a29e25c9418522a072c7b959485f3c7bb2ec 26-Jan-2009 Chris Lattner <sabre@nondot.org> add another sanity test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63001 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
359cc4475487ea0a660b3e8918334a2866e71c66 26-Jan-2009 Chris Lattner <sabre@nondot.org> parse and enforce required constraints on #line directives. Right now
we just discard them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62999 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
4d2d04e9fb136e5f9530f4aa298f31e4c40c5ada 18-Jan-2009 Chris Lattner <sabre@nondot.org> fix rdar://6505352 - Bogus warning with -WUndef, a case
Anders noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62472 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_liveness.c
c7d945d053f122eba704ef14c518db2ae595c562 16-Jan-2009 Chris Lattner <sabre@nondot.org> Make -E mode propagate #pragma comment's into the output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62339 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
636c5ef6572e899d36cec1b0023fb28ba65189e1 16-Jan-2009 Chris Lattner <sabre@nondot.org> Implement basic support for parsing #pragma comment, a microsoft extension
documented here:
http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx

This is according to my understanding reading the docs, I don't know if it
really agrees fully with what VC++ allows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62317 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
df7c17a8d02fe09a3466786bae3e40fc3252687a 16-Jan-2009 Chris Lattner <sabre@nondot.org> Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309 91177308-0d34-0410-b5e6-96231b3b80d8
umptokens_phyloc.c
5bea06ad9e1e73937870e070197cb48e0c2eea87 01-Dec-2008 Daniel Dunbar <daniel@zuster.org> Add test case for __ASSEMBLER__ definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60363 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.S
46fb6dc98f6ace13fdfed665a155fb146ee45466 21-Nov-2008 Chris Lattner <sabre@nondot.org> testcase for PR3096


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59794 91177308-0d34-0410-b5e6-96231b3b80d8
nterminated.c
e4d378815364255b002b4295162c290598fc899c 18-Nov-2008 Torok Edwin <edwintorok@gmail.com> remove this testcase, it fails with -verify still


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59539 91177308-0d34-0410-b5e6-96231b3b80d8
iag_crash.c
8dccec4495da2fb7f2e58a409d56b1a2c19ab939 18-Nov-2008 Nuno Lopes <nunoplopes@sapo.pt> fix test. it now crashes, but thats another problem..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59537 91177308-0d34-0410-b5e6-96231b3b80d8
iag_crash.c
0301c74568441f28a5a9514a246b2adfb49191b7 18-Nov-2008 Torok Edwin <edwintorok@gmail.com> add testcase for PR3093


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59534 91177308-0d34-0410-b5e6-96231b3b80d8
iag_crash.c
1a19c29965efa21dedbddce8246d185017a51b89 27-Oct-2008 Mike Stump <mrs@apple.com> Skip random pathname characters better. I had a 5 in mine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58291 91177308-0d34-0410-b5e6-96231b3b80d8
umptokens_phyloc.c
c106c106c6bdf1f37b85f41525ba6958a9498cb0 12-Oct-2008 Chris Lattner <sabre@nondot.org> Add a new -dump-raw-tokens option, which allows us to see raw tokens.
Rename -dumptokens to -dump-tokens.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57405 91177308-0d34-0410-b5e6-96231b3b80d8
umptokens_phyloc.c
7499cb59f0fc9cc3a60105aeaa3adc0ae2f180a0 04-Oct-2008 Chris Lattner <sabre@nondot.org> switch to using -verify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57068 91177308-0d34-0410-b5e6-96231b3b80d8
ndef-error.c
22e6dd79ecdf71eb9f9d6ca1172013fc07ecfa3c 26-Sep-2008 Chris Lattner <sabre@nondot.org> testcase for my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56670 91177308-0d34-0410-b5e6-96231b3b80d8
eader_lookup1.c
b4eaf9cf5f79c86a3f7564f4dfdea57f165ca45c 02-Sep-2008 Steve Naroff <snaroff@apple.com> - Implement __block.
- Replace FIXME in Preprocessor::HandleIdentifier() with a check that avoids diagnosing extension tokens that originate from macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55639 91177308-0d34-0410-b5e6-96231b3b80d8
xtension-warning.c
dfb99a968b3cebe4ca5dd7941f228678f2cb3566 22-Aug-2008 Nico Weber <nicolasweber@gmx.de> make test fails if llvm is checked out to llvm-svn of if there is a dash somewhere else in the path. fix that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55175 91177308-0d34-0410-b5e6-96231b3b80d8
umptokens_phyloc.c
9039a69ab9b44f9e5431c050c22f01164b85fcfa 20-Jul-2008 Nuno Lopes <nunoplopes@sapo.pt> fix test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53802 91177308-0d34-0410-b5e6-96231b3b80d8
umptokens_phyloc.c
24af60f52868329a31fe50643a9a7a4ad61cf6c7 19-Jul-2008 Ted Kremenek <kremenek@apple.com> Patch by Kovarththanan Rajaratnam:

"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53797 91177308-0d34-0410-b5e6-96231b3b80d8
umptokens_phyloc.c
c577a0e9bf5812719d08c002a57b263681938aea 12-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Multiple tests in a single test file must be linked with '&&'.
Otherwise, failing tests other than the last one will not be reported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52231 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_comma.c
xpr_invalid_tok.c
acro_fn_varargs_named.c
acro_paste_commaext.c
utput_paste_avoid.c
rint_line_track.c
63bc0358706e63faf705803c4799e073b91a63f0 08-May-2008 Chris Lattner <sabre@nondot.org> The awesome GNU "comma elision extension" works with both the standard
__VA_ARGS__ syntax as well as with the amazingly awesome GNU "named
variadic macro" extension. Allow it with the GNU syntax as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50843 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_varargs_named.c
98ed49f3709f48d6abe1bc8deb418d0af89b8014 05-May-2008 Chris Lattner <sabre@nondot.org> Fix a few more bugs in preprocessor expressions w.r.t. ?:. Now I
think it is really right. :) This fixes PR2284.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50665 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_invalid_tok.c
xpr_liveness.c
9e66ba6d1c1c0e11b261e3b20ff02b999621021a 05-May-2008 Chris Lattner <sabre@nondot.org> fix a bug handling right associative operators that Neil noticed, hopefully
the final part of PR2279


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50635 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_liveness.c
9189156429c06eea3f75cb01646e2afd78000f39 04-May-2008 Chris Lattner <sabre@nondot.org> Fix the rest of PR2279:
a) correct rejection of ',' in pp expressions.
b) the precedence of ',' was wrong w.r.t. ?:.

Thanks again to Neil for finding these and providing testcases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50625 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_comma.c
d5214b22cccbc30ac2e07c44ef91e498f2046652 04-May-2008 Chris Lattner <sabre@nondot.org> Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil
for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50624 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_usual_conversions.c
3b6911527a78875ff4846259da1db6fb802fcbf5 04-May-2008 Chris Lattner <sabre@nondot.org> fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50617 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_liveness.c
d98d975ccdce7ec442ac26f682404cb71df40ff8 13-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2220, making diagnostics for unexpected tokens in pp expressions
more nice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49619 91177308-0d34-0410-b5e6-96231b3b80d8
xpr_invalid_tok.c
21fbe0d9eaf7feac7b7593a3917a8b555eaec714 22-Mar-2008 Chris Lattner <sabre@nondot.org> fix this test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48668 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_mscomment.c
49d8dc55bf7b177bbb994b51833e2aee85e36d91 21-Mar-2008 Sam Bishop <sam@bishop.dhs.org> Only invoke the preprocessor; it's the only thing being tested. Also, check
the output to make sure that the macros and comments are being treated as such.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48638 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_mscomment.c
d8b28d78d63569a7cc4c0aed498ab2bb51310be5 21-Mar-2008 Sam Bishop <sam@bishop.dhs.org> Use the -E option when invoking clang. Only the preprocessor is
required to perform this test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48636 91177308-0d34-0410-b5e6-96231b3b80d8
fdef-recover.c
ncludeexpand.c
2a625bcfa2603031f3495ec0891decb53f96f564 06-Mar-2008 Chris Lattner <sabre@nondot.org> remove two obsolete tests, not sure why my previous commit didn't commit the removal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47986 91177308-0d34-0410-b5e6-96231b3b80d8
efine_other_target.c
efine_target.c
0184cc719f06d2c5da6ae0725847ef875c6128cd 25-Feb-2008 Lauro Ramos Venancio <lauro.venancio@gmail.com> Fix PR2086.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47551 91177308-0d34-0410-b5e6-96231b3b80d8
r2086.c
r2086.h
e9ba32357c380f587fc1296992822e1b47fbd22d 16-Feb-2008 Chris Lattner <sabre@nondot.org> Fix CheckEndOfDirective to diagnose lines that contain macros that expand to
zero tokens. This fixes PR2045, thanks to Neil for finding another
incredibly subtle corner case :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47203 91177308-0d34-0410-b5e6-96231b3b80d8
ndef-error.c
3f1cc838f9caf469990f23fccd0940263c0c61ff 07-Feb-2008 Chris Lattner <sabre@nondot.org> Implement support for the extremely atrocious MS /##/ extension,
which pastes together a comment. This is only enabled with
-fms-extensions of course.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46845 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_mscomment.c
71a3a8d50643c450823d3fbcf3307a3d7db1a265 29-Jan-2008 Chris Lattner <sabre@nondot.org> Fix a bug where we would incorrectly emit a "cannot paste" error
message when handling the GNU ", ## __VA_ARGS__" extension. While
I'm at it, flag uses of this as extensions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46503 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_commaext.c
116a4b148ec9ad3f3a60044c7fb03f28dc620b7b 23-Jan-2008 Chris Lattner <sabre@nondot.org> add support for -Wundef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46274 91177308-0d34-0410-b5e6-96231b3b80d8
f_warning.c
c21d9e4766a6200dc4b2aaba3590b49114d19acd 22-Jan-2008 Chris Lattner <sabre@nondot.org> Fix PR1936, a crash on malformed #if. Thanks to Neil for
noticing this!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46256 91177308-0d34-0410-b5e6-96231b3b80d8
fdef-recover.c
b1a17ae9d339e59b81509e593907f2f924231dab 15-Jan-2008 Chris Lattner <sabre@nondot.org> avoid pasting L + "foo" into L"foo".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46000 91177308-0d34-0410-b5e6-96231b3b80d8
utput_paste_avoid.c
4d730461735cc5cb8ecbd2f6106da9ec234064ad 07-Jan-2008 Chris Lattner <sabre@nondot.org> Fix a nasty corner case that Neil noticed in PR1900, where we would
incorrectly apply the multiple include optimization to files with
guards like:

#if !defined(x) MACRO

where MACRO could expand to different things in different contexts.
Thanks Neil!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45716 91177308-0d34-0410-b5e6-96231b3b80d8
i_opt.c
i_opt.h
4c88d3a71f4c0e1a68a9c9d0f82c92184f5bd18f 12-Dec-2007 Chris Lattner <sabre@nondot.org> add run line


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44917 91177308-0d34-0410-b5e6-96231b3b80d8
acro_rparen_scan2.c
5113613c5bc7b9d442639c725de3b6e71c952dfb 12-Dec-2007 Chris Lattner <sabre@nondot.org> add runline, make this test real.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44916 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_simple.c
5f1803210b24b79c1a20f88aa8b0c62191e9d1cb 09-Dec-2007 Chris Lattner <sabre@nondot.org> The flags on tokens indicate whether they are the start of a *physical* line,
not the start of a logical line. Be careful about this distinction, which
affects when newlines are printed and when paste-avoidance happens, etc.
This fixes PR1848, thanks to Neil for noticing this!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44743 91177308-0d34-0410-b5e6-96231b3b80d8
rint_line_track.c
0c3eb29e79e439a0d73e81e57cc130ddb45d50ea 23-Nov-2007 Chris Lattner <sabre@nondot.org> Fix PR1820, an incredibly subtle macro expansion bug that Neil discovered.

Neil, please review this fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44285 91177308-0d34-0410-b5e6-96231b3b80d8
acro_disable4.c
b283298f03d2b512204d14ca687f9de263eeff0f 15-Nov-2007 Chris Lattner <sabre@nondot.org> fix a bug Steve noticed, where a #import of the main file itself would fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44178 91177308-0d34-0410-b5e6-96231b3b80d8
mport_self.c
f37bb25120f2b9532443aaee03b7a909eb27af9a 24-Sep-2007 Chris Lattner <sabre@nondot.org> If we see an invalid #ifdef directive, enter a conditional compilation region
so that we don't emit an error on the #endif. Suggestion by Neil.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42258 91177308-0d34-0410-b5e6-96231b3b80d8
fdef-recover.c
706ab50019c0a4ae135a64861a7066927585471b 23-Jul-2007 Chris Lattner <sabre@nondot.org> implement a missing feature in the #include handler, where
it did not handle <xyz> headers coming from macro expansions.
This requires special treatment, as the include name is lexed
as multiple tokens, which require reassembly before processing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40418 91177308-0d34-0410-b5e6-96231b3b80d8
ncludeexpand2.c
2b64fdc4993795af86fd79f02085268e7be0dc4d 19-Jul-2007 Chris Lattner <sabre@nondot.org> Fix a stringizing bug that Neil noticed. We should preprocess this:
#define t(x) #x
t(a
c)

to "a c", not "ac".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40060 91177308-0d34-0410-b5e6-96231b3b80d8
tringize_space2.c
0ea793e5e37a7b2283ef0c64676ffc7201b1b417 19-Jul-2007 Chris Lattner <sabre@nondot.org> Correctly respect C99 5.1.1.2p4 when searching for the first '(' of
a function-like macro invocation. Patch contributed by Neil Booth.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40026 91177308-0d34-0410-b5e6-96231b3b80d8
unction_macro_file.c
unction_macro_file.h
5f016e2cb5d11daeb237544de1c5d59f20fe1a6e 11-Jul-2007 Reid Spencer <rspencer@reidspencer.com> Stage two of getting CFE top correct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-dependency.c
Pragma-location.c
Pragma-physloc.c
Pragma-poison.c
Pragma-syshdr.c
Pragma-syshdr2.c
uiltin_line.c
99-6_10_3_3_p4.c
99-6_10_3_4_p5.c
99-6_10_3_4_p6.c
99-6_10_3_4_p7.c
99-6_10_3_4_p9.c
omment_save.c
omment_save_if.c
omment_save_macro.c
xx_and.cpp
xx_bitand.cpp
xx_bitor.cpp
xx_compl.cpp
xx_not.cpp
xx_not_eq.cpp
xx_oper_keyword.cpp
xx_oper_spelling.cpp
xx_or.cpp
xx_true.cpp
xx_xor.cpp
efine_other_target.c
efine_target.c
isabled-cond-diags.c
xpr_liveness.c
xpr_usual_conversions.c
ile_to_include.h
ash_line.c
ash_space.c
ncludeexpand.c
ndent_macro.c
acro_arg_keyword.c
acro_defined.c
acro_disable.c
acro_disable2.c
acro_disable3.c
acro_expand.c
acro_expandloc.c
acro_expandloc2.c
acro_fn_comma_swallow.c
acro_fn_disable_expand.c
acro_fn_lparen_scan.c
acro_fn_lparen_scan2.c
acro_fn_placemarker.c
acro_fn_preexpand.c
acro_fn_varargs_iso.c
acro_fn_varargs_named.c
acro_not_define.c
acro_paste_bad.c
acro_paste_bcpl_comment.c
acro_paste_c_block_comment.c
acro_paste_empty.c
acro_paste_hard.c
acro_paste_hashhash.c
acro_paste_none.c
acro_paste_simple.c
acro_paste_spacing.c
acro_rescan.c
acro_rescan2.c
acro_rescan_varargs.c
acro_rparen_scan.c
acro_rparen_scan2.c
acro_space.c
utput_paste_avoid.c
aste_bad.c
oison.c
oison_expansion.c
ragma_unknown.c
tringize_misc.c
tringize_space.c