| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 65124
|
|
|
|
|
|
| |
use Blocks for our callbacks ;-)
llvm-svn: 65083
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information about types. We often print diagnostics where we say
"foo_t" is bad, but the user doesn't know how foo_t is declared
(because it is a typedef). Fix this by expanding sugar when present
in a diagnostic (and not one of a few special cases, like vectors).
Before:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)')
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^
After:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^
llvm-svn: 65081
|
|
|
|
| |
llvm-svn: 64760
|
|
|
|
| |
llvm-svn: 64758
|
|
|
|
| |
llvm-svn: 64747
|
|
|
|
|
|
|
|
|
| |
as the last non-note diagnostic that preceeded them. This ensures
that diagnostics in main files which have notes with locations in
system headers get all the bits and pieces emitted or not in a
unit. This fixes PR3215.
llvm-svn: 64746
|
|
|
|
|
|
| |
to the LIBBUILTIN macro
llvm-svn: 64676
|
|
|
|
| |
llvm-svn: 64606
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
like printf and malloc. Fixes PR3586
llvm-svn: 64566
|
|
|
|
| |
llvm-svn: 64557
|
|
|
|
| |
llvm-svn: 64556
|
|
|
|
| |
llvm-svn: 64553
|
|
|
|
|
|
|
|
|
|
| |
a target.
Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this.
On linux/32, set intptr_t to int, instead of long. This fixes PR3563.
llvm-svn: 64495
|
|
|
|
|
|
| |
abi for objective-c programs.
llvm-svn: 64386
|
|
|
|
|
|
|
|
|
| |
- set the 'StatSysCallCache' object using a setter method instead of
FileManager's constructor. This allows the cache to be installed after the
FileManager object is created.
- Add 'file mode' to FileEntry (useful for stat caching)
llvm-svn: 64351
|
|
|
|
| |
llvm-svn: 64348
|
|
|
|
|
|
|
|
|
|
| |
for use by FileManager. FileManager now takes a StatSysCallCache* in its
constructor (which defaults to NULL). This will be used for evaluating whether
or not caching 'stat' system calls in PTH is a performance win. This shim adds
no observable performance impact in the case where the 'StatSysCallCache*' is
null.
llvm-svn: 64345
|
|
|
|
|
|
| |
predefines buffer initialization.
llvm-svn: 63919
|
|
|
|
| |
llvm-svn: 63914
|
|
|
|
|
|
| |
errors to 'fatal' error severity.
llvm-svn: 63894
|
|
|
|
| |
llvm-svn: 63849
|
|
|
|
| |
llvm-svn: 63846
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Changes Lookup*Name functions to return NamedDecls, instead of
Decls. Unfortunately my recent statement that it will simplify lot of
code, was not quite right, but it simplifies some...
- Makes MergeLookupResult SmallPtrSet instead of vector, following
Douglas suggestions.
- Adds %qN format for printing qualified names to Diagnostic.
- Avoids searching for using-directives in Scopes, which are not
DeclScope, during unqualified name lookup.
llvm-svn: 63739
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
line markers, including maintenance of the virtual include stack.
For something like this:
# 42 "bar.c" 1
# 142 "bar2.c" 1
#warning zappa
# 92 "bar.c" 2
#warning gonzo
# 102 "foo.c" 2
#warning bonkta
we now produce these three warnings:
#1:
In file included from foo.c:3:
In file included from bar.c:42:
bar2.c:143:2: warning: #warning zappa
#warning zappa
^
#2:
In file included from foo.c:3:
bar.c:92:2: warning: #warning gonzo
#warning gonzo
^
#3:
foo.c:102:2: warning: #warning bonkta
#warning bonkta
^
llvm-svn: 63722
|
|
|
|
|
|
| |
play around with the 'is system header' bit now function correctly.
llvm-svn: 63720
|
|
|
|
|
|
| |
ignoring include stack push/pop info though.
llvm-svn: 63719
|
|
|
|
| |
llvm-svn: 63717
|
|
|
|
|
|
| |
more likely to hit.
llvm-svn: 63714
|
|
|
|
| |
llvm-svn: 63712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
query point to the returned presumed location. We now produce:
foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
foo.h:93:2: warning: #warning blarg!
#warning blarg!
^
foo.h:94:2: warning: #warning blarg!
#warning blarg!
^
for:
#line 92 "foo.h"
#warning blarg!
#warning blarg!
#warning blarg!
blarg indeed!
llvm-svn: 63710
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
location below it report as coming from the #line location. For example,
with:
#line 92 "foo.h"
#warning blarg!
#warning blarg!
we now emit:
foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
llvm-svn: 63709
|
|
|
|
|
|
|
|
| |
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: 63694
|
|
|
|
|
|
| |
out of FileInfo :)
llvm-svn: 63672
|
|
|
|
| |
llvm-svn: 63667
|
|
|
|
|
|
| |
are 8-byte aligned.
llvm-svn: 63630
|
|
|
|
|
|
|
|
|
| |
ContentCache objects to using a densemap and list, and allocating
the ContentCache objects from a bump pointer. This does not speed
up or slow down things substantially, but gives us control over
their alignment.
llvm-svn: 63628
|
|
|
|
|
|
|
| |
diags around, eliminating #defines, etc. Patch by
Anders Johnsen!
llvm-svn: 63318
|
|
|
|
|
|
| |
changes in various diagnostics code.
llvm-svn: 63282
|
|
|
|
| |
llvm-svn: 63229
|
|
|
|
| |
llvm-svn: 63191
|
|
|
|
| |
llvm-svn: 63162
|
|
|
|
|
|
|
|
|
|
| |
FileEntries.
Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m):
non-PTH: 0.4% improvement
PTH: 0.8% improvement
llvm-svn: 63159
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 63157
|
|
|
|
|
|
| |
same constraint info as the output constraint. Fixes PR3417
llvm-svn: 63127
|
|
|
|
|
|
|
|
|
| |
.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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|