Age | Commit message (Collapse) | Author |
|
we have the ability to create a new, distict diagnostic consumer when
we go off and build a module. This avoids the currently horribleness
where the same diagnostic consumer sees diagnostics for multiple
translation units (and multiple SourceManagers!) causing all sorts of havok.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140743 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140493 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140479 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135578 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135577 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133418 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
the lines between the given source range.
To determine what the indentation should be, a SourceLocation 'parentIndent' parameter is used that should be at
a source location with an indentation one degree lower than the given range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129628 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
RewriterOptions struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129430 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129301 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
rewriting of blocks which have objective-c
stuff which need be rewritten as well. // rdar://9254348
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129300 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
-Allow removing a line completely if it ends up empty
-Provide more control on what should be removed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129085 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117870 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
will apply all fixes even when there were other errors in the file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111020 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108375 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
to use them instead of SourceRange. CharSourceRange is just a SourceRange
plus a bool that indicates whether the range has the end character resolved
or whether the end location is the start of the end token. While most of
the compiler wants to think of ranges that have ends that are the start of
the end token, the printf diagnostic stuff wants to highlight ranges within
tokens.
This is transparent to the diagnostic stuff. To start taking advantage of
the new capabilities, you can do something like this:
Diag(..) << CharSourceRange::getCharRange(Begin,End)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106338 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
library configuration
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body.
Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106010 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105995 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
implementation today but is the right place if we want to make it faster some
day.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101521 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
-fixit-at specified a particular fixit to fix, or the -o flag was used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101359 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
my recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95391 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
(Radar 7583971).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94724 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94009 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92922 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This is conceptually correct, but adds a huge hack to HighlightMacros which is
in fact doing all sorts of mutation to the Preprocessor. See FIXME.
Chris, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86107 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86076 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80229 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80225 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79610 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79609 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79460 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
- Please accept my sincere apologies for the gratuitous elimination of code
duplication, manual string length counting, unnecessary strlen calls, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79448 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
delta tree.
The issue is roughly a conflict in ReplaceText between two kinds of
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression. Two, it should be possible to
replace text that already has text inserted before it: for example, the
HTML rewriter inserts a bunch of tags at the beginning of the line, then
tries to escape the first character on the line. This patch
distinguishes the two cases by storing the deltas separately;
essentially, replacements and insertions no longer interfere with
each other.
Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.
There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added. Another is that an insertion
and replacing a string of length zero are distinct operations; I'm not
sure how to resolve this, or whether it will be confusing in practice.
This is relatively sensitive code, so please test and tell me if
anything breaks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72000 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67221 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.
This is an important distinction from the "FileID" currently tracked by
SourceLocation. *That* FileID may refer to the start of a file or to a
chunk within it. The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.
FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
wraps comments in <i> tags. Extend rewrite tokens to support
this minimal functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57409 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
and lets a client iterate over it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57407 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57038 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
that includes any edits in the range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57037 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54841 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
bug. Patch by Jean-Daniel Dupas!
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002166.html
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53184 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53141 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51689 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
from the rope. rdar://5952468
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51651 91177308-0d34-0410-b5e6-96231b3b80d8
|