• 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 >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
arch64-target-features.c
rm-acle-6.4.c
rm-target-features.c
xx_oper_keyword.cpp
xx_oper_keyword_ms_compat.cpp
nit.c
acho-embedded-predefines.c
redefined-macros.c
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
arch64-target-features.c
xx_oper_keyword.cpp
xx_oper_keyword_ms_compat.cpp
fdef-recover.c
gnore-pragmas.c
nit.c
acro-multiline.c
acro-multiline.c.ignoreme
acro_redefined.c
redefined-arch-macros.c
cn-pp-identifier.c
oa-defaults.c
oa-wchar_t.c
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
nputs/headermap-rel/Foo.framework/Headers/Foo.h
nputs/headermap-rel/foo.hmap
nputs/headermap-rel2/Product/someheader.h
nputs/headermap-rel2/project-headers.hmap
nputs/headermap-rel2/system/usr/include/someheader.h
nputs/microsoft-header-search/a/b/include3.h
nputs/microsoft-header-search/a/findme.h
nputs/microsoft-header-search/a/include2.h
nputs/microsoft-header-search/falsepos.h
nputs/microsoft-header-search/findme.h
nputs/microsoft-header-search/include1.h
arch64-target-features.c
rm-target-features.c
as_attribute.c
eader_lookup1.c
eadermap-rel.c
eadermap-rel2.c
nit.c
acho-embedded-predefines.c
acro_arg_empty.c
acro_expand_empty.c
acro_paste_commaext.c
acro_paste_spacing.c
acro_space.c
icrosoft-header-search.c
rint-pragma-microsoft.c
cn-allowed-chars.c
86_target_features.c
769187a95a608f5aafdf438a67f335324a7b155e 19-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Clean up predefined macros for AArch64 to follow ACLE 2.0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195068 91177308-0d34-0410-b5e6-96231b3b80d8
arch64-target-features.c
c7120cf0547640de21ec92a1fe77fba557c42d92 14-Nov-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Add tests for MIPS/MIPS64 type defines and type limits macros. No
functional changes - just reflection of the current state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194690 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
1816219b01c744b2500a917348fc5df4447d6849 12-Nov-2013 Robert Lytton <robert@xmos.com> XCore target Type defines.

Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType
to follow the XMOS llvm-gcc front end's settings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194461 91177308-0d34-0410-b5e6-96231b3b80d8
tdint.c
9b79630004fe0a748e0328a19de25840b37d4aa1 11-Nov-2013 Tim Northover <tnorthover@apple.com> Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194408 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
8daa7fe574fcc6b4f64c35516a8cce53c3d044b4 11-Nov-2013 Joerg Sonnenberger <joerg@bec.de> NetBSD 6.99.26 switched to default rounding mode, so adjust
__FLT_EVAL_METHOD__ accordingly. Add test case for this and the SSE2
variances on NetBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194377 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b7b44c88e8863786c837c88d99396f93719cf361 05-Nov-2013 Alp Toker <alp@nuanti.com> Make test run reliably

llc waits for input on stdin, which was not provided in this test. It
was running only thanks to a quirk in the way lit concatenates
commands.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194071 91177308-0d34-0410-b5e6-96231b3b80d8
withprefix.c
a72009d27cfd80657dfc701d98a6f74c5378cfd4 05-Nov-2013 David Majnemer <david.majnemer@gmail.com> Simplify test case added in r194059


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194061 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
974cbc5e43c4aeb9bf4a6bb7ed2718a20a910437 05-Nov-2013 David Majnemer <david.majnemer@gmail.com> Lex: Require that '#' be followed by a macro parameter name when preceded by '##'

After lexing a '##', we would look ahead and check to see if it was
followed by '__VA_ARGS__'. After doing so, we would then go ahead and
lex the token.

However we would fail in the case where the '##' was followed by a '#'
followed by an identifier because we would have lexed the '#' separately
from the identifier, bypassing our parameter validation logic.

Instead, lex the tokens coming after the '##' later.

This fixes PR17804.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194059 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_bad.c
a2420960fded369f2ff4127ba0389be4d0e6c0c9 04-Nov-2013 Benjamin Kramer <benny.kra@googlemail.com> Driver: Add support for -march=bdver3 on x86.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193985 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
909f35a884045c658e5c4565499f113ee63dfc1d 29-Oct-2013 Bernard Ogden <bogden@arm.com> ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang

Allow users to disable or enable CRC subtarget feature.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193600 91177308-0d34-0410-b5e6-96231b3b80d8
rm-target-features.c
f779e65390ad331ff5ea68de40b0281f607b397c 24-Oct-2013 Bernard Ogden <bogden@arm.com> Add driver support for FP, SIMD and crypto defaults.

Although we wire up a bit for v8fp for macro setting
purposes, we don't set a macro yet. Need to ask list
about that.

Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193367 91177308-0d34-0410-b5e6-96231b3b80d8
rm-target-features.c
c6c9cf4b186edd8afa8503c58562d445df127ea6 21-Oct-2013 Silviu Baranga <silviu.baranga@arm.com> Set the default hardware division features for ARM cpus. Also set it as default for A32 armv8.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193075 91177308-0d34-0410-b5e6-96231b3b80d8
rm-target-features.c
1db2e279114348d276e2dea03b8d6175743505e7 21-Oct-2013 Silviu Baranga <silviu.baranga@arm.com> Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193074 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
fbfd6426e256f8be081260609d8fa88ae94ffe14 21-Oct-2013 Justin Bogner <mail@justinbogner.com> Lex: Don't restrict legal UCNs when preprocessing assembly

The C and C++ standards disallow using universal character names to
refer to some characters, such as basic ascii and control characters,
so we reject these sequences in the lexer. However, when the
preprocessor isn't being used on C or C++, it doesn't make sense to
apply these restrictions.

Notably, accepting these characters avoids issues with unicode escapes
when GHC uses the compiler as a preprocessor on haskell sources.

Fixes rdar://problem/14742289

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193067 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
ddb2ad21d2c059b82e2ddbbb5eb8b325944b9970 18-Oct-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Define __mips_fpr and _MIPS_FPSET macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192969 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
165432092b7a329d51c32365067237bfdb71267f 16-Oct-2013 Eric Christopher <echristo@gmail.com> Add preprocessor support for powerpc vsx.

The test should be expanded upon for more powerpc checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192849 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
d37df39addfa12978833a5abd7ca0d409dc2d384 16-Oct-2013 Eric Christopher <echristo@gmail.com> Remove an old, seemingly out of date, comment.

