llvm-project/clang/test/Lexer
Erik Verbruggen b34c79ff27 Allow for unfinished #if blocks in preambles
Previously, a preamble only included #if blocks (and friends like
ifdef) if there was a corresponding #endif before any declaration or
definition. The problem is that any header file that uses include guards
will not have a preamble generated, which can make code-completion very
slow.

To prevent errors about unbalanced preprocessor conditionals in the
preamble, and unbalanced preprocessor conditionals after a preamble
containing unfinished conditionals, the conditional stack is stored
in the pch file.

This fixes PR26045.

Differential Revision: http://reviews.llvm.org/D15994

llvm-svn: 304207
2017-05-30 11:54:55 +00:00
..
Inputs Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths. 2016-06-13 20:40:21 +00:00
11-27-2007-FloatLiterals.c
asm-preproc-no-unicode.s Skip Unicode character expansion in assembly files 2017-04-07 10:13:00 +00:00
badstring_in_if0.c
bcpl-escaped-newline.c
block_cmt_end.c
builtin_redef.c
c90.c
case-insensitive-include-ms.c Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths. 2016-06-13 20:40:21 +00:00
case-insensitive-include-pr31836.sh Fix for pr31836 - pp_nonportable_path on absolute paths: broken delimiters 2017-02-21 22:30:55 +00:00
case-insensitive-include.c Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths. 2016-06-13 20:40:21 +00:00
case-insensitive-system-include.c Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths. 2016-06-13 20:40:21 +00:00
char-escapes.c
char-literal-encoding-error.c
char-literal.cpp
comment-escape.c
conflict-marker.c
constants.c
coroutines.cpp [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts 2016-10-02 03:31:58 +00:00
counter.c
cross-windows-on-linux-default.cpp
cross-windows-on-linux.cpp
cxx-features.cpp [coroutines] Bump __cpp_coroutines version 2017-05-25 14:58:46 +00:00
cxx0x_keyword_as_cxx98.cpp [Tests] Add explicit -std=lang option to a number of tests. 2015-08-01 02:55:59 +00:00
cxx0x_raw_string_delim_length.cpp
cxx0x_raw_string_directives.cpp
cxx0x_raw_string_unterminated.cpp
cxx1y_binary_literal.cpp
cxx1y_digit_separators.cpp Update diagnostics now that hexadecimal literals look likely to be part of C++17. 2016-03-04 22:32:06 +00:00
cxx1z-trigraphs.cpp Do not warn about whitespace between ??/ trigraph and newline in line comments if trigraphs are disabled in the current language. 2017-04-18 21:45:04 +00:00
digraph.c
dollar-idents.c
eof-char.c
eof-conflict-marker.c [Lexer] Don't read out of bounds if a conflict marker is at the end of a file 2016-04-01 09:58:45 +00:00
eof-file.c
eof-include.c Fix buffer overflow in Lexer 2015-05-04 22:30:29 +00:00
eof-number.c [lex] Don't read past the end of the buffer 2015-03-29 14:11:37 +00:00
eof-string.c
escape_newline.c
gnu-flags.c
half-literal.cpp [OpenCL] Added half type literal with suffix h. 2016-02-17 11:34:37 +00:00
has_attribute_objc_boxable.m Add missing files for objc_boxable feature. 2015-07-23 14:45:41 +00:00
has_extension.c
has_extension_cxx.cpp Have '__have_extension(cxx_variadic_templates)' return true for any C++ standard. 2015-05-12 22:37:23 +00:00
has_feature_address_sanitizer.cpp [ASan] Initial support for Kernel AddressSanitizer 2015-06-19 12:19:07 +00:00
has_feature_boxed_nsvalue_expressions.m Add missing files for objc_boxable feature. 2015-07-23 14:45:41 +00:00
has_feature_c1x.c
has_feature_cxx0x.cpp P0426: Make the library implementation of constexpr char_traits a little easier 2017-01-20 00:45:35 +00:00
has_feature_efficiency_sanitizer.cpp [esan|wset] Add working set tool driver flags 2016-05-25 00:41:24 +00:00
has_feature_exceptions.cpp
has_feature_memory_sanitizer.cpp
has_feature_modules.m
has_feature_objc_arc.m
has_feature_rtti.cpp Turn off __has_feature(cxx_rtti) when -fno-rtti-data is present 2015-08-13 17:56:49 +00:00
has_feature_thread_sanitizer.cpp
has_feature_type_traits.cpp Revert "[Lex] Support more type-traits in __has_feature" 2016-05-24 17:21:42 +00:00
header.cpp
hexfloat.cpp Update diagnostics now that hexadecimal literals look likely to be part of C++17. 2016-03-04 22:32:06 +00:00
keywords_test.c Add -f[no-]declspec to control recognition of __declspec as a keyword 2015-10-04 17:51:05 +00:00
keywords_test.cpp Add -f[no-]declspec to control recognition of __declspec as a keyword 2015-10-04 17:51:05 +00:00
long-long.cpp
modules-ts.cpp Add -fmodules-ts flag to cc1 for the provisional C++ modules TS, and mark 2016-07-23 02:32:21 +00:00
ms-compatibility.c
ms-extensions.c [MS Extensions] Remove support for the i128 integer literal suffix 2015-07-26 09:02:26 +00:00
ms-extensions.cpp [Tests] Add explicit -std=lang option to a number of tests. 2015-08-01 02:55:59 +00:00
msdos-cpm-eof.c Fix test from r256596 2015-12-29 23:23:38 +00:00
multiple-include.c
newline-eof-c++98-compat.cpp
newline-eof.c
newline-nul.c Fix mishandling of escaped newlines followed by newlines or nuls. 2017-04-17 23:44:51 +00:00
numeric-literal-trash.c
objc_macros.m In Objective-C, ignore attempts to redefine the ARC/GC qualifier macros. 2015-12-10 23:31:01 +00:00
opencl-half-literal.cl [OpenCL] Add supported OpenCL extensions to target info. 2016-05-16 17:06:34 +00:00
pragma-mark.c
pragma-message.c
pragma-message2.c
pragma-operators.cpp
pragma-region.c
preamble.c Allow for unfinished #if blocks in preambles 2017-05-30 11:54:55 +00:00
preamble2.c Allow for unfinished #if blocks in preambles 2017-05-30 11:54:55 +00:00
rdar-8914293.c
rdr-6096838-2.c
rdr-6096838.c
string-literal-encoding.c
string-literal-errors.cpp
string_concat.cpp
token-concat.c
token-concat.cpp
unicode-strings.c
unicode.c Add test that we correctly allow some non-letter unicode characters in 2015-09-19 02:14:12 +00:00
unknown-char.c
utf-16.c
utf-16.c.txt
utf8-char-literal.cpp
utf8-invalid.c
warn-date-time.c
warn_binary_literals.cpp Split off the binary literal warning into a subgroup of C++14 warnings 2015-09-18 23:18:39 +00:00
wchar-signedness.c
wchar.c