- Nov 14, 2009
-
-
Benjamin Kramer authored
llvm-svn: 88797
-
- Oct 14, 2009
-
-
Chris Lattner authored
length of comment tokens. Patch by Abramo Bagnara! llvm-svn: 84100
-
- Sep 22, 2009
-
-
Douglas Gregor authored
-code-completion-at=filename:line:column which performs code completion at the specified location by truncating the file at that position and enabling code completion. This approach makes it possible to run multiple tests from a single test file, and gives a more natural command-line interface. llvm-svn: 82571
-
- Sep 21, 2009
-
-
Douglas Gregor authored
real work is performed within Sema. Addresses Chris's comments, but still retains the heavyweight list-of-multimaps data structure. llvm-svn: 82459
-
- Sep 17, 2009
-
-
Douglas Gregor authored
essence, code completion is triggered by a magic "code completion" token produced by the lexer [*], which the parser recognizes at certain points in the grammar. The parser then calls into the Action object with the appropriate CodeCompletionXXX action. Sema implements the CodeCompletionXXX callbacks by performing minimal translation, then forwarding them to a CodeCompletionConsumer subclass, which uses the results of semantic analysis to provide code-completion results. At present, only a single, "printing" code completion consumer is available, for regression testing and debugging. However, the design is meant to permit other code-completion consumers. This initial commit contains two code-completion actions: one for member access, e.g., "x." or "p->", and one for nested-name-specifiers, e.g., "std::". More code-completion actions will follow, along with improved gathering of code-completion results for the various contexts. [*] In the current -code-completion-dump testing/debugging mode, the file is truncated at the completion point and EOF is translated into "code completion". llvm-svn: 82166
-
- Sep 09, 2009
-
-
Mike Stump authored
llvm-svn: 81346
-
- Jul 07, 2009
-
-
Chris Lattner authored
Convert the CharInfo table to be statically initialized, instead of dynamically initialized. Patch by Ryan Flynn! llvm-svn: 74919
-
Chris Lattner authored
llvm-svn: 74894
-
- Jul 02, 2009
-
-
Douglas Gregor authored
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
-
- Jun 23, 2009
-
-
Chris Lattner authored
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
-
- May 13, 2009
-
-
- Apr 28, 2009
-
-
Eli Friedman authored
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
-
- Apr 24, 2009
-
-
- Apr 19, 2009
-
-
Chris Lattner authored
llvm-svn: 69483
-
Chris Lattner authored
llvm-svn: 69482
-
- Apr 18, 2009
-
-
Chris Lattner authored
llvm-svn: 69481
-
Chris Lattner authored
on the code. llvm-svn: 69404
-
- Apr 15, 2009
-
-
Chris Lattner authored
This allows it to accurately measure tokens, so that we get: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~~^ instead of the woefully inferior: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~ ^ Most of this is just plumbing to push the reference around. llvm-svn: 69099
-
- Apr 05, 2009
-
-
rdar://6757323Chris Lattner authored
was causing the char after the newline to get eaten. llvm-svn: 68430
-
- Apr 02, 2009
-
-
Mike Stump authored
Eventually, would be nice to be able to run these modifications even when we don't want the warning or errors for the actual diagnostic. llvm-svn: 68272
-
- Mar 18, 2009
-
-
Chris Lattner authored
'' ' ' llvm-svn: 67237
-
Chris Lattner authored
llvm-svn: 67235
-
- Mar 08, 2009
-
-
Chris Lattner authored
\0's to created tokens instead of making all clients do it. No functionality change. llvm-svn: 66373
-
- Feb 19, 2009
-
-
Chris Lattner authored
t.c:1:10: error: missing terminating '>' character #include <stdio.h ^ instead of: t.c:1:10: error: missing terminating " character #include <stdio.h ^ llvm-svn: 65052
-
- Feb 15, 2009
-
-
Chris Lattner authored
Now instead of just tracking the expansion history, also track the full range of the macro that got replaced. For object-like macros, this doesn't change anything. For _Pragma and function-like macros, this means we track the locations of the ')'. This is required for PR3579 because apparently GCC uses the line of the ')' of a function-like macro as the location to expand __LINE__ to. llvm-svn: 64601
-
- Jan 29, 2009
-
-
Chris Lattner authored
redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
-
- Jan 27, 2009
-
-
Chris Lattner authored
.def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
-
- Jan 26, 2009
-
-
Chris Lattner authored
to crash when given an instantiation location. Thanks to Fariborz for the testcase. llvm-svn: 63057
-
Chris Lattner authored
history llvm-svn: 63035
-
Chris Lattner authored
Token now has a class of kinds for "literals", which include numeric constants, strings, etc. These tokens can optionally have a pointer to the start of the token in the lexer buffer. This makes it faster to get spelling and do other gymnastics, because we don't have to go through source locations. This change is performance neutral, but will make other changes more feasible down the road. llvm-svn: 63028
-
Chris Lattner authored
ground work for implementing #line, and fixes the "out of macro ID's" problem. There is nothing particularly tricky about the code, other than the very performance sensitive SourceManager::getFileID() method. llvm-svn: 62978
-
- Jan 23, 2009
-
-
Chris Lattner authored
Refactor how the preprocessor changes a token from being an tok::identifier to a keyword (e.g. tok::kw_for). Instead of doing this in HandleIdentifier, hoist this common case out into the caller, so that every keyword doesn't have to go through HandleIdentifier. This drops time in HandleIdentifier from 1.25ms to .62ms, and speeds up clang -Eonly with PTH by about 1%. llvm-svn: 62855
-
- Jan 21, 2009
-
-
Chris Lattner authored
llvm-svn: 62676
-
Chris Lattner authored
tells us whether Preprocessor::HandleIdentifier needs to be called. Because this method is only rarely needed, this saves a call and a bunch of random checks. This drops the time in HandleIdentifier from 3.52ms to .98ms on cocoa.h on my machine. llvm-svn: 62675
-
- Jan 19, 2009
-
-
Chris Lattner authored
no longer such thing as a non-canonical FileID. llvm-svn: 62499
-
Chris Lattner authored
SourceLocation. This requires making some cleanups to token pasting and _Pragma expansion. llvm-svn: 62490
-
- Jan 17, 2009
-
-
Chris Lattner authored
the chunk ID not the file ID. This exposes problems in TextDiagnosticPrinter where it should have been using the canonical file ID but wasn't. Fix these along the way. llvm-svn: 62427
-
Chris Lattner authored
llvm-svn: 62426
-
Chris Lattner authored
method. This lets us clean up the interface and make it more obvious that this method is *really really* _Pragma specific. Note that _Pragma handling uglifies the Lexer in the critical path. It would be very interesting to consider making _Pragma remapping be a new special lexer class of its own. llvm-svn: 62425
-
Chris Lattner authored
of a SourceLocation. This should speed it up and definitely simplifies it. llvm-svn: 62422
-