The referenced script no longer seems to exist.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192848 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
15dbacc7cb0e01256345d85efdf1d43eec71b9f9 16-Oct-2013 Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> Enabling 3DNow! prefetch instruction support for a few AMD processors in the
clang front end. This change will allow the __PRFCHW__ macro to be set on these
processors and hence include prfchwintrin.h in x86intrin.h header. Support for
the intrinsic itself seems to have already been added in r178041.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192829 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
86_target_features.c
af9454635939bf070733d95d72284494dda6791d 05-Oct-2013 Nick Lewycky <nicholas@mxc.ca> Add support for -mcx16, and predefine __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 when
it is enabled. Also enable it on the same architectures that GCC does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192045 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
72c26c0d47eb850db18b784403260bce0632c478 02-Oct-2013 Reid Kleckner <reid@kleckner.net> Accept #pragma warning(push, 0) without warning

This partially addresses PR17435, but it doesn't actually implement the
pragma. If we implement it, we should map levels 1-4 to something like
-Wall and level 0 to something like -w.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191833 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
ragma_microsoft.cpp
8712ded79d0e80e6a4158682f78626637ad90a7a 01-Oct-2013 Weiming Zhao <weimingz@codeaurora.org> Fix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARM



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191707 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-macros.c
5ada7a5e9747e03e8c3725b1b4d00e2a9f448e9e 29-Sep-2013 Ed Schouten <ed@80386.nl> Add character set related __STDC_* definitions.

Clang uses UTF-16 and UTF-32 for its char16_t's and char32_t's
exclusively. This means that we can define __STDC_UTF_16__ and
__STDC_UTF_32__ unconditionally.

While there, define __STDC_MB_MIGHT_NEQ_WC__ for FreeBSD. FreeBSD's
wchar_t's don't encode characters as ISO-10646; the encoding depends on
the locale used. Because the character set used might not be a superset
of ASCII, we must define __STDC_MB_MIGHT_NEQ_WC__.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191631 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
48b80c78b02efd7c4a7e3a7530d05b8aa9d3b649 25-Sep-2013 Reid Kleckner <reid@kleckner.net> PR17359: Fix off-by-one OOB on _Pragma("") and an unescaping bug

Previously the code would reduce a run of backslashes to a single
backslash, and now it will properly leave behind every other backslash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191382 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma.c
a8f7d9dd926d61c92dbe194e9b6f51a9c015cea5 24-Sep-2013 Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> Adding -mtbm and -mno-tbm command line options to the clang front end for the
x86 TBM instruction set. Also adding a __TBM__ macro if the TBM feature is
enabled. Otherwise there should be no functionality change to existing features.

Phabricator code review is located here: http://llvm-reviews.chandlerc.com/D1693



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191326 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
86_target_features.c
fc12c4aa20876bdf91bff98dc50eb68b4dd04b80 24-Sep-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and pass
this option to the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191282 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b83f5a77335ca8a5b41ba4e17aa8d4bb6248c1e4 19-Sep-2013 Ben Langmuir <ben.langmuir@intel.com> Add C intrinsics for Intel SHA Extensions

Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is
enabled. SHA implies SSE2, which is needed for the __m128i type.

Also add the -msha/-mno-sha option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190999 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
d2f9308220af22bfc1bcd3bc2cad118dbd8be013 19-Sep-2013 Eli Friedman <eli.friedman@gmail.com> Make Preprocessor::Lex non-recursive.

Before this patch, Lex() would recurse whenever the current lexer changed (e.g.
upon entry into a macro). This patch turns the recursion into a loop: the
various lex routines now don't return a token when the current lexer changes,
and at the top level Preprocessor::Lex() now loops until it finds a token.
Normally, the recursion wouldn't end up being very deep, but the recursion depth
can explode in edge cases like a bunch of consecutive macros which expand to
nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this
patch).

<rdar://problem/14569770>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190980 91177308-0d34-0410-b5e6-96231b3b80d8
ash_line.c
acro_expand_empty.c
a6cbc2701237c89a8d6fd9897066ebca798664dc 19-Sep-2013 Craig Topper <craig.topper@gmail.com> Disabling sse2 should disable aes and pclmul support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190977 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
520ec1e553ffa955276462e4230c1b128fa433af 18-Sep-2013 Joey Gouly <joey.gouly@arm.com> [ARMv8] Add builtins for CRC instructions.

Patch by Bradley Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190931 91177308-0d34-0410-b5e6-96231b3b80d8
rm-target-features.c
414a1bdbdaf250e0488589f12865c8961831b65d 18-Sep-2013 Hal Finkel <hfinkel@anl.gov> Add the intrinsic __builtin_convertvector

LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190915 91177308-0d34-0410-b5e6-96231b3b80d8
eature_tests.c
84f007b17399ef90f234ef0cef6e3f2495a12f10 16-Sep-2013 Craig Topper <craig.topper@gmail.com> Make F16C feature imply AVX. Matches GCC behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190776 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
2ee042dee9f7693665e28463955401905474a284 14-Sep-2013 Reid Kleckner <reid@kleckner.net> Lex and ignore Microsoft's #pragma warning(...)

Summary:
This fixes PR17145 and avoids unknown pragma warnings.

This change does not attempt to map MSVC warning numbers to clang
warning flags. Perhaps in the future we will implement a mapping for
some common subset of Microsoft warnings, but for now we don't.

