• Home
  • History
  • Annotate
  • only in /external/clang/test/Lexer/
History log of /external/clang/test/Lexer/
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
xx1z-trigraphs.cpp
s-extensions.c
arn-date-time.c
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
lang-keywords.cpp
ross-windows-on-linux.cpp
xx0x_keyword.cpp
xx1y_digit_separators.cpp
nu_keywords.c
as_feature_cxx0x.cpp
as_feature_exceptions.cpp
eywords_test.c
eywords_test.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
nputs/success.h
cpl-escaped-newline.c
ross-windows-on-linux-default.cpp
ross-windows-on-linux.cpp
xx1y_digit_separators.cpp
as_feature_type_traits.cpp
exfloat.cpp
c78e5b33cb2dccfd7972eed2bc4a785cfa42bf94 28-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195888:
------------------------------------------------------------------------
r195888 | rsmith | 2013-11-27 14:58:16 -0800 (Wed, 27 Nov 2013) | 2 lines

Add support for C++'s SD6 feature test macros.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195899 91177308-0d34-0410-b5e6-96231b3b80d8
xx-features.cpp
223e7a8b0fadbbc9eaea1fb460cd90c8d9c8dd28 13-Oct-2013 Ismail Pazarbasi <ismail.pazarbasi@gmail.com> Relax header guard mismatch warning with edit distance heuristic.

