| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
so this code is
totally unnecessary.
llvm-svn: 108199
|
|
|
|
|
|
| |
tok::eofs.
llvm-svn: 108175
|
|
|
|
|
|
|
|
|
|
| |
In the case of backtracking, the cached token lexer will be the only
lexer on the stack, without this the token stack will be empty and EOF
won't be returned.
This fixes PR7072.
llvm-svn: 108124
|
|
|
|
| |
llvm-svn: 107836
|
|
|
|
| |
llvm-svn: 106950
|
|
|
|
|
|
| |
target specific preprocessor define as well.
llvm-svn: 106715
|
|
|
|
|
|
|
|
|
|
| |
Fix string concatenation to treat escapes in concatenated strings that
are wide because of other string chunks to process the escapes as wide
themselves. Before we would warn about and miscompile the attached testcase.
This fixes rdar://8040728 - miscompile + warning: hex escape sequence out of range
llvm-svn: 106012
|
|
|
|
| |
llvm-svn: 105830
|
|
|
|
|
|
|
|
| |
wouldn't have their
associated SmallVectors get deallocated.
llvm-svn: 105658
|
|
|
|
|
|
| |
scattered throughout the project Makefiles.
llvm-svn: 105638
|
|
|
|
|
|
| |
- This eliminates most dependencies on how Clang is installed relative to LLVM.
llvm-svn: 105637
|
|
|
|
|
|
| |
been processed, so they don't have to be tip-toed around.
llvm-svn: 105182
|
|
|
|
|
|
| |
literal. Fixes <rdar://problem/8044135>.
llvm-svn: 105181
|
|
|
|
|
|
| |
(radar 8020384)
llvm-svn: 104996
|
|
|
|
|
|
|
|
| |
diagnostics. That would be while we're parsing string literals for the
sole purpose of producing a diagnostic about them. Fixes
<rdar://problem/8026030>.
llvm-svn: 104684
|
|
|
|
|
|
|
|
|
|
|
| |
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.
llvm-svn: 104585
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 "<<<<<<<<<<"
llvm-svn: 103968
|
|
|
|
|
|
|
|
| |
a missing */ since we truncated the file.
This fixes rdar://7948776
llvm-svn: 103913
|
|
|
|
| |
llvm-svn: 102588
|
|
|
|
| |
llvm-svn: 102587
|
|
|
|
|
|
|
|
| |
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.
llvm-svn: 101939
|
|
|
|
|
|
| |
Zhanyong Wan!
llvm-svn: 101813
|
|
|
|
| |
llvm-svn: 101580
|
|
|
|
| |
llvm-svn: 101226
|
|
|
|
|
|
| |
when avoiding paste. Patch by David Peixotto!
llvm-svn: 101218
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in an input file like this:
# 42
int x;
we were emitting:
# <something>
int x;
(with a space before the int) because we weren't clearing the leading
whitespace flag properly after the \n from the directive was handled.
llvm-svn: 101084
|
|
|
|
| |
llvm-svn: 100484
|
|
|
|
|
|
| |
the C-only "optimization".
llvm-svn: 100022
|
|
|
|
| |
llvm-svn: 100018
|
|
|
|
|
|
|
| |
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.
llvm-svn: 100008
|
|
|
|
|
|
| |
Abramo Bagnara!
llvm-svn: 99626
|
|
|
|
|
|
| |
form a >>=. Patch by Abramo Bagnara, testcase by me.
llvm-svn: 99624
|
|
|
|
|
|
| |
DependencyFile to not do work in its destructor.
llvm-svn: 99257
|
|
|
|
|
|
|
|
| |
instantiations when we have the corresponding macro definition and by
removing macro definition information from our table when the macro is
undefined.
llvm-svn: 99004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
record (which includes all macro instantiations and definitions). As
with all lay deserialization, this introduces a new external source
(here, an external preprocessing record source) that loads all of the
preprocessed entities prior to iterating over the entities.
The preprocessing record is an optional part of the precompiled header
that is disabled by default (enabled with
-detailed-preprocessing-record). When the preprocessor given to the
PCH writer has a preprocessing record, that record is written into the
PCH file. When the PCH reader is given a PCH file that contains a
preprocessing record, it will be lazily loaded (which, effectively,
implicitly adds -detailed-preprocessing-record). This is the first
case where we have sections of the precompiled header that are
added/removed based on a compilation flag, which is
unfortunate. However, this data consumes ~550k in the PCH file for
Cocoa.h (out of ~9.9MB), and there is a non-trivial cost to gathering
this detailed preprocessing information, so it's too expensive to turn
on by default. In the future, we should investigate a better encoding
of this information.
llvm-svn: 99002
|
|
|
|
|
|
|
|
| |
eliminating the extra PopulatePreprocessingRecord object. This will
become useful once we start writing the preprocessing record to
precompiled headers.
llvm-svn: 98966
|
|
|
|
|
|
| |
tie its creation to a CC1 flag -detailed-preprocessing-record.
llvm-svn: 98963
|
|
|
|
|
|
|
|
| |
preprocessing record. Use that link with clang_getCursorReferenced()
and clang_getCursorDefinition() to match instantiations of a macro to
the definition of the macro.
llvm-svn: 98842
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the macro definitions and macro instantiations that are found
during preprocessing. Preprocessing records are *not* generated by
default; rather, we provide a PPCallbacks subclass that hooks into the
existing callback mechanism to record this activity.
The only client of preprocessing records is CIndex, which keeps track
of macro definitions and instantations so that they can be exposed via
cursors. At present, only token annotation uses these facilities, and
only for macro instantiations; both will change in the near
future. However, with this change, token annotation properly annotates
macro instantiations that do not produce any tokens and instantiations
of macros that are later undef'd, improving our consistency.
Preprocessing directives that are not macro definitions are still
handled by clang_annotateTokens() via re-lexing, so that we don't have
to track every preprocessing directive in the preprocessing record.
Performance impact of preprocessing records is still TBD, although it
is limited to CIndex and therefore out of the path of the main compiler.
llvm-svn: 98836
|
|
|
|
|
|
| |
source file has been changed. Handle that failure more gracefully.
llvm-svn: 98727
|
|
|
|
| |
llvm-svn: 98691
|
|
|
|
|
|
| |
recovery for those that need it.
llvm-svn: 98689
|
|
|
|
|
|
| |
them to recover more gracefully on failure.
llvm-svn: 98672
|
|
|
|
|
|
|
| |
SourceManager versions), updating those callers that need to recover
gracefully from failure.
llvm-svn: 98665
|
|
|
|
|
|
| |
errors
llvm-svn: 98664
|
|
|
|
|
|
| |
const char*.
llvm-svn: 98630
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SourceManager's getBuffer() and, therefore, could fail, along with
Preprocessor::getSpelling(). Use the Invalid parameters in the literal
parsers (string, floating point, integral, character) to make them
robust against errors that stem from, e.g., PCH files that are not
consistent with the underlying file system.
I still need to audit every use caller to all of these routines, to
determine which ones need specific handling of error conditions.
llvm-svn: 98608
|
|
|
|
|
|
| |
simplifying the SourceManager interfaces somewhat.
llvm-svn: 98598
|
|
|
|
|
|
| |
and start simplifying the interfaces in SourceManager that can fail.
llvm-svn: 98594
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.
Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).
llvm-svn: 98585
|