Reviewers: rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190726 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
ragma_microsoft.cpp
56bed97d750b5a67707f266cc06e641ac5222612 11-Sep-2013 Craig Topper <craig.topper@gmail.com> Fix a bug where -msse followed by -mno-sse would leave MMX enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190496 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
89a5e796bedcfbf6afd03654e75b9f7aa0a0b4f4 10-Sep-2013 Craig Topper <craig.topper@gmail.com> Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.

Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled.
Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190387 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
906db27c335a65f568711f0d2d61da39c47ec77f 06-Sep-2013 Sylvestre Ledru <sylvestre@debian.org> Follow up on commit r190159. Also test the KFreeBSD i686 platform defines + minor cosmetics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190162 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
bd4614292b5f04e73c92b6786e6d9da14b1a3914 06-Sep-2013 Sylvestre Ledru <sylvestre@debian.org> Add a test for the KFreeBSD define (#define __FreeBSD_kernel__ 1). This was introduced in commit r190048

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190159 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
a3f55b026fc24db6a4e275a8e4110d071122b99d 04-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't pass -O0 to clang_cc1, it is the default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189910 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
ptimize.c
b98ce37c69b42569d15848978dac24106f842e14 30-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> Add support for -march=slm, aka Intel Atom Silvermont.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189670 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
3432b7800d447267f4353e70a319f6f5a0bb4aab 29-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Properly escape filenames in line directives.

Fixes PR17018. Only partial test coverage because I don't want
to try to write a test which generates a file whose name contains a newline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189557 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive-output.c
a601579fa0c87b742797c1249e39cb54ec83083f 28-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Fix "//" comments with -traditional-cpp in C++.

Apparently, gcc's -traditional-cpp behaves slightly differently in C++ mode;
specifically, it discards "//" comments. Match gcc's behavior.

<rdar://problem/14808126>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189515 91177308-0d34-0410-b5e6-96231b3b80d8
raditional-cpp.c
62c90e188931e01fc5b08eae8b25de43ed3a1a7c 28-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Handle -D arguments ending in a backslash.

We translate these into #define directives; to preserve gcc-compatible
semantics (where the expanded macro includes the backslash), we add
an extra "\\\n" to the end of the synthesized "#define".

<rdar://problem/14810220>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189511 91177308-0d34-0410-b5e6-96231b3b80d8
acro_backslash.c
3613c004749f8976452e1ed2138d4aeb123b35db 22-Aug-2013 Craig Topper <craig.topper@gmail.com> Add test cases for avx512 feature flags. Fix typo in avx512pf options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188984 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
24146975f1af8c1b4b14e8545f218129d0e7dfeb 22-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Split isFromMainFile into two functions.

Basically, isInMainFile considers line markers, and isWrittenInMainFile
doesn't. Distinguishing between the two is useful when dealing with
files which are preprocessed files or rewritten with -frewrite-includes
(so we don't, for example, print useless warnings).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188968 91177308-0d34-0410-b5e6-96231b3b80d8
arn-macro-unused.c
29f26de50897f88eeee343c70b10fb33122f4c74 21-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't disable SSE4A when disabling AVX.

Thanks for Craig Topper for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188902 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
bca2c4fab5c67a9121c96f15fb5caf09c25cf8f6 21-Aug-2013 Craig Topper <craig.topper@gmail.com> Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188867 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
c84ed54f9786638c228fdc9b4db9920fa676d48d 20-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Centralize the logic for handling -m* options and fix pr16943.

This moves the logic for handling -mfoo -mno-foo from the driver to -cc1. It
also changes -cc1 to apply the options in order, fixing pr16943.

The handling of -mno-mmx -msse is now an explicit special case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188817 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
6839120247f994c57260246375bc21b6dc20ac6b 20-Aug-2013 Craig Topper <craig.topper@gmail.com> Rename __AVX512__ to __AVX512F__

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188764 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
10c2c68e5610a58f3dbd2daed303b21e15a83720 20-Aug-2013 Craig Topper <craig.topper@gmail.com> Add AVX-512 feature flag and knl cpu to clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188758 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
ed218d05aa3d429208b0eb2204707c75b87d2fee 20-Aug-2013 Craig Topper <craig.topper@gmail.com> Revert r188756 because some other changes snuck in with it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188757 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
dab7845798d673cabeef792451354aeb394cdd54 20-Aug-2013 Craig Topper <craig.topper@gmail.com> Add AVX-512 feature flag and knl cpu to clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188756 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
5f15f4daf0e225ea8463fe2ef522c009c95ffc9c 13-Aug-2013 Robert Lytton <robert@xmos.com> Add XCore target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188258 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
c613b67f4f3e5d11d6af6426fd9b8b6a197d2b6b 12-Aug-2013 Jack Carter <jack.carter@imgtec.com> [Mips] MSA frontend option support

This patch adds -mmsa and -mno-msa to the options supported by
clang to enable and disable support for MSA.

When MSA is enabled, a predefined macro '__mips_msa' is defined to 1.

Patch by Daniel Sanders


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188184 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b793f0d3448a15277cd6b6cc4ba558ded39a8084 01-Aug-2013 Tim Northover <tnorthover@apple.com> AArch64: initial NEON support

Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187568 91177308-0d34-0410-b5e6-96231b3b80d8
arch64-target-features.c
ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f 26-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> [PowerPC] Support powerpc64le as a syntax-checking target.

This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The new test case variant ensures that correct built-in defines for
little-endian code are generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187180 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
1675c5031fccc69b838973f1c53719716cecc7c7 24-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Add not to a command that is expected to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187065 91177308-0d34-0410-b5e6-96231b3b80d8
acro_with_initializer_list.cpp
679efe14c65492c74eaa6dc98671abcdbfac8da8 23-Jul-2013 Richard Trieu <rtrieu@google.com> Changed "an macro" to "a macro" in diagnostic note.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186988 91177308-0d34-0410-b5e6-96231b3b80d8
acro_with_initializer_list.cpp
5940bf33061844c9a61d4d5c1230df9cf9e90342 23-Jul-2013 Richard Trieu <rtrieu@google.com> Add new diagnostic messages when too many arguments are presented to a
function-like macro. Clang will attempt to correct the arguments by detecting
braced initializer lists:

1) If possible, suggest parentheses around arguments
containing braced lists which will give the proper number of arguments.
2) If a braced list is detected at the start of a macro argument, it cannot be
corrected by parentheses. Instead, just point out the location of these
braced lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186971 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
acro_with_initializer_list.cpp
bd89fdcbe6ad28d5052ec7295d4afefeaf4a4135 09-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't give # and ## special treatment when in -traditional-cpp mode. Patch by
Austin Seipp!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185896 91177308-0d34-0410-b5e6-96231b3b80d8
raditional-cpp.c
899022b14bc3bde19a949fb042711864ca3a629b 09-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Generalize hack allowing 'const' in __has_attribute (etc) to allow any token
with identifier info. This covers most identifier-like entities (other than
the ISO646 keywords).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185895 91177308-0d34-0410-b5e6-96231b3b80d8
as_attribute.c
96e7813f08c6adf1d8657b0da86741b54e850fd7 04-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 'not' to commands that are expected to fail.

This is at least good documentation, but also opens the possibility of
using pipefail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
fdef-recover.c
ine-directive.c
acro_paste_bcpl_comment.c
acro_paste_msextensions.c
redefined-arch-macros.c
cn-pp-identifier.c
eb66e37a85e2a78c000563ac0a669badabad1cd1 04-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert test to FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185645 91177308-0d34-0410-b5e6-96231b3b80d8
86_target_features.c
b2f6f4764e4d7da70b9ed99aa5bbb346018feedc 03-Jul-2013 Roman Divacky <rdivacky@freebsd.org> Dont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.
It's not the case on ie. FreeBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185572 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
18a295d96d66c2d99b089882366966e460ed5072 01-Jul-2013 Anton Korobeynikov <asl@math.spbu.ru> Fix MSP430 builtin types.

