| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
| |
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50662
llvm-svn: 341140
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Migrate callers to print().
dump() should be useful to downstreams and third parties as a debugging
aid. Everyone trips up on this and creates confusing output.
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50661
llvm-svn: 339810
|
|
|
|
|
|
| |
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}
llvm-svn: 338291
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a '>>' token is split into two '>' tokens (in C++11 onwards), or (as an
extension) when we do the same for other tokens starting with a '>', we can't
just use a location pointing to the first '>' as the location of the split
token, because that would result in our miscomputing the length and spelling
for the token. As a consequence, for example, a refactoring replacing 'A<X>'
with something else would sometimes replace one character too many, and
similarly diagnostics highlighting a template-id source range would highlight
one character too many.
Fix this by creating an expansion range covering the first character of the
'>>' token, whose spelling is '>'. For this to work, we generalize the
expansion range of a macro FileID to be either a token range (the common case)
or a character range (used in this new case).
llvm-svn: 331155
|
|
|
|
|
|
| |
other minor fixes (NFC).
llvm-svn: 325412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r305688 meaning it reintroduces r305684. To repeat:
[NFC] Refactor DiagnosticRenderer to use FullSourceLoc
Move the DiagnosticRenderer and its dependents to using FullSourceLocs
instead of a SourceLocation and SourceManager pointer. The changeset is
rather large but entirely mechanical.
This is step one to allow DiagnosticRenderer to take either
llvm::SMLocs or clang::SourceLocations.
This breaks clang-tidy and clng-query which will be fixed in a commit
soon after.
Patch by Sanne Wouda
Differential Revision: https://reviews.llvm.org/D31709
llvm-svn: 306384
|
|
|
|
|
|
|
| |
This reverts commit 305684.
This patch breaks extra/tools/clang-tidy
llvm-svn: 305688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the DiagnosticRenderer and its dependents to using FullSourceLocs
instead of a SourceLocation and SourceManager pointer. The changeset is
rather large but entirely mechanical.
This is step one to allow DiagnosticRenderer to take either
llvm::SMLocs or clang::SourceLocations.
Patch by Sanne Wouda
Review: https://reviews.llvm.org/D31709
Change-Id: If351a112cdf6718e2d3ef6721b8da9c6376b32dd
llvm-svn: 305684
|
|
|
|
|
|
|
|
|
|
| |
Summary: Removed unused headers, replaced some headers with forward class declarations
Patch by: Eugene <claprix@yandex.ru>
Differential Revision: https://reviews.llvm.org/D20100
llvm-svn: 275882
|
|
|
|
| |
llvm-svn: 239400
|
|
|
|
| |
llvm-svn: 215925
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has the dual effect of (1) enabling more dead-stripping in release builds
and (2) ensuring that debug helper functions aren't stripped away in debug
builds, as they're intended to be called from the debugger.
Note that the attribute is applied to definitions rather than declarations in
headers going forward because it's now conditional on NDEBUG:
/// \brief Mark debug helper function definitions like dump() that should not be
/// stripped from debug builds.
Requires corresponding macro added in LLVM r198456.
llvm-svn: 198489
|
|
|
|
|
|
|
|
| |
an empty string.
No test case, this is debugging code.
llvm-svn: 169980
|
|
|
|
|
|
| |
writes to stderr; for debugging purposes.
llvm-svn: 167629
|
|
|
|
|
|
| |
this into every TU that includes SourceLocation.h.
llvm-svn: 151493
|
|
|
|
|
|
| |
'expansion' rather than 'instantiation' for macro source locations.
llvm-svn: 136058
|
|
|
|
|
|
| |
SourceManager and FullSourceLoc.
llvm-svn: 135969
|
|
|
|
|
|
| |
SourceManager and FullSourceLoc.
llvm-svn: 135965
|
|
|
|
|
|
|
|
| |
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.
llvm-svn: 135914
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state.
Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect
a lot of places, like C++ inline methods, template instantiations, the lexer, etc.
Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location.
Fixes rdar://8365684.
llvm-svn: 121873
|
|
|
|
|
|
|
| |
SourceManager::getPresumedLoc(), so that we don't try to make use of
an invalid presumed location. Doing so can cause crashes.
llvm-svn: 118885
|
|
|
|
|
|
|
| |
Invalid bit through; there are no safety-critical callers of these
functions.
llvm-svn: 98674
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 98631
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
|
|
|
| |
headers. Future approaches to (de-)serializing ASTs will be based on
the PCH infrastructure.
llvm-svn: 69828
|
|
|
|
| |
llvm-svn: 66555
|
|
|
|
| |
llvm-svn: 66522
|
|
|
|
|
|
|
|
|
|
| |
parser. For example, we now print out:
0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only
llvm-svn: 66108
|
|
|
|
| |
llvm-svn: 65884
|
|
|
|
|
|
|
|
| |
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.
llvm-svn: 63701
|
|
|
|
|
|
|
|
| |
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.
llvm-svn: 63698
|
|
|
|
| |
llvm-svn: 63229
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).
This patch also includes several cleanups along the way:
- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.
This patch is a prerequisite for #line, but does not actually provide
any #line functionality.
llvm-svn: 63098
|
|
|
|
|
|
| |
no longer such thing as a non-canonical FileID.
llvm-svn: 62499
|
|
|
|
| |
llvm-svn: 62496
|
|
|
|
|
|
| |
SourceManager::getBuffer(SourceLocation) method.
llvm-svn: 62494
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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.
llvm-svn: 62407
|
|
|
|
|
|
|
| |
containing one. Containment is generally better than derivation,
but in this case FullSourceLoc really 'isa' SourceLocation.
llvm-svn: 62375
|
|
|
|
| |
llvm-svn: 62374
|
|
|
|
| |
llvm-svn: 62371
|
|
|
|
|
|
| |
"logical" location, refer to the "instantiation" location.
llvm-svn: 62316
|
|
|
|
|
|
|
| |
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!
llvm-svn: 62309
|
|
|
|
|
|
| |
and add a dump method to FullSourceLoc! Patch by Nico Weber!
llvm-svn: 56806
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic
This fixes the following problems:
* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed
llvm-svn: 54620
|
|
|
|
|
|
|
|
| |
the files of different SourceLocations. These methods correctly handle the
case where a file may have multiple FileIDs due to it being large enough
to be spread across several chunks.
llvm-svn: 49682
|