[all-commits] [llvm/llvm-project] 739b41: Add a warning, flags and pragmas to limit the numb...
Hans via All-commits
all-commits at lists.llvm.org
Mon Jan 27 07:04:32 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 739b410f1ff51d507830774320c2db3a80d8610d
https://github.com/llvm/llvm-project/commit/739b410f1ff51d507830774320c2db3a80d8610d
Author: Hans Wennborg <hans at chromium.org>
Date: 2020-01-27 (Mon, 27 Jan 2020)
Changed paths:
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticParseKinds.td
M clang/include/clang/Basic/LangOptions.def
M clang/include/clang/Driver/Options.td
M clang/include/clang/Lex/Preprocessor.h
M clang/include/clang/Parse/Parser.h
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Frontend/CompilerInvocation.cpp
M clang/lib/Lex/Preprocessor.cpp
M clang/lib/Parse/ParsePragma.cpp
M clang/lib/Parse/Parser.cpp
M clang/test/Driver/autocomplete.c
A clang/test/Parser/max-tokens.cpp
Log Message:
-----------
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
More information about the All-commits
mailing list