Patch by Job Noorman!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185362 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
11be06464a338b7c6e007898a7709498dc456db2 26-Jun-2013 Reid Kleckner <reid@kleckner.net> Match MSVC's handling of commas during macro argument expansion

This allows clang to parse the type_traits header in Visual Studio 2012,
which is included widely in practice.

This is a rework of r163022 by João Matos. The original patch broke
preprocessing of gtest headers, which this patch addresses.

Patch by Will Wilson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184968 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoft-ext.c
c6fa1153f882c01decb676ca1208705ae2e2508a 25-Jun-2013 Chandler Carruth <chandlerc@gmail.com> Fix a couple of PPC predefined macros that I spotted while driving by
this code. These aren't technically standard predefines for the platform
but apparantly lots of folks use them as they show up within LLVM's own
codebase. ;] This may even fix some self host issues w/ the JIT!!!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184830 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
e4664a9d41ed29446b2e64c031c52091057e3e05 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Accept both / and \\ to fix the windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184790 91177308-0d34-0410-b5e6-96231b3b80d8
withprefix.c
995544ef901f70589025c278e112547966a1df09 18-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Make sure the assembler-with-cpp hack for "#" works with multiple "#"s in
succession. Fixes PR16363.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184240 91177308-0d34-0410-b5e6-96231b3b80d8
ssembler-with-cpp.c
a7ff62f9443efa3b13a28a1e566d4625b15b8553 04-Jun-2013 Aaron Ballman <aaron@aaronballman.com> Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183178 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
461f2d820ffb628ebdf6ef4a4474a43f8ff914e5 25-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Preprocessor] Prevent expansion of y in x ## y when x is empty

When x is empty, x ## is suppressed, and when y gets expanded, the fact that it follows ## is not
available in the macro expansion result. The macro definition can be checked instead, the ## will
be available there regardless of what x expands to.

Fixes http://llvm.org/PR12767

Patch by Harald van Dijk!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182699 91177308-0d34-0410-b5e6-96231b3b80d8
acro_paste_empty.c
5ac8c4f449e291d5a1a34777e58f4218794f4646 19-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> OpenBSD/sparc64 uses long long for int64_t and intmax_t.

Other operating systems, including FreeBSD and NetBSD, use long.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182215 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b5afadd210609294c9c8ec6a9456b1cf53eff690 16-May-2013 David Fang <fang@csl.cornell.edu> fix PR 15726: ptrdiff_t should be int on PowerPC Darwin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182029 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
fcec0c991edbb011a1eeb85d8de836502f799aed 15-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Use correct types for SPARC v9.

It's an LP64 platform.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181867 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
7f0ffb3a9f4ce7428fd4f6eb3c3274c867c134f8 07-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y: Update __cplusplus to temporary value 201305L to allow detection of provisional C++1y support.
Add __has_feature and __has_extension checks for C++1y features (based on the provisional names from
the C++ features study group), and update documentation to match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181342 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b8409215523e5478b8b0aa9cdcd10038cf7651fe 06-May-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> Add SystemZ support

This patch then adds all the usual platform-specific pieces for SystemZ:
driver support, basic target info, register names and constraints,
ABI info and vararg support. It also adds new tests to verify pre-defined
macros and inline asm, and updates a test for the minimum alignment change.

This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!

Patch by Richard Sandiford.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181211 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
tdint.c
63063f5dd7e6cee865f513d3c3f283fc20de18d0 03-May-2013 Benjamin Kramer <benny.kra@googlemail.com> Add support for -march=btver2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181006 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
c814c64c6f7e7a26f4af0d040ad04b69917a36c8 02-May-2013 Hans Wennborg <hans@hanshq.net> Make sure we define wchar_t related macros correctly in -fms-extensions mode.

This adds a test to make sure we define _WCHAR_T_DEFINED and
_NATIVE_WCHAR_T_DEFINED correctly in the preprocessor, and updates
stddef.h to set it when typedeffing wchar_t.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180918 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
a26e0ce81db03730cd1e74afd259a024a8579a4d 29-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [test] add missing header for the test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180719 91177308-0d34-0410-b5e6-96231b3b80d8
p-modules.h
56f6e09562568437e852eba192c17869beba1d49 29-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> When emitting a preprocessed file with implicit module imports, make sure line directives are emitted in the next line.

rdar://13722737

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180718 91177308-0d34-0410-b5e6-96231b3b80d8
p-modules.c
142b35e25b579e2a883d6ca37c3c1121f562f242 17-Apr-2013 Jordan Rose <jordan_rose@apple.com> Fix off-by-one error in #pragma clang system_header.

The system_header pragma (from GCC) is implemented using line notes in the
source manager. However, a line note's line number specifies the number
not for the current line, but for the next line. This was making all
line numbers appear off by one after the pragma.

Reported by Andy Gibbs, uncovered during r179677.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179709 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_sysheader.c
85192c7fe187d5486e12dbc6960af28f16a558a0 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Parser support for #pragma clang __debug captured

This patch implements parsing ‘#pragma clang __debug’ as a first step for
implementing captured statements. Captured statements are a mechanism for
doing outlining in the AST.
see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.

Currently returns StmtEmpty

Author: Andy Zhang <andy.zhang@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179614 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-captured.c
321ae79aae228aa069795e78449a95fa35e2abfd 14-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Support -mmicromips / -mno-micromips command line options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179489 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
d96e315fb82950e105188055151d665c03e781ed 14-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Follow-up to r179481. Consider "single-float" as a separate
independent of float ABI feature in the MipsTargetInfoBase class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179486 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
a8262981683c4768f43e8b8bc507ab77fff0b216 11-Apr-2013 Reid Kleckner <reid@kleckner.net> Fix failing dependencies-and-pp.c test

The bots seem to do more line wrapping because they have longer absolute
paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179284 91177308-0d34-0410-b5e6-96231b3b80d8
ependencies-and-pp.c
292285e64339105bbbb8b0061d6dc0fffdc1d965 11-Apr-2013 Reid Kleckner <reid@kleckner.net> FileCheck-ify more grep tests with quoted double quotes

This required some tedious reordering to match clang's order.
Presumably these ObjC tests were generated based on llvm-gcc's output
ordering.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179282 91177308-0d34-0410-b5e6-96231b3b80d8
ependencies-and-pp.c
2c5a38e3bc347de64f694671bbb1097bd6544456 10-Apr-2013 Reid Kleckner <reid@kleckner.net> FileCheck-ify some clang grep tests that use double quotes

