| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
tokens at all,". This change broke External/Nurbs in LLVM test-suite.
llvm-svn: 167858
|
| |
|
|
|
|
| |
FIXME in LexNumericConstant.
llvm-svn: 167818
|
| |
|
|
|
|
|
|
|
| |
don't recursively continue lexing.
This avoids a stack overflow with a sequence of many empty #includes.
rdar://11988695
llvm-svn: 167801
|
| |
|
|
| |
llvm-svn: 167800
|
| |
|
|
| |
llvm-svn: 167690
|
| |
|
|
|
|
| |
when computing the size of the precompiled preamble.
llvm-svn: 166659
|
| |
|
|
| |
llvm-svn: 164555
|
| |
|
|
| |
llvm-svn: 163325
|
| |
|
|
| |
llvm-svn: 162970
|
| |
|
|
| |
llvm-svn: 160973
|
| |
|
|
|
|
|
|
| |
undefined behaviour, and move the diagnostic for '' from an Error into
an ExtWarn in this group. This is important for some users of the preprocessor,
and is necessary for gcc compatibility.
llvm-svn: 159335
|
| |
|
|
|
|
|
|
|
|
| |
* Removed docs for Lexer::makeFileCharRange from Lexer.cpp, as they're in
the header file;
* Reworked the documentation for SkipBlockComment so that it doesn't confuse
Doxygen's comment parsing;
* Added another summary with \brief markup.
llvm-svn: 158618
|
| |
|
|
|
|
|
|
|
|
|
| |
1. Teach Lexer that pragma lexers are like macro expansions at EOF.
2. Treat pragmas like #define/#undef when printing.
3. If we just printed a directive, add a newline before any more tokens.
(4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp)
PR10594 and <rdar://problem/11562490> (two separate related problems)
llvm-svn: 158571
|
| |
|
|
| |
llvm-svn: 158552
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
modes. For languages other than C99/C11, this isn't quite a conforming
extension, and for C++11, it breaks some reasonable code containing
user-defined literals.
In languages which don't officially have hexfloats, pare back this extension
to only apply in cases where the token starts 0x and does not contain an
underscore. The extension is still not quite conforming, but it's a lot closer
now.
llvm-svn: 158487
|
| |
|
|
|
|
| |
This condition (added in r158093) was overly conservative.
llvm-svn: 158483
|
| |
|
|
|
|
| |
to a change done long ago in r57393.
llvm-svn: 158243
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This was a problem for people who write 'return(result);'
Also fix ARCMT's corresponding code, though there's no test case for this
because implicit casts like this are rejected by the migrator for being
ambiguous, and explicit casts have no problem.
<rdar://problem/11577346>
llvm-svn: 158130
|
| |
|
|
|
|
|
|
|
| |
only expands #include directives.
Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).
llvm-svn: 158093
|
| |
|
|
| |
llvm-svn: 158091
|
| |
|
|
|
|
| |
so in a less malloc-intensive way.
llvm-svn: 157064
|
| |
|
|
|
|
| |
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120409/056126.html
llvm-svn: 154655
|
| |
|
|
| |
llvm-svn: 154643
|
| |
|
|
|
|
|
|
| |
MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn't default to Error; otherwise MSVC headers won't parse.
Fixes PR12383.
llvm-svn: 154273
|
| |
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
starting with an underscore is ill-formed.
Since this rule rejects programs that were using <inttypes.h>'s macros, recover
from this error by treating the ud-suffix as a separate preprocessing-token,
with a DefaultError ExtWarn. The approach of treating such cases as two tokens
is under discussion for standardization, but is in any case a conforming
extension and allows existing codebases to keep building while the committee
makes up its mind.
Reword the warning on the definition of literal operators not starting with
underscores (which are, strangely, legal) to more explicitly state that such
operators can't be called by literals. Remove the special-case diagnostic for
hexfloats, since it was both triggering in the wrong cases and incorrect.
llvm-svn: 152287
|
| |
|
|
|
|
|
| |
identifiers, in cases where those identifiers would be treated as
user-defined literal suffixes in C++11.
llvm-svn: 152198
|
| |
|
|
|
|
|
|
|
|
| |
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.
llvm-svn: 152098
|
| |
|
|
|
|
|
| |
kinds as the underlying string literals, and we silently drop the ud-suffix;
those issues will be fixed by subsequent patches.
llvm-svn: 152012
|
| |
|
|
|
|
|
| |
instead of a SourceRange, and handle the case where the range is
a char (not token) range.
llvm-svn: 149677
|
| |
|
|
|
|
|
|
|
| |
of macro arguments.
For "MAC1( MAC2(foo) )" and location of 'foo' token it would return
"MAC1" instead of "MAC2".
llvm-svn: 148704
|
| |
|
|
|
|
|
| |
expansion, in which case it returns a file range in the location where the
argument was spelled.
llvm-svn: 148551
|
| |
|
|
|
|
| |
that the given source range encompasses.
llvm-svn: 148481
|
| |
|
|
|
|
| |
and returns a character range with file locations.
llvm-svn: 148480
|
| |
|
|
|
|
|
|
|
| |
start/end location.
It is commonly needed after calling the function; with this way we avoid
recalculating it.
llvm-svn: 148479
|
| |
|
|
|
|
| |
into Lexer and Preprocessor; making it widely available.
llvm-svn: 148410
|
| |
|
|
|
|
|
|
|
|
| |
re-computed rather than the variables be re-used just after the assert.
Just use the variables since we have them already. Fixes an unused
variable warning.
Also fix an 80-column violation.
llvm-svn: 148212
|
| |
|
|
|
|
|
|
|
|
| |
\<newline><newline>
don't consume the second newline.
Thanks to David Blaikie for pointing out the crash!
llvm-svn: 147138
|
| |
|
|
|
|
|
|
|
|
| |
the buffer
when the end of the buffer is immediately after an escaped newline.
Fixes http://llvm.org/PR10153.
llvm-svn: 147091
|
| |
|
|
|
|
| |
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146959
|
| |
|
|
|
|
| |
The assert wasn't adding much value but slowed down Release+Asserts builds.
llvm-svn: 145082
|
| |
|
|
|
|
| |
We can reuse the information and avoid looping over all the bytes again.
llvm-svn: 145070
|
| |
|
|
| |
llvm-svn: 142284
|
| |
|
|
|
|
|
|
| |
This also adds a -Wc++98-compat-pedantic for warning on constructs which would
be diagnosed by -std=c++98 -pedantic (that is, it warns even on C++11 features
which we enable by default, with no warning, in C++98 mode).
llvm-svn: 142034
|
| |
|
|
| |
llvm-svn: 141798
|
| |
|
|
|
|
|
| |
swaps over the <<<< and >>>> markers, and uses shorter markers than traditional
tools.
llvm-svn: 141751
|
| |
|
|
| |
llvm-svn: 141012
|
| |
|
|
|
|
| |
It already works (and is useful with) macro locs as well.
llvm-svn: 140057
|
| |
|
|
|
|
|
|
| |
that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.
Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.
llvm-svn: 139987
|
| |
|
|
|
|
|
|
| |
scannig backwards to see if the newline is escaped.
3% speedup in preprocessing all of clang with -Eonly. Also includes a small testcase for coverage.
llvm-svn: 139116
|