| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Replace strcpy with memcpy while at it.
llvm-svn: 82043
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
|
|
|
| |
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.
llvm-svn: 80591
|
|
|
|
| |
llvm-svn: 79854
|
|
|
|
| |
llvm-svn: 79824
|
|
|
|
| |
llvm-svn: 79211
|
|
|
|
| |
llvm-svn: 77420
|
|
|
|
|
|
| |
cached token position is at the end
llvm-svn: 77159
|
|
|
|
| |
llvm-svn: 75832
|
|
|
|
| |
llvm-svn: 75627
|
|
|
|
|
|
| |
an incremental patch
llvm-svn: 75622
|
|
|
|
| |
llvm-svn: 75517
|
|
|
|
| |
llvm-svn: 75431
|
|
|
|
|
|
| |
dynamically initialized. Patch by Ryan Flynn!
llvm-svn: 74919
|
|
|
|
| |
llvm-svn: 74894
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declaration in the AST.
The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment,
which may be composed of several comment blocks.
Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).
Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile).
The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.
Some notes:
- We don't actually attempt to parse the comment blocks themselves,
beyond identifying them as Doxygen comment blocks to associate them
with a declaration.
- We won't find comment blocks that aren't adjacent to the
declaration, because we start our search based on the location of
the declaration.
- We don't go through the necessary hops to find, for example,
whether some redeclaration of a declaration has comments when our
current declaration does not. Similarly, we don't attempt to
associate a \param Foo marker in a function body comment with the
parameter named Foo (although that is certainly possible).
- Verification of my "no performance impact" claims is still "to be
done".
llvm-svn: 74704
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with dos style newlines. I have a trivial test for this:
// RUN: clang-cc %s -verify
#define test(x, y) \
x ## y
but I don't know how to get svn to not change newlines and testrunner
doesn't work with dos style newlines either, so "not worth it". :)
rdar://6994000
llvm-svn: 73945
|
|
|
|
|
|
|
|
| |
line, and when the pragma is at the end of a file. In this case, the last
token consumed could pop the lexer, invalidating CurPPLexer. Thanks to
Peter Thoman for pointing it out.
llvm-svn: 73689
|
|
|
|
|
|
|
|
|
| |
registered when PCH wasn't being used. We should always install (in BuiltinInfo)
information about target-specific builtins, but we shouldn't register any builtin
identifier infos. This fixes the build of apps that use PCH and target specific
builtins together.
llvm-svn: 73492
|
|
|
|
|
|
| |
C++-specific tokens.
llvm-svn: 73408
|
|
|
|
|
|
|
| |
the file at the point of the pragma. This allows clang to know that all
sourcelocations after the pragma are in a system header.
llvm-svn: 73376
|
|
|
|
|
|
| |
Curfman!
llvm-svn: 73370
|
|
|
|
|
|
|
|
|
| |
builtin preprocessor macro. This appears to work with two caveats:
1) builtins are registered in -E mode, and 2) target-specific builtins
are unconditionally registered even if they aren't supported by the
target (e.g. SSE4 builtin when only SSE1 is enabled).
llvm-svn: 73289
|
|
|
|
| |
llvm-svn: 73153
|
|
|
|
| |
llvm-svn: 72928
|
|
|
|
|
|
| |
preprocessor.
llvm-svn: 72686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostic to include the full instantiation location for the
invalid paste. For:
#define foo(a, b) a ## b
#define bar(x) foo(x, ])
bar(a)
bar(zdy)
Instead of:
t.c:3:22: error: pasting formed 'a]', an invalid preprocessing token
#define foo(a, b) a ## b
^
t.c:3:22: error: pasting formed 'zdy]', an invalid preprocessing token
we now produce:
t.c:7:1: error: pasting formed 'a]', an invalid preprocessing token
bar(a)
^
t.c:4:16: note: instantiated from:
#define bar(x) foo(x, ])
^
t.c:3:22: note: instantiated from:
#define foo(a, b) a ## b
^
t.c:8:1: error: pasting formed 'zdy]', an invalid preprocessing token
bar(zdy)
^
t.c:4:16: note: instantiated from:
#define bar(x) foo(x, ])
^
t.c:3:22: note: instantiated from:
#define foo(a, b) a ## b
^
llvm-svn: 72519
|
|
|
|
|
|
| |
behavior is more likely to be confusing than useful.
llvm-svn: 72499
|
|
|
|
| |
llvm-svn: 72497
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. When we accept "#garbage" in asm-with-cpp mode, change the token kind
of the # to unknown so that the preprocessor won't try to process it as
a real #. This fixes a crash on the attached example
2. Fix macro definition extents processing to handle #foo at the end of a
macro to say the definition ends with the foo, not the #.
This is a follow-on fix to r72283, and rdar://6916026
llvm-svn: 72388
|
|
|
|
| |
llvm-svn: 72386
|
|
|
|
|
|
| |
the RHS. Fixes assembler-with-cpp issue reported on cfe-dev.
llvm-svn: 72370
|
|
|
|
|
|
| |
non-argument names, pass the tokens through.
llvm-svn: 72283
|
|
|
|
|
|
|
|
| |
Preprocessor::EnterTokenStream.
So check for annotation before using the Token's IdentifierInfo.
llvm-svn: 72278
|
|
|
|
| |
llvm-svn: 72210
|
|
|
|
| |
llvm-svn: 71960
|
|
|
|
| |
llvm-svn: 71643
|
|
|
|
|
|
|
|
|
| |
two empty arguments. Also, add an assert so that this bug
manifests as an assertion failure, not a valgrind problem.
This fixes rdar://6880648 - [cpp] crash in ArgNeedsPreexpansion
llvm-svn: 71616
|
|
|
|
| |
llvm-svn: 71572
|
|
|
|
|
|
| |
pasted token.
llvm-svn: 70793
|
|
|
|
|
|
| |
and apparently not part of -Wall
llvm-svn: 70329
|
|
|
|
| |
llvm-svn: 70315
|
|
|
|
| |
llvm-svn: 70283
|
|
|
|
|
|
|
|
|
|
|
|
| |
that if we're going to print an extension warning anyway,
there's no point to changing behavior based on NoExtensions: it will
only make error recovery worse.
Note that this doesn't cause any behavior change because NoExtensions
isn't used by the current front-end. I'm still considering what to do about
the remaining use of NoExtensions in IdentifierTable.cpp.
llvm-svn: 70273
|
|
|
|
|
|
|
|
| |
PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes
us from reading 503 identifiers down to 37 and from 470 macros down to
4. It also results in an 8% performance improvement.
llvm-svn: 70094
|
|
|
|
| |
llvm-svn: 70086
|
|
|
|
| |
llvm-svn: 69987
|
|
|
|
| |
llvm-svn: 69964
|
|
|
|
| |
llvm-svn: 69963
|
|
|
|
| |
llvm-svn: 69750
|