The escaping interaction between Python and grep doesn't work on my
system. This change fixes the tests for me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179214 91177308-0d34-0410-b5e6-96231b3b80d8
xx_oper_spelling.cpp
15aa81a4746697311f71f5802ce27c7dc98b2ff3 10-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [frontend] When preprocessing, turn implicit module imports into @imports.

part of rdar://13610250

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179144 91177308-0d34-0410-b5e6-96231b3b80d8
p-modules.c
60c99d34cf28c002718b61c2f058d1e84923a634 10-Apr-2013 Michael Ilseman <milseman@apple.com> Repeat some #line directive tests for the GNU line marker directive.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179142 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
ec27608da7f15b265135f5743fe71da1f8e25ee9 10-Apr-2013 Michael Ilseman <milseman@apple.com> Improve the diagnostics of the number-reading preprocessor directives.

The GNU line marker directive was sharing code with the #line directive, but some of the warnings/errors were reporting as #line directive diagnostics in both cases.

Previously:
#line 11foo1 ==> "#line directive requires a simple digit sequence"
# 11foo1 ==> "#line directive requires a simple digit sequence"

Now, we get:
#line 11foo1 ==> "#line directive requires a simple digit sequence"
# 11foo1 ==> "GNU line marker directive requires a simple digit sequence"




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179139 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive.c
dabcbf95483a59f2342b5c29112a8f4f8b8ecf1b 05-Apr-2013 Tim Northover <Tim.Northover@arm.com> AArch64: bring predefines in line with most recent ACLE document

The prefixes and names used are now identical to 32-bit ARM, which is also
expected to remain unchanged.

If we made this change after a release, we'd probably have to support both
variants for a while, but I think since AArch64 exists only on trunk now, it's
acceptable to simply swap them now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178870 91177308-0d34-0410-b5e6-96231b3b80d8
arch64-target-features.c
d1b33945f3254de9b02063cd203374856492ed02 05-Apr-2013 Michael J. Spencer <bigcheesegs@gmail.com> Add support for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} on x86.

This fixes std::thread with libstdc++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178816 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-macros.c
bd25ff8632e18bb3af761369fd3b0f1b48fdf061 03-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Allow comparing two macro definitions syntactically instead of only lexically.

Syntactically means the function macro parameter names do not need to use the same
identifiers in order for the definitions to be considered identical.

Syntactic equivalence is a microsoft extension for macro redefinitions and we'll also
use this kind of comparison to check for ambiguous macros coming from modules.

rdar://13562254

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178671 91177308-0d34-0410-b5e6-96231b3b80d8
acro_misc.c
edaf281379e0aa712caf984ee33388e5f414e18d 28-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Define __SIZE_MAX__ preprocessor macro.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178226 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
abc0bea57d4e659d5cde178a4bb426acc48f999e 19-Mar-2013 David Blaikie <dblaikie@gmail.com> PR15539: Record "evaluating if/elif condition" flag in the right place

The previous implementation missed the case where the elif condition was
evaluated from the context of an #ifdef that was false causing PR15539.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177345 91177308-0d34-0410-b5e6-96231b3b80d8
as_include.c
cf2c2e9588a12a716615850cc5bfacd9b20f68ef 06-Mar-2013 Jordan Rose <jordan_rose@apple.com> Preprocessor: don't keep comments under -traditional-cpp.

This patch is designed for minimal intrusion into normal preprocessing
and compilation; under -E -traditional-cpp, the lexer will still
generate tok::comment nodes since it is preserving all whitespace, but
the output printer will then throw it away.

<rdar://problem/13338680>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176534 91177308-0d34-0410-b5e6-96231b3b80d8
raditional-cpp.c
693fdfa069b74ffe1f79caa3c9ea8754555d29bd 05-Mar-2013 Jordan Rose <jordan_rose@apple.com> Preprocessor: don't consider // to be a line comment in -E -std=c89 mode.

It's beneficial when compiling to treat // as the start of a line
comment even in -std=c89 mode, since it's not valid C code (with a few
rare exceptions) and is usually intended as such. We emit a pedantic
warning and then continue on as if line comments were enabled.
This has been our behavior for quite some time.

However, people use the preprocessor for things besides C source files.
In today's prompting example, the input contains (unquoted) URLs, which
contain // but should still be preserved.

This change instructs the lexer to treat // as a plain token if Clang is
in C90 mode and generating preprocessed output rather than actually compiling.

<rdar://problem/13338743>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176526 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
raditional-cpp.c
b3a49f567a918406020cc2bb5a4cdba4e976d09c 27-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a test to make sure __has_include works from inside a macro.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176152 91177308-0d34-0410-b5e6-96231b3b80d8
as_include.c
0b849d34b3a9574615e98e108db4e8099e9032e0 22-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessing record] Have the MacroDefinitions map point to the MacroDefinition object instead
its index in the preprocessed entities vector.

This is because the order of the entities in the vector can change in some (uncommon) cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175907 91177308-0d34-0410-b5e6-96231b3b80d8
p-record.c
c7d1ca52ae1f33a105ad1be217304f74a34c45f3 22-Feb-2013 Jordan Rose <jordan_rose@apple.com> Preproceessor: fix #if skipping under -traditional-cpp.

When parsing directives within skipped #if blocks, we don't want to retain
any whitespace. Previously we were just skipping comments, but it's not
possible to skip comments and retain other whitespace. This change matches
the usual behavior for parsing directives (i.e. the behavior outside of
skipped #if blocks).

<rdar://problem/13267695>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175840 91177308-0d34-0410-b5e6-96231b3b80d8
raditional-cpp.c
6aad4a31b35df07fe818f193fcfd3c0197aea467 21-Feb-2013 Jordan Rose <jordan_rose@apple.com> Preprocessor: preserve whitespace in -traditional-cpp mode.

Note that unlike GNU cpp we currently do not preserve whitespace in macros
(even in -traditional-cpp mode).

<rdar://problem/12897179>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175778 91177308-0d34-0410-b5e6-96231b3b80d8
raditional-cpp.c
8448e1a66582916a856c73e9763a1765a9c48288 09-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> FileCheck'ize tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174815 91177308-0d34-0410-b5e6-96231b3b80d8
acro_rescan.c
acro_space.c
rint_line_count.c
kipping_unclean.c
559b7facde0aaa3d752fde2bc7ed6d764b3da501 09-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> FileCheck'ize a test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174814 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_unknown.c
ed9c59f2ae338f6f70c1fed2ce7b0d8a5eb3ba1c 09-Feb-2013 Jordan Rose <jordan_rose@apple.com> Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).

