[PATCH] D70183: Detect source location overflow due includes
Diogo N. Sampaio via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 17 10:51:56 PST 2020
dnsampaio updated this revision to Diff 238825.
dnsampaio added a comment.
Rebased
Created a early exit when a source location overflow is detected,
avoiding further processing or reaching other assert failures.
For that, it was required to create a 'Failure' kind for includes,
as well add return points along the callstack.
Added test that works in both release and debug modes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70183/new/
https://reviews.llvm.org/D70183
Files:
clang/include/clang/Basic/DiagnosticCommonKinds.td
clang/include/clang/Lex/Preprocessor.h
clang/lib/Basic/SourceManager.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/Preprocessor.cpp
clang/test/Lexer/Inputs/inc1.h
clang/test/Lexer/Inputs/inc2.h
clang/test/Lexer/SourceLocationsOverflow.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70183.238825.patch
Type: text/x-patch
Size: 134831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200117/d308edf4/attachment-0001.bin>
More information about the cfe-commits
mailing list