llvm-project/clang/lib/Lex
Hans Wennborg 739b410f1f Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit
See
https://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview
for background discussion.

This adds a warning, flags and pragmas to limit the number of
pre-processor tokens either at a certain point in a translation unit, or
overall.

The idea is that this would allow projects to limit the size of certain
widely included headers, or for translation units overall, as a way to
insert backstops for header bloat and prevent compile-time regressions.

Differential revision: https://reviews.llvm.org/D72703
2020-01-27 16:04:17 +01:00
..
CMakeLists.txt Add clang source minimizer that reduces source to directives 2019-06-03 22:59:17 +00:00
DependencyDirectivesSourceMinimizer.cpp [clang-scan-deps] do not skip empty #if/#elif in the minimizer to avoid missing `__has_include` dependencies 2019-12-02 18:47:22 -08:00
HeaderMap.cpp FileManager: Use llvm::Expected in new getFileRef API 2019-08-26 18:29:51 +00:00
HeaderSearch.cpp [Stats] Convert some ad-hoc header search stats to ALWAYS_ENABLED_STATISTIC. 2019-10-11 18:22:34 +00:00
Lexer.cpp [Lexer] Allow UCN for dollar symbol '\u0024' in identifiers when using -fdollars-in-identifiers flag. 2020-01-15 11:28:57 +00:00
LiteralSupport.cpp [APFloat] Fix checked error assert failures 2020-01-09 09:42:32 +02:00
MacroArgs.cpp Remove cache for macro arg stringization 2019-07-30 17:58:22 +00:00
MacroInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleMap.cpp ModuleMap::findHeader - fix null dereference warning. NFCI. 2019-11-03 11:33:57 +00:00
PPCaching.cpp [Lex] Allow to consume tokens while preprocessing 2019-05-17 09:32:05 +00:00
PPCallbacks.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPConditionalDirectiveRecord.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
PPDirectives.cpp Detect source location overflow due includes 2020-01-24 23:56:47 +00:00
PPExpressions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPLexerChange.cpp [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr. 2019-09-13 17:39:31 +00:00
PPMacroExpansion.cpp Fix tests on Windows after D49466 2019-11-26 16:15:39 -08:00
Pragma.cpp clang/Modules: Refactor CompilerInstance::loadModule, NFC 2019-11-22 18:23:47 -08:00
PreprocessingRecord.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
Preprocessor.cpp Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit 2020-01-27 16:04:17 +01:00
PreprocessorLexer.cpp Factor out repeated code parsing and concatenating header-names from 2019-03-19 01:51:19 +00:00
ScratchBuffer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenConcatenation.cpp [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +00:00
TokenLexer.cpp Remove cache for macro arg stringization 2019-07-30 17:58:22 +00:00
UnicodeCharSets.h clang: Fix typo in comment 2019-08-21 15:41:29 +00:00