Add warnings under -Wc++11-compat, -Wc++98-compat, and -Wc99-compat when a
particular UCN is incompatible with a different standard, and -Wunicode when
a UCN refers to a surrogate character in C++03.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174788 91177308-0d34-0410-b5e6-96231b3b80d8
cn-allowed-chars.c
tf8-allowed-chars.c
4a04d445af4d29440371800409babc98708d98aa 08-Feb-2013 Jordan Rose <jordan_rose@apple.com> Simplify logic for avoiding concatenation after numeric constants.

I threw in a couple of test cases for UD-suffixes -- already working, but
it wasn't immediately obvious to me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174767 91177308-0d34-0410-b5e6-96231b3b80d8
utput_paste_avoid.c
utput_paste_avoid.cpp
2821e180094459cbdef37e7d7c12bb406d5b82ba 01-Feb-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Add some missing PPC cpus

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174215 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
5ccd3d0214b9d765a1bb41872da27d3c5530ab2b 01-Feb-2013 Hal Finkel <hfinkel@anl.gov> Add PPC A2Q core and BG/Q preprocessor definitions

The a2q core is the variant of the a2 core used on the BG/Q supercomputers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174151 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
c264e16a42b3f6c36521857a29ea0949d9781c22 31-Jan-2013 Tim Northover <Tim.Northover@arm.com> Add support for AArch64 target.

In cooperation with the LLVM patch, this should implement all scalar front-end
parts of the C and C++ ABIs for AArch64.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174055 91177308-0d34-0410-b5e6-96231b3b80d8
arch64-target-features.c
40f56e5b677761c8258324222d62fce3e4f6bca4 31-Jan-2013 Douglas Gregor <dgregor@apple.com> Reinstate r173952, this time limiting it to exactly the form

#define X X

for which there is no point warning, ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173991 91177308-0d34-0410-b5e6-96231b3b80d8
arn-disabled-macro-expansion.c
1a1c82e1530e834cceab58fa51ff5e356e260641 30-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert "[preprocessor] Don't warn about "disabled expansion of recursive macro""

This reverts commit r173952

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173970 91177308-0d34-0410-b5e6-96231b3b80d8
arn-disabled-macro-expansion.c
8d3f6133da9abb58cf05d55f7b8d86dd00257832 30-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Don't warn about "disabled expansion of recursive macro"
for "#define X X".

This is a pattern that, for example, stdbool.h uses.
rdar://12435773

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173952 91177308-0d34-0410-b5e6-96231b3b80d8
arn-disabled-macro-expansion.c
fcf896078e58aeb7adecb1a0ae5c8e0052b17f9f 29-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Preprocessor] When checking if we can concatenate two tokens, check
if they were already concatenated in source using the spelling locations
even if they came from a macro expansion.

This fixes an issue where a GUID passed as macro argument ends up
malformed after preprocessing because we added spaces inside it.

rdar://13016645

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173826 91177308-0d34-0410-b5e6-96231b3b80d8
utput_paste_avoid.c
319d8fc2221fb41b3d332e091bd1e3e53ac05931 28-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> FileCheck'ize tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173720 91177308-0d34-0410-b5e6-96231b3b80d8
Pragma-dependency.c
Pragma-physloc.c
fc60fbdea506f321b3f44e5525a129c9d410b425 28-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> FileCheck'ize a test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173717 91177308-0d34-0410-b5e6-96231b3b80d8
uiltin_line.c
13bdfcd1c659359289f373052b21fb9f998dcc0b 28-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Migrate a test to -verify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173716 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoft-import.c
94b309e909e568d620700dac60324430cfa73230 28-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> FileCheck'ize and merge tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173697 91177308-0d34-0410-b5e6-96231b3b80d8
tringize_space.c
tringize_space2.c
43bb45d152b14e186689e159ac9be2e27787d5ac 28-Jan-2013 Hal Finkel <hfinkel@anl.gov> Fix the indentation of the first line of preprocessor output

The -E output from clang did not produce the correct indentation on the first line.
This is because MoveToLine returned false, and when this happens,
the regular process for producing initial indentation is skipped.

Thanks to Eli for suggesting a way to simplify this to a one-line change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173657 91177308-0d34-0410-b5e6-96231b3b80d8
irst-line-indent.c
a8a908b81dbe0efec6aed536eb1f704a9c5b5599 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Migrate tests to -verify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173582 91177308-0d34-0410-b5e6-96231b3b80d8
isabled-cond-diags.c
59273eb5263006c96b03cfc90db2dadf354ea4ce 26-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com> clang/test/Preprocessor/iwithprefix.c: Tweak default includes not to use /usr/include.

You may see such a message on non-posix system;
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/include"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173525 91177308-0d34-0410-b5e6-96231b3b80d8
withprefix.c
f282e72d4d55680dd82f3874b739fe0e02851435 25-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> FileCheck'ize tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173484 91177308-0d34-0410-b5e6-96231b3b80d8
ash_line.c
acro_expand.c
8b127d3f9baa6bef2068a3aa5923fe81cbfb9b11 25-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Migrate tests to -verify and merge them


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173482 91177308-0d34-0410-b5e6-96231b3b80d8
acro_expandloc.c
acro_expandloc2.c
7f5c343c43167b9e3ec27bba08d254831ce8fdad 25-Jan-2013 Daniel Dunbar <daniel@zuster.org> [tests] Force a triple to ensure /usr/include is one of the entries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173469 91177308-0d34-0410-b5e6-96231b3b80d8
withprefix.c
fd426dc25debed7b09b4c7b661e04c425c7abe0e 25-Jan-2013 Daniel Dunbar <daniel@zuster.org> [tests] Add a test for -iwithprefix.

- This just scratches the surface, We have pretty horrible test coverage in
this area it seems like, but this at least covers the change in r173410.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173464 91177308-0d34-0410-b5e6-96231b3b80d8
withprefix.c
dcceacb7f0085346164ac1dfb13f6f559533376b 24-Jan-2013 Jordan Rose <jordan_rose@apple.com> Test fix-it ranges for Unicode characters.

Also, remove stray -fdiagnostics-parseable-fixits from ucn-pp-identifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173373 91177308-0d34-0410-b5e6-96231b3b80d8
cn-pp-identifier.c
b87672b124ab4fbe6f2cabc2ad71655fc71230ea 24-Jan-2013 Jordan Rose <jordan_rose@apple.com> Add a fixit for \U1234 -> \u1234.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173371 91177308-0d34-0410-b5e6-96231b3b80d8
cn-pp-identifier.c
c7629d941557f7179eb8fa8a2e2a74d749cbaf7c 24-Jan-2013 Jordan Rose <jordan_rose@apple.com> Handle universal character names and Unicode characters outside of literals.