If the edit distance between the two macros is more than 50%, DefinedMacro may not be header guard or can be header guard of another header file or it might be defining something completely different set by the build environment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192547 91177308-0d34-0410-b5e6-96231b3b80d8
nputs/unlikely-to-be-header-guard.h
eader.cpp
44868f5b6a0980744de08e9fa45193b5a29ff990 28-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Mark lambda init-captures as complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191607 91177308-0d34-0410-b5e6-96231b3b80d8
as_extension_cxx.cpp
as_feature_cxx0x.cpp
629bc52604e62f016474314077193ed30f8782f9 27-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Mark variable template implementation as complete. Nearly all of the credit
here goes to Larisse Voufo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191549 91177308-0d34-0410-b5e6-96231b3b80d8
as_extension_cxx.cpp
as_feature_cxx0x.cpp
65ea687b8abbfc892e8d91bba477999b0379b07b 26-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add macro test from N3781.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191444 91177308-0d34-0410-b5e6-96231b3b80d8
xx1y_digit_separators.cpp
9a17677bb8a332e873137187aba91f64d3fd16a0 26-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Per updates to D3781, allow underscore under ' in a pp-number, and allow ' in a #line directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191443 91177308-0d34-0410-b5e6-96231b3b80d8
xx1y_digit_separators.cpp
859b6227694033dd6eaf3991a2b80877a406c382 26-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++1y digit separator proposal (' as a digit separator). This is not
yet approved by full committee, but was unanimously supported by EWG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191417 91177308-0d34-0410-b5e6-96231b3b80d8
xx1y_binary_literal.cpp
xx1y_digit_separators.cpp
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-operators.cpp
a5e77a89098fc5bd1398c1c96dd231ae359bcf01 05-Sep-2013 Eli Friedman <eli.friedman@gmail.com> Add specific warning flags for GNU ext in lexer.

This patch adds the following flags covering existing warnings:

-Wgnu-zero-variadic-macro-arguments
-Wgnu-imaginary-constant
-Wgnu-binary-literal
-Wgnu-zero-line-directive

Patch by Peter Lewis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190017 91177308-0d34-0410-b5e6-96231b3b80d8
nu-flags.c
b2ae804b5d58d4cc4991d78b8d1d25fc6cc14d78 23-Aug-2013 Jordan Rose <jordan_rose@apple.com> Revise -Wnewline-eof test per feedback from Dmitri.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189113 91177308-0d34-0410-b5e6-96231b3b80d8
ewline-eof.c
7865b8e4324378e06f59adb4d60bec26a7d3d584 23-Aug-2013 Jordan Rose <jordan_rose@apple.com> Respect -Wnewline-eof even in C++11 mode.

If the user has requested this warning, we should emit it, even if it's not
an extension in the current language mode. However, being an extension is
more important, so prefer the pedantic warning or the pedantic-compatibility
warning if those are enabled.

<rdar://problem/12922063>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189110 91177308-0d34-0410-b5e6-96231b3b80d8
ewline-eof-c++11.cpp
ewline-eof-c++98-compat.cpp
ewline-eof.c
c3d9da2a591b1f6529784ec246b9e0b44dcb704a 21-Aug-2013 Nick Lewycky <nicholas@mxc.ca> Revert r188863 which could propose wrong fixits for multibyte character literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188918 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal-encoding-fixit.c
6347a8af824d8cb4197ec1a1d011f731390a8f31 21-Aug-2013 Nick Lewycky <nicholas@mxc.ca> Issue fixits replacing invalid character literals with the equivalent \xNN
escape code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188863 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal-encoding-fixit.c
931a4feb64f18190d189c222d61b2abf52f18ab8 12-Aug-2013 Tim Northover <tnorthover@apple.com> Fix FileCheck --check-prefix lines.

Various tests had sprung up over the years which had --check-prefix=ABC on the
RUN line, but "CHECK-ABC:" later on. This happened to work before, but was
strictly incorrect. FileCheck is getting stricter soon though.

Patch by Ron Ofir.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188174 91177308-0d34-0410-b5e6-96231b3b80d8
ollar-idents.c
char-signedness.c
34f3bcf7f2907f618f7a10d919bda47e53db60dd 26-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Partially revert r186903.

It turns out that Plum Hall depends on us not emitting an error on
integer literals which fit into long long, but fit into
unsigned long long. So C99 conformance requires not conforming to C99. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187172 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
a4fb3390853356524416bc28d6044e7a41c87863 24-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Update documentation to match current C++1y feature set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187055 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
b3da613977f6b77dee2b382eeff5713168a4ca18 23-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Integers which are too large should be an error.

Switch some warnings over to errors which should never have been warnings
in the first place. (Also, a minor fix to the preprocessor rules for
integer literals while I'm here.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186903 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.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
uiltin_redef.c
xx0x_raw_string_unterminated.cpp
tring-literal-errors.cpp
4196019db7a9b22d09c31a290c49d45eab2fa1d3 16-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR16339: Don't produce a diagnostic pointing at the whitespace between a '#if'
and a '!defined(X)' if we find a broken header guard. This is suboptimal; we
should point the diagnostic at the 'X' token not the 'if' token, but it fixes
the crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184054 91177308-0d34-0410-b5e6-96231b3b80d8
nputs/bad-header-guard-defined.h
eader.cpp
671538e8a51eab5bd65a1f9f327ba7f44f84e486 12-Jun-2013 Richard Trieu <rtrieu@google.com> Introducing -Wheader-guard, a warning that checks header guards actually work
properly. This warning checks that the #ifndef and #define directives at
the beginning of a header refer to the same macro name. Includes a fix-it
hint to correct the header guard.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183867 91177308-0d34-0410-b5e6-96231b3b80d8
nputs/bad-header-guard.h
nputs/different-define.h
nputs/good-header-guard.h
nputs/multiple.h
nputs/no-define.h
nputs/out-of-order-define.h
nputs/tokens-between-ifndef-and-define.h
eader.cpp
0ff5074f37a66bca244a9d5d0da050ff68693ce2 15-May-2013 Hans Wennborg <hans@hanshq.net> Better diagnostics for string initialization.

This commit improves Clang's diagnostics for string initialization.
Where it would previously say:

/tmp/a.c:3:9: error: array initializer must be an initializer list
wchar_t s[] = "Hi";
^
/tmp/a.c:4:6: error: array initializer must be an initializer list or string literal
char t[] = L"Hi";
^

It will now say

/tmp/a.c:3:9: error: initializing wide char array with non-wide string literal
wchar_t s[] = "Hi";
^
/tmp/a.c:4:6: error: initializing char array with wide string literal
char t[] = L"Hi";
^

As a bonus, it also fixes the fact that Clang would previously reject
this valid C11 code:

char16_t s[] = u"hi";
char32_t t[] = U"hi";

because it would only recognize the built-in types for char16_t and
char32_t, which do not exist in C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181880 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal.cpp
f45c2992a3aac7591310cd824b7c7319afd432fc 12-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y: provide full 'auto' return type deduction for lambda expressions. This
completes the implementation of N3638.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181669 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
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
as_extension_cxx.cpp
as_feature_cxx0x.cpp
f9734241b141ad9c19969bab9b56dd4246e35e7d 04-May-2013 Aaron Ballman <aaron@aaronballman.com> Reverting r181004 since it has broken test/Sema/wchar.c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181122 91177308-0d34-0410-b5e6-96231b3b80d8
s-compatibility-wchar.c
s-extensions-wchar.c
6f464bb8d316b95bf60efcdb2d21803659d3aa1b 03-May-2013 Hans Wennborg <hans@hanshq.net> Support __wchar_t in -fms-extensions and -fms-compatibility modes.

MSVC provides __wchar_t, either as an alias for the built-in wchar_t
type, or as a separate type depending on language (C vs C++) and flags
(-fno-wchar).

In -fms-extensions, Clang will simply accept __wchar_t as an alias for
whatever type is used for wide character literals. In -fms-compatibility, we
try to mimic MSVC's behavior by always making __wchar_t a builtin type.

This fixes PR15815.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181004 91177308-0d34-0410-b5e6-96231b3b80d8
s-compatibility-wchar.c
s-extensions-wchar.c
634189d729595b340205dd8a5216ba3122c7a2ab 02-May-2013 Douglas Gregor <dgregor@apple.com> Use a triple ensure that __has_feature(c_thread_local) is 1 in C11 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180925 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_c1x.c
e87c5bd593b038baec7cfa6075f26cd0ac256042 02-May-2013 Douglas Gregor <dgregor@apple.com> Only evaluate __has_feature(c_thread_local) and __has_feature(cxx_thread_local) true when the target supports thread-local storage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180909 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
2fcf0de8a122ddb265d8c32d6ac1012c070e4f24 19-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Note that we support (and in fact have supported since the dawn of time itself)
C++1y binary literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179883 91177308-0d34-0410-b5e6-96231b3b80d8
xx1y_binary_literal.cpp
f5ae4dd6bf2310fbf4b192137aecd21248a08449 19-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Keep the parentheses in #pragma message (partial revert of r179771).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179862 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-message2.c
ragma-operators.cpp
e6e68b53778bb5a15c10a73a5bf18d8ab73f75e3 19-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++11 support is now feature-complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179861 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_c1x.c
as_feature_cxx0x.cpp
688f2a1fc1ac38e8b7b602ab8afc69cdfa7492bf 18-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Dropped the parentheses for #pragma message and its kin in the -E output generator.

This was a suggestion by Jordan Rose since the documented format for these pragmas is without the parentheses. At the same time, I've increased test coverage too for the preprocessed output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179771 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-message2.c
ragma-operators.cpp
076eea20b80024fc63bbd71fb019375983680ea6 17-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Implemented #pragma GCC warning/error in the same mould as #pragma message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179687 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-message.c
d4bf760d057f1e8724ab7be340a2d42adae0900a 11-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wc99-compat warning for C11 unicode string and character literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176817 91177308-0d34-0410-b5e6-96231b3b80d8
nicode-strings.c
0093e12513c5c896434915d5e9126f51b780aa61 10-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> When lexing in C11 mode, accept unicode character and string literals, per C11
6.4.4.4/1 and 6.4.5/1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176780 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal.cpp
tring_concat.cpp
tf8-char-literal.cpp
0b91cc47a5642de2e1f567fe0f29420acdcdebbe 10-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Handle _Pragma on a u8, u, or U string literal per the C11 specification. Also
handle raw string literals here. C++11 doesn't yet specify how they will
behave, but discussion on core suggests that we should just strip off
everything but the r-char-sequence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176779 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-operators.cpp
eed55e6061768c0faff62dda22c6edad9d286501 06-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> After issuing a diagnostic for undefining or redefining a builtin macro,
continue parsing the directive rather than silently discarding it.

Allowing undef or redef of __TIME__ and __DATE__ is important to folks
who want stable, reproducible builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176540 91177308-0d34-0410-b5e6-96231b3b80d8
uiltin_redef.c
0ed439487491e09faffdbabfacb1d050292c7723 31-Jan-2013 Jordan Rose <jordan_rose@apple.com> Lexer: Don't warn about Unicode in preprocessor directives.

This allows people to use Unicode in their #pragma mark and in macros
that exist only to be string-ized.

<rdar://problem/13107323&13121362>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174081 91177308-0d34-0410-b5e6-96231b3b80d8
nicode.c
tf8-invalid.c
1b6b31db169b66fb2048012b0ec1550c22cc64f4 30-Jan-2013 Jordan Rose <jordan_rose@apple.com> Fix comment in test/Lexer/utf8-invalid.c for updates in r173959.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173961 91177308-0d34-0410-b5e6-96231b3b80d8
tf8-invalid.c
20afc2977cd0a6bacbe6218a633cd59a24463e2f 30-Jan-2013 Jordan Rose <jordan_rose@apple.com> Fix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.

This caused hangs as we processed the same invalid byte over and over.

<rdar://problem/13115651>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173959 91177308-0d34-0410-b5e6-96231b3b80d8
tf8-invalid.c
74c2498bb9e339345ee32bdd095e76157cec3b86 30-Jan-2013 Jordan Rose <jordan_rose@apple.com> Don't warn about Unicode characters in -E mode.

People use the C preprocessor for things other than C files. Some of them
have Unicode characters. We shouldn't warn about Unicode characters
appearing outside of identifiers in this case.

There's not currently a way for the preprocessor to tell if it's in -E mode,
so I added a new flag, derived from the PreprocessorOutputOptions. This is
only used by the Unicode warnings for now, but could conceivably be used by
other warnings or even behavioral differences later.

<rdar://problem/13107323>

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173714 91177308-0d34-0410-b5e6-96231b3b80d8
oken-concat-2.c
oken-concat.c
8094bac4e987caf90e8fd719c24545add8dafcb6 28-Jan-2013 Jordan Rose <jordan_rose@apple.com> PR15067 (again): Don't warn about UCNs in C90 if we're raw-lexing.

Fixes a crash. Thanks, Richard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173701 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
bfec916e5fc40f22ac11267e78a024cd8dcf3bbf 27-Jan-2013 Jordan Rose <jordan_rose@apple.com> PR15067: Don't assert when a UCN appears in a C90 file.

Unfortunately, we can't accept the UCN as an extension because we're
required to treat it as two tokens for preprocessing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173622 91177308-0d34-0410-b5e6-96231b3b80d8
90.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
adstring_in_if0.c
nknown-char.c
5c9e20fed27764581bfbb7cbf9e8a1a4878b0ed8 25-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> FileCheck'ize test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173393 91177308-0d34-0410-b5e6-96231b3b80d8
ounter.c
fc12060ed595fd23d731b8a86adb21ddbb8c7bfb 24-Jan-2013 Jordan Rose <jordan_rose@apple.com> As an extension, treat Unicode whitespace characters as whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173370 91177308-0d34-0410-b5e6-96231b3b80d8
nicode.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
tf8-invalid.c
ee64b81c36d60483d385d6a099df1e6b5bb30618 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@173306 91177308-0d34-0410-b5e6-96231b3b80d8
nknown-char.c
0e697aa6704dbc9c4c693ac5cdb60dbc791920d2 24-Jan-2013 Bill Wendling <isanbard@gmail.com> The diagnostic is now a warning instead of an error. Also 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@173305 91177308-0d34-0410-b5e6-96231b3b80d8
adstring_in_if0.c
f109afdc0a36f835470e8c48bdf71a88c4130882 16-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add raw string literal versus C preprocessor test, suggested by James Dennett.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172660 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_raw_string_directives.cpp
5c70ef4ae43dbfd501bedb8e8952fc3881527110 20-Dec-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add __has_feature(memory_sanitizer).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170686 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_memory_sanitizer.cpp
728e2127e858611750d560ee7692c322a8570faa 17-Dec-2012 Dmitry Vyukov <dvyukov@google.com> tsan: add __has_feature(thread_sanitizer)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170314 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_thread_sanitizer.cpp
fafd101e6b557595ffbb5e9e9b47a3fc0385dc19 30-Nov-2012 Aaron Ballman <aaron@aaronballman.com> Support for #pragma region/endregion for MSVC compatibility. Patch thanks to pravic!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169028 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-region.c
6d926ae667cca926e77ddce1734514911706ed0a 17-Nov-2012 Nico Weber <nicolasweber@gmx.de> Fix crash on end-of-file after \ in a char literal, fixes PR14369.

This makes LexCharConstant() look more like LexStringLiteral(), which doesn't
have this bug. Add tests for eof after \ for several other cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168269 91177308-0d34-0410-b5e6-96231b3b80d8
of-char.c
of-file.c
of-string.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-message.c
a6600a339fee660cac2bd9b04cf578fa47ed491d 11-Nov-2012 Nico Weber <nicolasweber@gmx.de> FileCheckize test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167680 91177308-0d34-0410-b5e6-96231b3b80d8
ollar-idents.c
d6396a681c9acbe56bc41bbc2bed2db45755bcd7 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_address_sanitizer.cpp
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
lang-keywords.cpp
igraph.c
nu_keywords.c
ong-long.cpp
sdos-cpm-eof.c
ewline-eof-c++11.cpp
umeric-literal-trash.c
ragma-mark.c
dr-6096838.c
e3b136bd873508c9ac0ee6eba98c2a810a177eba 24-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Change the wording of the extension warning from
> 'long long' is an extension when C99 mode is not enabled
to
> 'long long' is a C++11 extension
while compiling in C++98 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164545 91177308-0d34-0410-b5e6-96231b3b80d8
ong-long.cpp
e5f0588840b20897631cc8110344fd2745ef4caa 08-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> When a bad UTF-8 encoding or bogus escape sequence is encountered in a
string literal, produce a diagnostic pointing at the erroneous character
range, not at the start of the literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163459 91177308-0d34-0410-b5e6-96231b3b80d8
tring-literal-errors.cpp
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
cpl-escaped-newline.c
onflict-marker.c
2e413f977d13d83b5baf7b5e4e93fe7c390959ca 19-Jun-2012 Jordan Rose <jordan_rose@apple.com> Fix the location of the fixit for -Wnewline-eof.

It turns out SourceManager treating the "one-past-the-end" location as invalid,
but then failing to set the invalid flag properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158699 91177308-0d34-0410-b5e6-96231b3b80d8
ewline-eof.c
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
ragma-operators.cpp
d2e95d1538ff91fe902464f02f83429f96117af5 15-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12717: Clang supports hexadecimal floating-point literals in all language
modes. For languages other than C99/C11, this isn't quite a conforming
extension, and for C++11, it breaks some reasonable code containing
user-defined literals.

In languages which don't officially have hexfloats, pare back this extension
to only apply in cases where the token starts 0x and does not contain an
underscore. The extension is still not quite conforming, but it's a lot closer
now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158487 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
exfloat.cpp
59b26d84b64510158e23d80eba077b844b7e0b04 13-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix off-by-one error in UTF-16 encoding: don't try to use a surrogate pair for U+FFFF.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158391 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal.cpp
a30d8600b9b52922a92a90b30993564ba257537a 04-May-2012 James Molloy <james.molloy@arm.com> Add a predefine __WINT_UNSIGNED__, similar to __WCHAR_UNSIGNED__, and test them both for ARM and X86.

Use this to fully fix Sema/format-strings.c for non-x86 platforms.

Reviewed by Chandler on IRC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156169 91177308-0d34-0410-b5e6-96231b3b80d8
char-signedness.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
tf-16.c
5d2d046856687dc392ba641a991b8b0ac267902a 15-Apr-2012 Seth Cantrell <seth.cantrell@gmail.com> %clang -cc1 -> %clang_cc1

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154757 91177308-0d34-0410-b5e6-96231b3b80d8
ewline-eof-c++98-compat.cpp
ewline-eof.c
5e6c3f0397254e2a1a9ef85cf13232f89e653640 13-Apr-2012 Seth Cantrell <seth.cantrell@gmail.com> Support -Wc++98-compat-pedantic as requested:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120409/056126.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154655 91177308-0d34-0410-b5e6-96231b3b80d8
ewline-eof-c++98-compat.cpp
d55522287e217746996238c6ab206babeec336d5 13-Apr-2012 Seth Cantrell <seth.cantrell@gmail.com> C++11 no longer requires files to end with a newline

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154643 91177308-0d34-0410-b5e6-96231b3b80d8
ewline-eof-c++11.cpp
ewline-eof.c
316551f079a182d15c0e9b930c361428c968b5ee 10-Apr-2012 Douglas Gregor <dgregor@apple.com> Add a query macro for C++11 N3276, decltype does not require complete
return types, from Michel Morin!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154428 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
b0afd5df3c427c329f6c5e00fe264c5bada3bf36 08-Apr-2012 Francois Pichet <pichet2000@gmail.com> ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn't default to Error; otherwise MSVC headers won't parse.

Fixes PR12383.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154273 91177308-0d34-0410-b5e6-96231b3b80d8
s-extensions.cpp
7b156ddae822a546aa9e8b23d683ac76da8e8ac8 04-Apr-2012 Douglas Gregor <dgregor@apple.com> Add feature check "cxx_local_type_template_args" describing support
for templates with local template arguments, from Michel Morin! Fixes
PR12337.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153983 91177308-0d34-0410-b5e6-96231b3b80d8
as_extension_cxx.cpp
as_feature_cxx0x.cpp
9c1dda7d7b6336506764ce1b03baf4c03ed9ff92 09-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> User-defined literals are done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152396 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
49d517467c3dcd2c67e8a6c740ba5160e37625f7 08-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> When checking the encoding of an 8-bit string literal, don't just check the
first codepoint! Also, don't reject empty raw string literals for spurious
"encoding" issues. Also, don't rely on undefined behavior in ConvertUTF.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152344 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_raw_string_delim_length.cpp
tring-literal-encoding.c
99831e4677a7e2e051af636221694d60ba31fcdb 06-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> User-defined literals: reject string and character UDLs in all places where the
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152098 91177308-0d34-0410-b5e6-96231b3b80d8
oken-concat.cpp
ec92bc78979aae6ec436fe51d082f7467e6f96c0 04-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add a pile of tests for unrestricted unions, and advertise support for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151992 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
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.cpp
d1dc3aa25797301788f1c4f30f769b1d9e1fb22a 25-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Initializer lists are now supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151458 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.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
as_extension.c
7c07e964d72a287aa3d5714731e202c3ffa17007 23-Feb-2012 Douglas Gregor <dgregor@apple.com> Clang now supports lambda expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151231 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
b5216aaf803609d25eb8514266dd8531812b4877 14-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Advertize support for constexpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150524 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
91359302b822d829afa93c0dadf5f7ce6e19fbc6 11-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Implement warning for non-wide string literals with an unexpected encoding. Downgrade error for non-wide character literals with an unexpected encoding to a warning for compatibility with gcc and older versions of clang. <rdar://problem/10837678>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150295 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal-encoding-error.c
tring-literal-encoding.c
66b0ebac276353f3ff7d41eaba3e6d24d48663b7 08-Feb-2012 Aaron Ballman <aaron@aaronballman.com> Fixing hex floating literal support so that it handles 0x.2p2 properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150072 91177308-0d34-0410-b5e6-96231b3b80d8
exfloat.cpp
b534a9ed04b343534e5f277b81d1170de3204164 07-Feb-2012 Aaron Ballman <aaron@aaronballman.com> Hex literals without a significand no longer crash the lexer. Fixes bug 7910

Patch by Eitan Adler

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149984 91177308-0d34-0410-b5e6-96231b3b80d8
exfloat.cpp
0f12507d43c2571108c65f106c1dac5bba2509f0 25-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Improve the error message slightly for files that aren't using the expected UTF-8 encoding. Patch by Seth Cantrell.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148991 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal-encoding-error.c
tring-literal-encoding.c
7748cbc97ff9c6c3940549d30965a10b47a45ee8 18-Jan-2012 Seth Cantrell <seth.cantrell@gmail.com> Add and update tests for character literals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148392 91177308-0d34-0410-b5e6-96231b3b80d8
har-literal-encoding-error.c
har-literal.cpp
onstants.c
tf8-char-literal.cpp
char.c
7a7ee3033e44b45630981355460ef89efa0bdcc4 16-Jan-2012 David Chisnall <csdavec@swan.ac.uk> Some improvements to the handling of C11 atomic types:

- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.

Still to do:

- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148242 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_c1x.c
as_feature_cxx0x.cpp
bd507c5ef3cfe58aa2c0eca901fcd53b45c673a1 04-Jan-2012 Douglas Gregor <dgregor@apple.com> Add __has_feature(modules) to indicate when modules are available (in
any language variant), and restrict __has_feature(objc_modules) to
mean that we also have the Objective-C @import syntax. I anticipate
__has_feature(cxx_modules) and/or __has_feature(c_modules) for when we
nail down the module syntax for C/C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147548 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_modules.m
7fde6518934846808e878cee8798166ae65edcd4 03-Jan-2012 Douglas Gregor <dgregor@apple.com> Add __has_feature(objc_modules)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147482 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_modules.m
04a94bcc56438b17e88db592708324041f75d48c 22-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In Lexer::getCharAndSizeSlow[NoWarn] if we come up against

\<newline><newline>

don't consume the second newline.

Thanks to David Blaikie for pointing out the crash!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147138 91177308-0d34-0410-b5e6-96231b3b80d8
scape_newline.c
f132dcaae82ebfc44c4fe0e84bf0b1f95e9d1251 21-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In Lexer::getCharAndSizeSlow[NoWarn] make sure we don't go over the end of the buffer
when the end of the buffer is immediately after an escaped newline.

Fixes http://llvm.org/PR10153.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147091 91177308-0d34-0410-b5e6-96231b3b80d8
scape_newline.c
2fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fc 15-Dec-2011 Richard Trieu <rtrieu@google.com> Modify how the -verify flag works. Currently, the verification string and
diagnostic message are compared. If either is a substring of the other, then
no error is given. This gives rise to an unexpected case:

// expect-error{{candidate function has different number of parameters}}

will match the following error messages from Clang:

candidate function has different number of parameters (expected 1 but has 2)
candidate function has different number of parameters

It will also match these other error messages:

candidate function
function has different number of parameters
number of parameters

This patch will change so that the verification string must be a substring of
the diagnostic message before accepting. Also, all the failing tests from this
change have been corrected. Some stats from this cleanup:

87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146619 91177308-0d34-0410-b5e6-96231b3b80d8
dr-6096838-2.c
tring-literal-encoding.c
tring_concat.cpp
5e9392ba18f5925e26cc5714d1412eda0d219826 03-Dec-2011 Douglas Gregor <dgregor@apple.com> Implement support for the __is_final type trait, to determine whether
a class is marked 'final', from Alberto Ganesh Barbati! Fixes
PR11462.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145775 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_type_traits.cpp
b61968857fd2c6579b4dcd7bad65736e89d21185 22-Nov-2011 Kostya Serebryany <kcc@google.com> implement __has_feature(address_sanitizer); also use LangOpts.AddressSanitizer instead of CodeGenOpts.AddressSanitizer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145054 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_address_sanitizer.cpp
f12e1b928053ccec033eee4c1e683bb1c54c220a 01-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Tests for UTF-8 encoding in strings in source code. Patch by Seth Cantrell.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143418 91177308-0d34-0410-b5e6-96231b3b80d8
tring-literal-encoding.c
172b221147ab56e60968d3f7ffdb42256622fa4c 01-Nov-2011 Douglas Gregor <dgregor@apple.com> Add __has_feature(cxx_raw_string_literals) and
__has_feature(cxx_unicode_literals), from Michel Morin!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143412 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
f695a6952f111e79c685301c292755908473f297 01-Nov-2011 Douglas Gregor <dgregor@apple.com> Add __has_feature(cxx_defaulted_functions) for querying "defaulted
functions", from Michel Morin!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143411 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
5aa6dea4efe19f4c2e6600364123fb8899ec4af7 29-Oct-2011 Douglas Gregor <dgregor@apple.com> Give __STDC_VERSION__ the value 201001L when we're in C1x mode. The
committee hasn't set a value for __STDC_VERSION__ yet, so this is a
placeholder. But at least it's > 199901L.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143245 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_c1x.c
c2c11446caaee2d5a787cc8d0310330c6364210d 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Make the -Wc++11-compat warnings ignored by default, so we don't break
valid C++98/03 code. However, add these warnings to -Wall, for those
who obviously already like clean code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142903 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_keyword_as_cxx98.cpp
0bb935c5e75250f9cab8efa7a95ebdd534c11602 24-Oct-2011 Douglas Gregor <dgregor@apple.com> Make -fms-compatibility imply -fms-extensions. Fixes PR11204.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142797 91177308-0d34-0410-b5e6-96231b3b80d8
s-extensions.c
fd5f6866a7574f12ecac5cceb7359ff253f83145 15-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Add c_alignas and cxx_alignas features

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142020 91177308-0d34-0410-b5e6-96231b3b80d8
as_extension.c
as_feature_c1x.c
as_feature_cxx0x.cpp
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
xx0x_keyword.cpp
xx0x_raw_string_delim_length.cpp
xx0x_raw_string_unterminated.cpp
as_feature_cxx0x.cpp
tring_concat.cpp
tf8-char-literal.cpp
46717308883538841da7059e72bc898abe0c8724 12-Oct-2011 Douglas Gregor <dgregor@apple.com> We do parse hexfloats in C++11; make it actually work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141798 91177308-0d34-0410-b5e6-96231b3b80d8
exfloat.cpp
d5e1d606f8c22ebda17c6fbf952f8c1696428758 12-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Handle Perforce-style conflict markers like normal conflict markers. Perforce
swaps over the <<<< and >>>> markers, and uses shorter markers than traditional
tools.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141751 91177308-0d34-0410-b5e6-96231b3b80d8
onflict-marker.c
0c91cce098fcf9081157c0a0d8b2282573926879 11-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix test: don't use __thread without a target triple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141719 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_keyword_as_cxx98.cpp
98d86b98b3fd0bd9c546123b16fd9995509aaae1 11-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when in
C++98 mode. Only the first occurrence of each keyword will produce a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141700 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_keyword_as_cxx98.cpp
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
as_feature_objc_arc.m
17c8c84fbc5cbde336fdef8fffe63c08a955ade9 27-Sep-2011 Douglas Gregor <dgregor@apple.com> When parsing a character literal, extract the characters from the
buffer as an 'unsigned char', so that integer promotion doesn't
sign-extend character values > 127 into oblivion. Fixes
<rdar://problem/10188919>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140608 91177308-0d34-0410-b5e6-96231b3b80d8
tf8-char-literal.cpp
7640c0070361bd365e30fc2eb3b6a64361fa7377 06-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> Advertise support for cxx_range_for as an extension in C++98 mode. Patch by Jean-Daniel Dupas!
Also provide a modicum of test coverage for ranged for in C++98.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139149 91177308-0d34-0410-b5e6-96231b3b80d8
as_extension_cxx.cpp
1daa58ea8973854b62e79f0939fa37cb6fed00e6 05-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> Speed up BCPL comment lexing by looking aggressively for newlines and then scannig backwards to see if the newline is escaped.

3% speedup in preprocessing all of clang with -Eonly. Also includes a small testcase for coverage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139116 91177308-0d34-0410-b5e6-96231b3b80d8
cpl-escaped-newline.c
74e611a5fd0b5977c664d13a07b625ae23527d0d 04-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Add test case for defaulted copy and move structure validation.
Fix bug this uncovered.
Address minor comments from Doug.
Enable cxx_implicit_moves feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139101 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
03c107a42fae79e89d0016999a1a04c07d65591a 25-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make Lexer::ComputePreamble accept a LangOptions parameter, otherwise it may be
out-of-sync how a file is compiled. Patch by Matthias Kleine!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138580 91177308-0d34-0410-b5e6-96231b3b80d8
reamble.c
0473cd52eac6f1e831777ed899be3ea4509c7b24 19-Aug-2011 Craig Topper <craig.topper@gmail.com> Warn about and truncate UCNs that are too big for their character literal type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138031 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
235830be84ad18c447fd477efe9b0675c203c12f 12-Aug-2011 Craig Topper <craig.topper@gmail.com> Fix a couple raw string literal tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137422 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_raw_string_delim_length.cpp
xx0x_raw_string_unterminated.cpp
2e4f44f2799410a2336675e075c7f82cbbc29b33 11-Aug-2011 Craig Topper <craig.topper@gmail.com> Add tests for string literal concatenation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137302 91177308-0d34-0410-b5e6-96231b3b80d8
tring_concat.cpp
2fa4e86b4fdada3b9ecbbbd99965b83ed879f69b 11-Aug-2011 Craig Topper <craig.topper@gmail.com> Add support for C++0x raw string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137298 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_raw_string_delim_length.cpp
xx0x_raw_string_unterminated.cpp
5cee1195584fa8672253139c86e922daeda69b9e 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Add support for C++0x unicode string and character literals, from Craig Topper!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
char.c
cfe1bcb440ef2fde5e0df6e07a5abbeee089e6e7 23-Jul-2011 Anna Zaks <ganna@apple.com> Expose no newline at end of file warning under Wnewline-eof flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135822 91177308-0d34-0410-b5e6-96231b3b80d8
ewline-eof.c
858a325e5f250c83409137c5609b162983ea6d1e 18-Jul-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Remember to add a has_feature macro for __underlying_type now that it is
correctly impelmented

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135401 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_type_traits.cpp
9f084a3166b684573ba49df28fc5792bc37d92e1 06-Jul-2011 John McCall <rjmccall@apple.com> Change the driver's logic about Objective-C runtimes: abstract out a
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.

The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_objc_arc.m
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_objc_arc.m
84ee2eeec9f63e4938bafd060105fa4f0c9cd89b 22-May-2011 Douglas Gregor <dgregor@apple.com> Audit and finish the implementation of C++0x nullptr, fixing two
minor issues along the way:
- Non-type template parameters of type 'std::nullptr_t' were not
permitted.
- We didn't properly introduce built-in operators for nullptr ==,
!=, <, <=, >=, or > as candidate functions .

To my knowledge, there's only one (minor but annoying) part of nullptr
that hasn't been implemented: catching a thrown 'nullptr' as a pointer
or pointer-to-member, per C++0x [except.handle]p4.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131813 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
d1aab5be8b24f5a65f6448be27020c453ec89019 20-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r131672 until __underlying_type is properly implemented in the
template case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131692 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_type_traits.cpp
0191b6b638ee57cc1108f427fc93d57e75ef7222 19-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a __has_feature for __underlying_type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131672 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_type_traits.cpp
c1b5fa41f09512c74030b9a2a0d1564535e22a76 13-May-2011 Peter Collingbourne <peter@pcc.me.uk> Introduce __has_extension macro

__has_extension is a function-like macro which takes the same set
of feature identifiers as __has_feature. It evaluates to 1 if the
feature is supported by Clang in the current language (either as a
language extension or a standard language feature) or 0 if not.

At the same time, add support for the C1X feature identifiers
c_generic_selections (renamed from generic_selections) and
c_static_assert, and document them.

Patch by myself and Jean-Daniel Dupas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131308 91177308-0d34-0410-b5e6-96231b3b80d8
as_extension.c
as_extension_cxx.cpp
as_feature_c1x.c
feb375d31b7e9108b04a9f55b721d5e0c793a558 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement the __is_trivially_copyable type trait

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131270 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_type_traits.cpp
a55e68b7f961d6ef4551c9be9ac18a1e25c7c927 12-May-2011 Howard Hinnant <hhinnant@apple.com> enable __has_feature(is_standard_layout)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131240 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_type_traits.cpp
c436708c65be210d2ab761a02df2b6c06bd0a85b 10-May-2011 Matt Beaumont-Gay <matthewbg@google.com> Change magic string "abc" to better magic string "qux".

Wait, what?

So, we run Clang (and LLVM) tests in an environment where the md5sum of the
input files becomes a component of the path. When testing the preprocessor,
the path becomes part of the output (in line directives). In this test, we
were grepping for the absence of "abc" in the output. When the stars aligned
properly, the md5sum component of the path contained "abc" and the test
failed. Oops.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131147 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e 05-May-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++0x alias templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
13d7dc04f3ae095c195446376df54fb2c8d4aead 21-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Have #pragma message not turn into error by -Werror, by default. Fixes rdar://9308989.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129916 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-message.c
a391a4642c5eb98aae606f2a2b7219b1a3619d11 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add __has_feature(cxx_range_for) check for C++11 range-based for loop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129573 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
6a4e73ccd0c51ae8a08b13d7693fb15d106c8522 03-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> clang has had full and tested support for C++0x trailing-return-type and auto type deduction since r126166. Update the website to reflect this, and add a __has_feature test.

trailing-return-type codegen is not tested yet (name mangling in particular).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128787 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
c8b9f7977094d0169ec59f9042e85ca854735299 25-Mar-2011 Anders Carlsson <andersca@mac.com> we can now claim to fully support the override control feature in C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128281 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
4561ecdf27b68d80b3cecc2d80ec32bea0ac2127 15-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Create __has_feature(cxx_noexcept) and mark it as working.
Find out that our C++0x status has only one field for noexcept expression and specification together, and that it was accidentally already marked as fully implemented.
This completes noexcept specification work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127701 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
738291eedac0f3f3628e34b0b32d6155f280fab2 20-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Turn on __has_feature(cxx_auto_type). The feature is now fully implemented.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126078 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
ff1ed985ede24b9a45e52d726db95767e35fe21e 16-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warn for missing terminating " or ' instead of error for gcc compatibility. Fixed rdar://8914293.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125616 91177308-0d34-0410-b5e6-96231b3b80d8
dar-8914293.c
0750800623dc6d14c4c0c721996ffd4210fcdff3 05-Feb-2011 Douglas Gregor <dgregor@apple.com> Add a __has_feature check for default template arguments in function
templates, a C++0x feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124973 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
afdf137c50f7f96ef865cf007f660dd663a8731f 03-Feb-2011 Douglas Gregor <dgregor@apple.com> Add __has_feature() for each of the type traits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124820 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_type_traits.cpp
56209ffed29ab82d0d65ac0d1d026fe179321afd 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Add __has_feature(cxx_reference_qualified_functions); update tests and
documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124322 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
c78e259a5fafd889f5945bc2c48fea48cb3ef9d0 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Clean up the C++0x __has_feature tests. Specifically:
- Don't publicize a C++0x feature through __has_feature if we aren't
in C++0x mode (even if the feature is available only with a
warning).
- "auto" is not implemented well enough for its __has_feature to be
turned on.
- Fix the test of C++0x __has_feature to actually test what we're
trying to test. Searching for the substring "foo" when our options
are "foo" and "no_foo" doesn't work :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124291 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
16cf8f5b6f582876b64e132715280fc473f876b9 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Downgrade the error about rvalue references to an extension warning
and turn on __has_feature(cxx_rvalue_references). The core rvalue
references proposal seems to be fully implemented now, pending lots
more testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124169 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
83d7781f9dc869022d48dbabde34dbfbd6f59a17 20-Jan-2011 Douglas Gregor <dgregor@apple.com> Eradicate any mention of C++0x concepts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123860 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
4c9131ac2d0a65cb7c0179d438ae56f7978ab012 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Variadic templates are fully implemented.

Turn on the __has_feature switch for variadic templates, document
their completion, and put the ExtWarn into the c++0x-extensions
warning group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123854 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
772cae552e425e0db29d559d0c2d7035c266091f 06-Jan-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Added testcase for commit r122963.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122964 91177308-0d34-0410-b5e6-96231b3b80d8
1-27-2007-FloatLiterals.c
23ef69d197ba3b5e9602f7161fee50990059502a 03-Dec-2010 Ted Kremenek <kremenek@apple.com> Fix diagnostic for reporting bad escape sequence.
Patch by Paul Curtis!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120759 91177308-0d34-0410-b5e6-96231b3b80d8
har-escapes.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
onstants.c
cae5095c116c29a4e52c91fa0ad88df09dd2b45f 20-Oct-2010 Anders Carlsson <andersca@mac.com> Add a __has_attribute macro that works much like __has_feature and __has_builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116906 91177308-0d34-0410-b5e6-96231b3b80d8
as_attribute.cpp
6be9f35ea55dda44a157bd19a05c1b51e382564d 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> tests: Force triple to avoid limited precision warning on win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116770 91177308-0d34-0410-b5e6-96231b3b80d8
dr-6096838-2.c
dr-6096838.c
ed7c308fac03da7168e167de15d231af8aed02a6 14-Oct-2010 Francois Pichet <pichet2000@gmail.com> r116509 fixed the Win32 XFAIL.

The failing was due to this:
1. preamble.c contains CR+LF new lines
2. write() is called with a buffer containing the original (CR+LF) to output the result on the console.
3. In text mode(the default), write() convert LF to CR+LF even if LF is preceded by CR, hence we have CR+CR+LF which filecheck interprets as 2 lines.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116513 91177308-0d34-0410-b5e6-96231b3b80d8
reamble.c
c637415a96c16abc7e28ef83c6c105716f7e8936 14-Oct-2010 Chris Lattner <sabre@nondot.org> allow I128 suffixes in msextensions mode just like i128 suffixes, patch
by Martin Vejnar!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116460 91177308-0d34-0410-b5e6-96231b3b80d8
s-extensions.c
59705aee3fe01aa6fb6962dd11350161b47983d9 09-Oct-2010 Nico Weber <nicolasweber@gmx.de> Add support for UCNs for character literals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116129 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
char.c
b6448943ba1fe01be7cd658437dacae9d2fee8a8 06-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Remove hard CRLF end-of-line markers from two files. These should be added
automatically when syncing due to the auto-props selecting svn:eol-style of
'native'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115758 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-message.c
a0f15b0848405ae16d63bd5d78c862a6526b338a 06-Oct-2010 Nico Weber <nicolasweber@gmx.de> Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115743 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
char.c
301669b381dfead44bda5ea3211d69ffec5a530b 27-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> Lexer: Implement GCC's version of pragma message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114814 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-message.c
37bf9d2bb74944c9d9a52522412bc077629977f1 24-Sep-2010 Anders Carlsson <andersca@mac.com> Allow the use of C++0x deleted functions as an extension in C++98.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114762 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
877649045da2bb56ac52a536dbedf5ca7fa13fae 14-Sep-2010 Douglas Gregor <dgregor@apple.com> Add __char16_t and __char32_t as aliases for the C++0x char16_t and
char32_t, respectively, but which can also be used in C++98/03
mode. Fixes <rdar://problem/8418510>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113813 91177308-0d34-0410-b5e6-96231b3b80d8
lang-keywords.cpp
xx0x_keyword_as_cxx98.cpp
fe6834af25d0809215c9e205c9983dd6d3f968b4 11-Sep-2010 Douglas Gregor <dgregor@apple.com> Make sure we're producing a newline in the preprocessed output before
emitting a #pragma, whenever one is needed. Fixes <rdar://problem/8417307>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113648 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-operators.cpp
80c60f72848896f867f6b7e664e7060d9e78f019 10-Sep-2010 Douglas Gregor <dgregor@apple.com> When we parse a pragma, keep track of how that pragma was originally
spelled (#pragma, _Pragma, __pragma). In -E mode, use that information
to add appropriate newlines when translating _Pragma and __pragma into
#pragma, like GCC does. Fixes <rdar://problem/8412013>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113553 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-operators.cpp
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
igraph.c
f6c09775819cf851d71750bfc056dfe39ce801e1 01-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement __has_feature(cxx_inline_namespaces)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112671 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
6ab55ebab20086f725c4017b48ef8d7691ef870f 31-Aug-2010 Chris Lattner <sabre@nondot.org> improve isHexaLiteral to work with escaped newlines and trigraphs,
patch by Francois Pichet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112602 91177308-0d34-0410-b5e6-96231b3b80d8
s-extensions.c
a75ec43d625753b4439b0d6f70bd988444c74617 30-Aug-2010 Douglas Gregor <dgregor@apple.com> In Microsoft compatibility mode, don't parse the exponent as part of
the pp-number in a hexadecimal floating point literal, from Francois
Pichet! Fixes PR7968.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112481 91177308-0d34-0410-b5e6-96231b3b80d8
s-extensions.c
295a637416d4bddf5b3d766d9f630a0028596176 19-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Test for PR7888.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111545 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
9a570b45480ce068ff243801b72ea605fe7c9fd3 22-Jul-2010 Daniel Dunbar <daniel@zuster.org> tests: Make FileCheck version check that preamble isn't longer than we expected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109077 91177308-0d34-0410-b5e6-96231b3b80d8
reamble.c
cf9f08ff9b75acd04521493f1b697fb9bec9ca8b 22-Jul-2010 Daniel Dunbar <daniel@zuster.org> tests: XFAIL this test on win32, someone else can hunt this one down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109044 91177308-0d34-0410-b5e6-96231b3b80d8
reamble.c
0286de6212626616e57a8f61807c40af4ee549a2 21-Jul-2010 Daniel Dunbar <daniel@zuster.org> tests: Use FileCheck instead of external input; I think this test was failing on
Win32 because of line ending differences.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109029 91177308-0d34-0410-b5e6-96231b3b80d8
nputs/preamble.txt
reamble.c
f033f1da4a34f8df6e95e9929dc04ff54bb8fb01 20-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new lexer function to compute the "preamble" of a file,
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108913 91177308-0d34-0410-b5e6-96231b3b80d8
nputs/preamble.txt
reamble.c
427c492d368d6ecf409fa8053eecb5cd0e779c5b 20-Jul-2010 Douglas Gregor <dgregor@apple.com> Complain when string literals are too long for the active language
standard's minimum requirements.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108622 91177308-0d34-0410-b5e6-96231b3b80d8
onstants-ms.c
s-extensions.c
9b3215d5aba6c687a3ee46b0f36367f416ac34cc 12-Jul-2010 Chris Lattner <sabre@nondot.org> change the 'invalid token after top level declarator' message to be
'expected ';' after top level declarator' which is much less vague.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108106 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
d80f786689d608e5c22d6e1045884de7aff76c40 08-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR4499, patch by Kyle Dean!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107836 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
9fde9c424f734e1ef45177999e3a04faad127414 29-Jun-2010 Daniel Dunbar <daniel@zuster.org> tests: Use %clangxx when using driver for C++, in case C++ support is disabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107153 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
as_feature_exceptions.cpp
as_feature_rtti.cpp
0b495cdb1939f8b9e8a470e138dba5204872c38c 25-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> A bug I've introduced in STDIN handling surfaced a few broken tests, fix them.

Lexer/hexfloat.cpp is now XFAIL'd, I'd appreciate if someone could look into it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106840 91177308-0d34-0410-b5e6-96231b3b80d8
exfloat.cpp
c304ba341a7daa88da42faf8f86310b764dd7b6a 22-May-2010 Chandler Carruth <chandlerc@gmail.com> Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104428 91177308-0d34-0410-b5e6-96231b3b80d8
nu_keywords.c
ac0f5e5ed0a45ac96a5958e5832e4bdb45734324 21-May-2010 Chris Lattner <sabre@nondot.org> Don't warn about use of hex floats in c++ mode by default,
matching G++'s behavior.

Warn when -pedantic or -Wc++-hex-floats is passed, and
don't warn if -pedantic -Wno-c++-hex-floats are both passed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104295 91177308-0d34-0410-b5e6-96231b3b80d8
exfloat.cpp
3d488990e13835cb35538b2f0cd53dbda92e36be 17-May-2010 Chris Lattner <sabre@nondot.org> robustify the conflict marker stuff. Don't add 7 twice, which would
make it miss (invalid) things like:
<<<<<<<
>>>>>>>

and crash if

<<<<<<<

was at the end of the line. When we find a >>>>>>> that is not at the
end of the line, make sure to reset Pos so we don't crash on something
like:
<<<<<<< >>>>>>>

This isn't worth making testcases for, since each would require a new file.

rdar://7987078 - signal 11 compiling "<<<<<<<<<<"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103968 91177308-0d34-0410-b5e6-96231b3b80d8
onflict-marker.c
e127a0d80155b45dafe77f2b4380e5fa111a3345 20-Apr-2010 Chris Lattner <sabre@nondot.org> push some source location information down through the compiler,
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8
tf-16.c
38caec48bc1c9816ca59b8d164a64447ee208c2e 20-Apr-2010 Chris Lattner <sabre@nondot.org> enhance sourcemgr to detect various UTF BOM's and emit a fatal error
about it instead of producing tons of garbage from the lexer.

It would be even better for sourcemgr to dynamically transcode (e.g.
from UTF16 -> UTF8).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101924 91177308-0d34-0410-b5e6-96231b3b80d8
tf-16.c
tf-16.c.txt
389980e3602820768714ef2123cb466db3e0d301 18-Apr-2010 Chandler Carruth <chandlerc@gmail.com> Add testcase that I forgot for r101667 for gnu-keywords.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101700 91177308-0d34-0410-b5e6-96231b3b80d8
nu_keywords.c
2a0d7574acaa3a8d516e9ae4b720755460ebe8a8 27-Feb-2010 John McCall <rjmccall@apple.com> At sabre's request, drop the FP bounds diagnostics down to warnings and file
them under -Wbad-literal. They're still on by default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97284 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
f57b820109c7f23b45ab6152a9eefc1f6b14eb38 22-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94236 91177308-0d34-0410-b5e6-96231b3b80d8
onstants-ms.c
a8be02b655b76e4dbe776b0c62bc3c450dc6feab 22-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> ui64, etc. are valid VS suffixes.
Fixes radar 7562363.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94224 91177308-0d34-0410-b5e6-96231b3b80d8
onstants-ms.c
1248451dcb59c2fe4353611395feb7f7251792bf 13-Jan-2010 Sean Hunt <rideau3@gmail.com> Update test function names so as not to use potential keywords.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93314 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
4ef4c6b232121dd611fc4ff9711052aaace635a3 13-Jan-2010 Sean Hunt <rideau3@gmail.com> Add a bunch more feature-checking macros for C++0x features. Some of these are
disabled with the intent that users can start with them now and not have to change
a thing to have them work when we implement the features.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93312 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_cxx0x.cpp
8c723404c34e9347fae473489194e8c200c4ac83 11-Jan-2010 Sean Hunt <rideau3@gmail.com> Do not parse hexadecimal floating point literals in C++0x mode because they are
incompatible with user-defined literals, specifically with the following form:

0x1p+1

The preprocessing-number token extends only as far as the 'p'; the '+' is not
included. Previously we could get away with this extension as p was an invalid
suffix, but now with user-defined literals, 'p' might well be a valid suffix
and we are forced to consider it as such.

This patch also adds a warning in non-0x C++ modes telling the user that
this extension is incompatible with C++0x that is enabled by default
(previously and with other languages, we warn only with a compliance
option such as -pedantic).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93135 91177308-0d34-0410-b5e6-96231b3b80d8
exfloat.cpp
e030358cc06e1cbce3c2e00ca67c946f9164b2a8 09-Jan-2010 Chris Lattner <sabre@nondot.org> add a bunch of missing prototypes to tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93072 91177308-0d34-0410-b5e6-96231b3b80d8
umeric-literal-trash.c
94c939dc1d4958b62ea5a89294dd8b2905f3191f 24-Dec-2009 John McCall <rjmccall@apple.com> Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92127 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
a2bf105739cef7aea8e4d219629c627fcd11742e 17-Dec-2009 Chris Lattner <sabre@nondot.org> reimplement r90860, fixing a couple of problems:
1. Don't make a copy of LangOptions every time a lexer is created.
2. Don't make CharInfo global mutable state.
3. Fix the implementation to properly treat ^Z as EOF instead of as
horizontal whitespace, which matches the semantic implemented by VC++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91586 91177308-0d34-0410-b5e6-96231b3b80d8
sdos-cpm-eof.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
omment-escape.c
ounter.c
as_feature_exceptions.cpp
as_feature_rtti.cpp
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
1-27-2007-FloatLiterals.c
adstring_in_if0.c
lock_cmt_end.c
90.c
har-escapes.c
onflict-marker.c
onstants-ms.c
onstants.c
xx0x_keyword.cpp
xx0x_keyword_as_cxx98.cpp
igraph.c
ollar-idents.c
scape_newline.c
sdos-cpm-eof.c
ultiple-include.c
umeric-literal-trash.c
ragma-mark.c
dr-6096838-2.c
dr-6096838.c
oken-concat-2.c
oken-concat.c
nknown-char.c
34f349da38a7bd99103e12d8ea6c73bc8d025193 14-Dec-2009 Chris Lattner <sabre@nondot.org> teach clang to recover gracefully from conflict markers left in source
files: PR5238.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91270 91177308-0d34-0410-b5e6-96231b3b80d8
onflict-marker.c
7b682656310b0d7e94a98d982444bc7ddedc653f 08-Dec-2009 Steve Naroff <snaroff@apple.com> Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=80043



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90860 91177308-0d34-0410-b5e6-96231b3b80d8
sdos-cpm-eof.c
7d9bd4257f817494b2fa5b310df05807050a9c18 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Add 'has_feature(cxx_exceptions)' to allow code to determine via preprocessor logic if C++ exceptions are enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90378 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_exceptions.cpp
2eca546c5836938dff3a517fbe43f266073215ab 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Rename has_feature(rtti) to has_feature(cxx_rtti) for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90376 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_rtti.cpp
107b4cae9be7dc59315e28f65b555cb2bd5f4574 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Add FileCheck test for '__has_feature(rtti)'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90373 91177308-0d34-0410-b5e6-96231b3b80d8
as_feature_rtti.cpp
6e8c7acb61b2c7f421d6e1aba8a7a84e96ab6981 28-Nov-2009 Nuno Lopes <nunoplopes@sapo.pt> cleanup parsing of MS integer suffixes a little. this fixes PR5616
btw, I believe that isMicrosoftInteger can go away; it's not read anywhere

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90036 91177308-0d34-0410-b5e6-96231b3b80d8
onstants-ms.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
igraph.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
lock_cmt_end.c
ounter.c
ollar-idents.c
scape_newline.c
dr-6096838.c
oken-concat.c
d8ac05753dc4506224d445ff98399c01da3136e5 03-Nov-2009 John McCall <rjmccall@apple.com> Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85924 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
5e517c85b2e4873d33f0ba4d6394896300730bc5 13-Oct-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Converted to use FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84005 91177308-0d34-0410-b5e6-96231b3b80d8
1-27-2007-FloatLiterals.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
omment-escape.c
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
ollar-idents.c
8849f1190330c493a89b0088557d1a2333465847 15-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4395: Don't detect token concatenation in C mode for
C++-specific tokens.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73408 91177308-0d34-0410-b5e6-96231b3b80d8
oken-concat-2.c
3c54801fbc67d8df2fed0711a2e2022db6b1bbcf 10-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4353: Add support for \E as a character escape.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73153 91177308-0d34-0410-b5e6-96231b3b80d8
har-escapes.c
e8fa06e07363b6d5e6c371bbd454d51bab78d01d 12-May-2009 Chris Lattner <sabre@nondot.org> accept "#pragma clang foo" where we accept "#pragma GCC foo".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71572 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
e3ad881e4e9620e941dabd4e78dacdb028b85682 28-Apr-2009 Chris Lattner <sabre@nondot.org> Implement -Wfour-char-constants, which is an extension, not an extwarn,
and apparently not part of -Wall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70329 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
b77f41e66f736e9e67a9d39c47c747804b22c6b9 28-Apr-2009 Chris Lattner <sabre@nondot.org> implement -Wmultichar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70315 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
2dec3a1aa161fdd4a8dd650eee522c020490732f 28-Apr-2009 Chris Lattner <sabre@nondot.org> merge number.c into constants.c and start running it in -verify mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70310 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
umber.c
c1f9d828c733ec1eba06d01070735d1f36fda733 13-Apr-2009 Chris Lattner <sabre@nondot.org> implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
ounter.c
c199ab3ea1381e8e9cdd720eb87bb4f65cdf5086 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement the first set of changes for PR3963 and rdar://6759604,
which tries to do better error recovery when it is "obvious" that an
identifier is a mis-typed typename. In this case, we try to parse
it as a typename instead of as the identifier in a declarator, which
gives us several options for better error recovery and immediately
makes diagnostics more useful. For example, we now produce:

t.c:4:8: error: unknown type name 'foo_t'
static foo_t a = 4;
^

instead of:

t.c:4:14: error: invalid token after top level declarator
static foo_t a = 4;
^

Also, since we now parse "a" correctly, we make a decl for it,
preventing later uses of 'a' from emitting things like:

t.c:12:20: error: use of undeclared identifier 'a'
int bar() { return a + b; }
^

I'd really appreciate any scrutiny possible on this, it
is a tricky area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68911 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
ead616c5d8681a41b11273327813e61bda01907a 05-Apr-2009 Chris Lattner <sabre@nondot.org> fix rdar://6757323, where an escaped newline in a // comment
was causing the char after the newline to get eaten.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68430 91177308-0d34-0410-b5e6-96231b3b80d8
omment-escape.c
81048aa3e5cbce181a850e2b2a8e266e4386347a 03-Apr-2009 Mike Stump <mrs@apple.com> Move the rest of the fixit tests to the FixIt area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68349 91177308-0d34-0410-b5e6-96231b3b80d8
ixit-errors.c
8e7ec66b164dc139cd4f648c51e9506eb3a50eb7 03-Apr-2009 Mike Stump <mrs@apple.com> Update wording.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68347 91177308-0d34-0410-b5e6-96231b3b80d8
ixit-errors.c
20d0ee5d23c0f0e879ce1711d11df3118b3fb033 02-Apr-2009 Mike Stump <mrs@apple.com> A code modification hint for files that don't end in a newline.
Eventually, would be nice to be able to run these modifications even
when we don't want the warning or errors for the actual diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68272 91177308-0d34-0410-b5e6-96231b3b80d8
ixit-errors.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
1-27-2007-FloatLiterals.c
adstring_in_if0.c
lock_cmt_end.c
90.c
onstants.c
xx0x_keyword.cpp
xx0x_keyword_as_cxx98.cpp
igraph.c
ollar-idents.c
scape_newline.c
ultiple-include.c
umber.c
umeric-literal-trash.c
ragma-mark.c
dr-6096838-2.c
dr-6096838.c
oken-concat.c
nknown-char.c
1ab10d45bf7669a299a20021fa5c69845d9f0ee0 22-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Don't use &> in tests; dash doesn't understand it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67483 91177308-0d34-0410-b5e6-96231b3b80d8
ollar-idents.c
99c7622d1f673e8929196cc6eec7825a42622d5f 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix -E mismatch; an identifier followed by a numeric constant does not
require a space (to avoid concatenation) if the numeric constant had a
leading period.
- PR3819.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67163 91177308-0d34-0410-b5e6-96231b3b80d8
oken-concat.c
85c491064b33e8d407166256a9e639bc1fcad4ef 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Don't accept '$' in identifiers in assembler-with-cpp mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67013 91177308-0d34-0410-b5e6-96231b3b80d8
ollar-idents.c
9d4857d191f6bf83f4d9cb0465a20234ef612ada 08-Mar-2009 Chris Lattner <sabre@nondot.org> this test isn't testing anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66389 91177308-0d34-0410-b5e6-96231b3b80d8
reprocess-compat.c
51a75d0cc7651753399efdc3176feaee6214c3ca 27-Feb-2009 Chris Lattner <sabre@nondot.org> change a diagnostic message from something pedantically correct but
useless to something more vague but hopefully more clear.
rdar://6624173


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65639 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
8402c73dd880e8af46c826d873681820aebe32eb 16-Jan-2009 Chris Lattner <sabre@nondot.org> Fix PR2477 - clang misparses "//*" in C89 mode



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62368 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
bc3e9842212b78bcf49682641307e4f3419ecc5e 12-Dec-2008 Chris Lattner <sabre@nondot.org> rdar://6060752 - don't warn about trigraphs in bcpl-style comments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60942 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
c21f1a73b9a3b2a201a370b642125e34a99cfb09 21-Nov-2008 Chris Lattner <sabre@nondot.org> split into two tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59770 91177308-0d34-0410-b5e6-96231b3b80d8
dr-6096838-2.c
dr-6096838.c
eb83ecde1a822b1c38cd060a85a08c1ac9f82cf8 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_keyword.cpp
5313ebce376bc5e8899dd12e39ff4b908b2b11fe 05-Sep-2008 Daniel Dunbar <daniel@zuster.org> Test case for previous commit (Workaround gcc bug causing crash on our
preprocessed outputs)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55826 91177308-0d34-0410-b5e6-96231b3b80d8
reprocess-compat.c
ea644d8440479359ea2480d458e3751a6bfae123 03-Sep-2008 Ted Kremenek <kremenek@apple.com> Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' is
specified, or -std is set to a conforming mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55738 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
scape_newline.c
6f7adbdcd07a6c13cb81bf3048d1e52f149a9377 02-Sep-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2750; don't check for an 'e' in the trash after the token.

Note that this isn't really a complete fix; I think there are other
potential overrun situations. I don't really know what the best
systematic fix is, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55622 91177308-0d34-0410-b5e6-96231b3b80d8
umeric-literal-trash.c
806c3b9478b44dec77d28f3de987f793d42ad555 25-Jul-2008 Chris Lattner <sabre@nondot.org> update this testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54037 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
4f97e019ba54c2258f171a81da6fb587641ed415 25-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add test case for hex floating point constants in < C99 mode
- For: rdar://6096838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54036 91177308-0d34-0410-b5e6-96231b3b80d8
dr-6096838.c
b081a350b5cad21e5cbea74c618701e8b839c4f6 03-Jul-2008 Chris Lattner <sabre@nondot.org> Fix PR2252: don't warn on negating an unsigned value ever, and don't emit
'integer constant is so large that it is unsigned' warning for hex literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53070 91177308-0d34-0410-b5e6-96231b3b80d8
umber.c
413d355e38755a71f106dbc0ac900ca989070916 30-Jun-2008 Chris Lattner <sabre@nondot.org> Fix a bug reported by Kelly Wilson, where we incorrectly
rejected FP immediates like 08.123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52890 91177308-0d34-0410-b5e6-96231b3b80d8
umber.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
1-27-2007-FloatLiterals.c
8891184b232879b80350fec7e2e7a6ce2f25c9fd 10-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix the run line for this test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52169 91177308-0d34-0410-b5e6-96231b3b80d8
igraph.c
e3eac778a7085006c86f46e62a457014c8f32555 10-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Make this test C instead of C++; making it C++ causes a failure on Linux
because clang can't parse stdio.h in C++ mode yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52168 91177308-0d34-0410-b5e6-96231b3b80d8
igraph.c
igraph.cpp
0049db6ce127cbf4671a6a81ad4dfe61fdc4aa5c 01-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51843 91177308-0d34-0410-b5e6-96231b3b80d8
ultiple-include.c
146ccd44ecde4fd5a28749a694f786e75efe6e62 24-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR2090, a typo in digraph processing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47540 91177308-0d34-0410-b5e6-96231b3b80d8
igraph.cpp
e66b65c3a3377d487104f6adc071d054b0d9d343 06-Feb-2008 Chris Lattner <sabre@nondot.org> pull .ll and .bc writing out of the ASTConsumer destructors into some top
level code in clang. This is a cleanup, but does implement "-o" for
-emit-llvm. One effect of this is that "clang foo.c -emit-llvm" will now
emit into foo.ll instead of stdout. Use "clang foo.c -emit-llvm -o -" or
"clang < foo.c -emit-llvm" to get the old behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46791 91177308-0d34-0410-b5e6-96231b3b80d8
1-27-2007-FloatLiterals.c
2243449253475574fc6f14986ff8f7fce5d46799 19-Dec-2007 Chris Lattner <sabre@nondot.org> Add support for #pragma mark, which shouldn't warn about bogus tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45212 91177308-0d34-0410-b5e6-96231b3b80d8
ragma-mark.c
fbd91735c8c9f5aa8c569cfb2acf1ddf8166eee3 30-Nov-2007 Christopher Lamb <christopher.lamb@gmail.com> Doh! Check in this long overdue test fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44450 91177308-0d34-0410-b5e6-96231b3b80d8
1-27-2007-FloatLiterals.c
016765e3453db2e302efe53905e99cdb25501234 29-Nov-2007 Christopher Lamb <christopher.lamb@gmail.com> Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44431 91177308-0d34-0410-b5e6-96231b3b80d8
1-27-2007-FloatLiterals.c
f5f20bdf918cedb47fdd33f5b634f4908cdd3f15 26-Nov-2007 Bill Wendling <isanbard@gmail.com> The checking for the delimiters of expected error/warning messages was
looking only for { and } instead of {{ and }}. Changed it to check for
this explicitly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44326 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_keyword.cpp
921e9ff0301fcc4d389cef16b84adc97229ed5e0 14-Nov-2007 Chris Lattner <sabre@nondot.org> Fix a bug handling hex floats in c90 mode, pointed out by Neil.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44120 91177308-0d34-0410-b5e6-96231b3b80d8
90.c
3b427b3ba518f7a7293458c2d3d92eebd8458d87 11-Oct-2007 Chris Lattner <sabre@nondot.org> rename -parse-ast-print to -ast-print
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42852 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
onstants.c
xx0x_keyword.cpp
9f3d942e9970bc8f51add390b2a2c46b5a2ab747 26-Sep-2007 Ted Kremenek <kremenek@apple.com> Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42365 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
onstants.c
xx0x_keyword.cpp
8146b6851e873eab71341f1b1d3198894bc4c0ac 22-Jul-2007 Chris Lattner <sabre@nondot.org> Fix a lexer bug where we incorrectly rejected
int i = /*/ */ 1;

Thanks to Neil for pointing this out.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40379 91177308-0d34-0410-b5e6-96231b3b80d8
lock_cmt_end.c
136f93a2b660fc780fc2dba82a6f42ca4dc9164a 16-Jul-2007 Chris Lattner <sabre@nondot.org> Make octal constant lexing use AdvanceToTokenCharacter to give more
accurate diagnostics. For test/Lexer/comments.c we now emit:

int x = 000000080; /* expected-error {{invalid digit}} */
^
constants.c:7:4: error: invalid digit '8' in octal constant
00080; /* expected-error {{invalid digit}} */
^


The last line is due to an escaped newline. The full line looks like:

int y = 0000\
00080; /* expected-error {{invalid digit}} */


Previously, we emitted:
constants.c:4:9: error: invalid digit '8' in octal constant
int x = 000000080; /* expected-error {{invalid digit}} */
^
constants.c:6:9: error: invalid digit '8' in octal constant
int y = 0000\
^

which isn't too bad, but the new way is better for the user,
regardless of whether there is an escaped newline or not.

All the other lexer-related diagnostics should switch over
to using AdvanceToTokenCharacter where appropriate. Help
wanted :).

This implements test/Lexer/constants.c.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39906 91177308-0d34-0410-b5e6-96231b3b80d8
onstants.c
d4b80f1a0e946aa38c5db7d6f8afcdf05ed57116 16-Jul-2007 Chris Lattner <sabre@nondot.org> Add support for C++'0x keywords, patch by Doug Gregor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39897 91177308-0d34-0410-b5e6-96231b3b80d8
xx0x_keyword.cpp
xx0x_keyword_as_cxx98.cpp
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
adstring_in_if0.c
lock_cmt_end.c
scape_newline.c
umber.c
nknown-char.c