This is a missing piece for C99 conformance.

This patch handles UCNs by adding a '\\' case to LexTokenInternal and
LexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.
If the UCN is not syntactically well-formed, we fall back to the old
treatment: a backslash followed by an identifier beginning with 'u' (or 'U').

Because the spelling of an identifier with UCNs still has the UCN in it, we
need to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.

Of course, valid code that does *not* use UCNs will see only a very minimal
performance hit (checks after each identifier for non-ASCII characters,
checks when converting raw_identifiers to identifiers that they do not
contain UCNs, and checks when getting the spelling of an identifier that it
does not contain a UCN).

This patch also adds basic support for actual UTF-8 in the source. This is
treated almost exactly the same as UCNs except that we consider stray
Unicode characters to be mistakes and offer a fixit to remove them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173369 91177308-0d34-0410-b5e6-96231b3b80d8
cn-pp-identifier.c
2f169f8645ffbecf7f9bfed48c02915f34a377f5 24-Jan-2013 Bill Wendling <isanbard@gmail.com> Don't check lines beginning with '#', since they could contain a path with the unexpected word in them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173307 91177308-0d34-0410-b5e6-96231b3b80d8
isabled-cond-diags.c
617bb317a7aeb6c3468a4170a5d6c1058da7cea1 17-Jan-2013 Joey Gouly <joey.gouly@arm.com> Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172732 91177308-0d34-0410-b5e6-96231b3b80d8
acro_variadic.cl
87b73ba920f523ef13f2420cbdb958a281aa6f33 17-Jan-2013 Matt Beaumont-Gay <matthewbg@google.com> Suppress all -Wunused-value warnings from macro body expansions.

This is inspired by a number of false positives in real code, including
PR14968. I've added test cases reduced from these false positives to
test/Sema/unused-expr.c, as well as corresponding test cases that pass the
offending expressions as arguments to a no-op macro to ensure that we do warn
there.

This also removes my previous tweak from r166522/r166534, so that we warn on
unused cast expressions in macro arguments.

There were several test cases that were using -Wunused-value to test general
diagnostic emission features; I changed those to use other warnings or warn on
a macro argument expression. I stared at the test case for PR14399 for a while
with Richard Smith and we believe the new test case exercises the same
codepaths as before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172696 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_microsoft.c
31672b1745195d709b641f1c0f44e203742fa73b 16-Jan-2013 Aaron Ballman <aaron@aaronballman.com> No longer crashing with an assert when __has_include or __has_include_next is used outside of a preprocessor directive. This fixes PR14837.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172639 91177308-0d34-0410-b5e6-96231b3b80d8
as_include.c
d017e42af00c2e7c380d0f9b27c81734f4b2844e 10-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PreprocessingRecord] A macro expansion can be reported out-of-order in cases when
there are macro expansions inside macro arguments where the arguments are
not expanded in the same order as listed; don't assert that all macro expansions
are in source order.

rdar://12397063

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172018 91177308-0d34-0410-b5e6-96231b3b80d8
p-record.c
086cc83a84bfab60685b69e3afa3e4500daebb4d 09-Jan-2013 Eli Friedman <eli.friedman@gmail.com> Make sure clang puts tokens from different files on separate lines in "-E -P" mode. <rdar://problem/12774044>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171944 91177308-0d34-0410-b5e6-96231b3b80d8
rint_line_include.c
rint_line_include.h
a0f2d02d166880e5d826074b6c2ecbf64f8ca70d 09-Jan-2013 Eli Friedman <eli.friedman@gmail.com> Make __has_include a bit more resilient in the presence of macros. <rdar://problem/12748859>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171939 91177308-0d34-0410-b5e6-96231b3b80d8
as_include.c
4e24f0f711e2c9fde79f19fa1c80deaab3f3b356 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few nearby 'C++0x' comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171372 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
b29740ae158f9421096a28bcc7ad6af7171b1874 20-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] When "merging" macro argument tokens into one SLocEntry chunk,
make sure they came from the same kind of FileIDs.

Thanks to Abramo Bagnara for providing the test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170616 91177308-0d34-0410-b5e6-96231b3b80d8
acro_arg_slocentry_merge.c
acro_arg_slocentry_merge.h
0ee8de7fe9c1fb74574c62b9d59ffe46a94435f4 14-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] For errors at a function macro invocation, also include
a note about where the macro is defined.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170228 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
1fbf6fb5c7ecbf803e692f0d1622870a36cf83b7 12-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't warn about disabled macro expansion if we see the name of a function-like macro which isn't immediately followed by '('. FreeBSD's stdio.h #defines foo(x) to (foo)(x), apparently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169960 91177308-0d34-0410-b5e6-96231b3b80d8
arn-disabled-macro-expansion.c
c213262e4a98fa16fd9acc099297f361fed0fda1 06-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> Disable clang/test/Preprocessor/macro-multiline.c for now, while investigating lit.ShUtil.parser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169458 91177308-0d34-0410-b5e6-96231b3b80d8
acro-multiline.c
acro-multiline.c.ignoreme
3f03b586351779be6947466f530f22c491b1b70f 17-Nov-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Prevent premature macro expansion in __has_builtin, __has_feature,
__has_attribute, __has_extension, making them behave more akin to
conventional macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168268 91177308-0d34-0410-b5e6-96231b3b80d8
eature_tests.c
97f8461a2c553f68a258612d2322e4281c3f0915 17-Nov-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Made the "expected string literal" diagnostic more expressive

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168267 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_diagnostic.c
ragma_microsoft.c
arning_tests.c
02a176871d91bba3004e4f94b2d4d588ae4b2122 17-Nov-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Refactored duplicate string literal lexing code within Preprocessor, into a
common LexStringLiteral function. In doing so, some consistency problems have
been ironed out (e.g. where the first token in the string literal was lexed
with macro expansion, but subsequent ones were not) and also an erroneous
diagnostic has been corrected.

LexStringLiteral is complemented by a FinishLexStringLiteral function which
can be used in the situation where the first token of the string literal has
already been lexed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168266 91177308-0d34-0410-b5e6-96231b3b80d8
nvalid-__has_warning1.c
nvalid-__has_warning2.c
ragma_diagnostic.c
ragma_microsoft.c
arning_tests.c
b9971bada4eeae74883b61ba96fc6d983b6b0e7f 17-Nov-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Fix handling of invalid uses of the __has_warning builtin macro

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168265 91177308-0d34-0410-b5e6-96231b3b80d8
nvalid-__has_warning1.c
nvalid-__has_warning2.c
arning_tests.c
faf3538605ef3c5ba475639424f6f94ec4aa5179 17-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Add missing features for misc x86 CPUs to CPU feature translation. Patch by Jung-uk Kim.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168239 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
2a9be3e5b0c390f9189bb3dec2b2b6ba884f60cc 16-Nov-2012 Daniel Dunbar <daniel@zuster.org> CPP Output: Do not emit an enter file marker for the main file.

- This diverges from gcc, and confuses tools (like dtrace) which track # line
markers as a way to determine which content is in the context of the main
file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168128 91177308-0d34-0410-b5e6-96231b3b80d8
ine-directive-output.c
4fa4b480270c14dfdcd0dfd4f76938e973082e3b 14-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Suppress elided variadic macro argument extension diagnostic for macros using
the related comma pasting extension.

In certain cases, we used to get two diagnostics for what is essentially one
extension. This change suppresses the first diagnostic in certain cases
where we know we're going to print the second diagnostic. The
diagnostic is redundant, and it can't be suppressed in the definition
of the macro because it points at the use of the macro, so we want to
avoid printing it if possible.

The implementation works by detecting constructs which look like comma
pasting at the time of the definition of the macro; this information
is then used when the macro is used. (We can't actually detect
whether we're using the comma pasting extension until the macro is
actually used, but we can detecting constructs which will be comma
pasting if the varargs argument is elided.)

<rdar://problem/12292192>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167907 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn.c
463eb89d5e36b05d74c14b937384076d745b3b84 10-Nov-2012 Michael Liao <michael.liao@intel.com> Add clang support of RTM from TSX

- New options '-mrtm'/'-mno-rtm' are added to enable/disable RTM feature
- Builtin macro '__RTM__' is defined if RTM feature is enabled
- RTM intrinsic header is added and introduces 3 new intrinsics, namely
'_xbegin', '_xend', and '_xabort'.
- 3 new builtins are added to keep compatible with gcc, namely
'__builtin_ia32_xbegin', '__builtin_ia32_xend', and '__builtin_ia32_xabort'.
- Test cases for pre-defined macro and new intrinsic codegen are added.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167665 91177308-0d34-0410-b5e6-96231b3b80d8
redefined-arch-macros.c
75e8efef960a5e8b94a7e289088e5e7cabe728bd 10-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Make __LDBL_MAX__ etc. have the correct type on targets where long double/double/etc. have the same format. PR14285.

Based on patch by Jeroen Dobbelaere.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167649 91177308-0d34-0410-b5e6-96231b3b80d8
nit.c
02f0022dfced0d082d979ebfd9185211f4dd0496 09-Nov-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Improved support for removing the comma preceding __VA_ARGS__ where __VA_ARGS__
is empty in a variadic macro expansion. This fixes a divergence in support for
the ", ## __VA_ARGS__" GCC extension which differed in behaviour when in strict
C99 mode (note: there is no change in behaviour has been made in the gnu99 mode
that clang uses by default). In addition, there is improved support for the
Microsoft alternative extension ", __VA_ARGS__".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167613 91177308-0d34-0410-b5e6-96231b3b80d8
acro_fn_comma_swallow2.c
286d6236850ed3710822e659afdfdf08a315716b 27-Oct-2012 Mahesha S <mahesha.llvm@gmail.com> Reverted back the changes made in 166868 and in 166869

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166871 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_omp.c
ragma_omp_ignored_warning.c
68de140b5d1df4c21cbf5ef1be2abcbfbc835cb5 27-Oct-2012 Mahesha S <mahesha.llvm@gmail.com> Feature:
OpenMP support.

Sub-Feature:
Support for "#pragma omp ..." registration with
Preprocessor.

Files Changed/Added:
* include/clang/Basic/DiagnosticGroups.td (C)
* include/clang/Basic/DiagnosticParseKinds.td (C)
* include/clang/Basic/TokenKinds.def (C)
* include/clang/Parse/Parser.h (C)
* lib/Parse/Parser.cpp (C)

Test Cases Changed/Added:
* test/Preprocessor/pragma_omp.c (A)
* test/Preprocessor/pragma_omp_ignored_warning.c (A)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166869 91177308-0d34-0410-b5e6-96231b3b80d8
ragma_omp.c
ragma_omp_ignored_warning.c
a0d5878b7e1c54551c0445354788e4259900c03c 25-Oct-2012 David Tweed <david.tweed@arm.com> Correct test inovocations to use %clang_cc1 rather than direct invocation (so that it can have additional options set when trying to debug issues causing regressions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166681 91177308-0d34-0410-b5e6-96231b3b80d8
ser_defined_system_framework.c
97bc3d54a95153945d14b1ee812837160d45ed90 22-Oct-2012 Richard Trieu <rtrieu@google.com> Fix for PR13334. This prevents crashes that result from badly formed
expressions involving __has_include


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166438 91177308-0d34-0410-b5e6-96231b3b80d8
as_include.c
8e8fb3be5bd78f0564444eca02b404566a5f3b5d 19-Oct-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
omment_save_if.c
xx_true.cpp
xpr_define_expansion.c
xpr_multichar.c
acro_paste_identifier_error.c
bjc-pp.m
ptimize.c
ragma_sysheader.c
ser_defined_system_framework.c
7cf0cd3893bdf7bf1577e52a1565a87e563c57e8 02-Oct-2012 Michael Gottesman <mgottesman@apple.com> [clang-tests] Changed relative paths to absolute paths in run command for annotate-macro-args.m, get-cursor-macro-args.m, import_self.c.

This fixes make check-all failures when make -C is used to run the tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164978 91177308-0d34-0410-b5e6-96231b3b80d8
mport_self.c
99c720828a2fcaf368c6a0f2502189d10dbd5c53 26-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> Allow -MF to be used in combination with -E -M or -E -MM.

Fixes PR13851. Patch by Dimitry Andric!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164717 91177308-0d34-0410-b5e6-96231b3b80d8
r13851.c
93dec51750411678bb9c5bc1b27b259f5f5a23bd 26-Sep-2012 Nico Weber <nicolasweber@gmx.de> Revert r163022, it caused PR13924.

Add a test for PR13924. Do not revert the test added in r163022,
it surprisingly still passes even after reverting the code changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164672 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoft-ext.c
9c611373cc25300c02043bdde2f2a3d8008704f1 20-Sep-2012 Eli Friedman <eli.friedman@gmail.com> The keywords "true" and "false" shouldn't warn under -Wundef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164279 91177308-0d34-0410-b5e6-96231b3b80d8
xx_true.cpp
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