| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 91263
|
|
|
|
|
|
| |
should be forced to deal with error conditions.
llvm-svn: 90700
|
|
|
|
|
|
|
|
|
|
|
|
| |
in diagnostics when we fail to open a file. This allows us to
report things like:
$ clang test.c -I.
test.c:2:10: fatal error: error opening file './foo.h': Permission denied
#include "foo.h"
^
llvm-svn: 90276
|
|
|
|
|
|
|
|
|
|
| |
stat a file but where mmaping it fails. In this case, we emit an
error like:
t.c:1:10: fatal error: error opening file '../../foo.h'
instead of "cannot find file".
llvm-svn: 90110
|
|
|
|
| |
llvm-svn: 85589
|
|
|
|
| |
llvm-svn: 84436
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
| |
llvm-svn: 75517
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
non-argument names, pass the tokens through.
llvm-svn: 72283
|
|
|
|
| |
llvm-svn: 72210
|
|
|
|
|
|
| |
patch by Alexei Svitkine!
llvm-svn: 69659
|
|
|
|
|
|
| |
Alexei Svitkine!
llvm-svn: 69656
|
|
|
|
|
|
|
| |
in a function-like macro body. This has the added bonus of moving some
function-like macro specific code out of the object-like macro codepath.
llvm-svn: 69530
|
|
|
|
|
|
|
| |
as decimal, even if it starts with 0. Also, since things like 0x1 are
completely illegal, don't even bother using numericliteralparser for them.
llvm-svn: 69454
|
|
|
|
| |
llvm-svn: 69422
|
|
|
|
| |
llvm-svn: 69415
|
|
|
|
| |
llvm-svn: 69413
|
|
|
|
|
|
| |
on the code.
llvm-svn: 69404
|
|
|
|
| |
llvm-svn: 69403
|
|
|
|
| |
llvm-svn: 69401
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
t.c:3:8: warning: extra tokens at end of #endif directive
#endif foo
^
//
Don't do this in strict-C89 mode because bcpl comments aren't
valid there, and it is too much trouble to analyze whether
C block comments are safe.
llvm-svn: 69024
|
|
|
|
|
|
|
| |
Warning to properly report that it is an import/include_next instead of
claiming it is a #include.
llvm-svn: 69023
|
|
|
|
|
|
|
|
|
| |
- Ted, please check.
- Missing test case because PTH won't reliably cache the tokens in a
test case. *cough*
llvm-svn: 68966
|
|
|
|
| |
llvm-svn: 68883
|
|
|
|
| |
llvm-svn: 68640
|
|
|
|
|
|
| |
predefines buffer.
llvm-svn: 68627
|
|
|
|
|
|
| |
-include, but that will be fixed soon.
llvm-svn: 68625
|
|
|
|
| |
llvm-svn: 67854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and the token after the # should be expanded if it is not a valid directive.
This allows us to transform things like:
#define FOO BAR
# FOO
into # BAR, even though FOO is not normally expanded for directives.
This should fix PR3833
llvm-svn: 67236
|
|
|
|
|
|
| |
# 4
llvm-svn: 67233
|
|
|
|
| |
llvm-svn: 66954
|
|
|
|
| |
llvm-svn: 66246
|
|
|
|
|
|
|
|
|
| |
to being allocated from the same bumpptr that the MacroInfo objects
themselves are.
This speeds up -Eonly cocoa.h pth by ~4%, fsyntax-only is barely measurable.
llvm-svn: 65195
|
|
|
|
| |
llvm-svn: 65187
|
|
|
|
| |
llvm-svn: 65179
|
|
|
|
|
|
| |
buffer as if the #include happened from the main file.
llvm-svn: 63764
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
ignoring include stack push/pop info though.
llvm-svn: 63719
|
|
|
|
| |
llvm-svn: 63667
|
|
|
|
|
|
| |
redundant #includes. Patch by Anders Johnsen!
llvm-svn: 63271
|
|
|
|
|
|
|
|
|
| |
.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
|
|
|
|
| |
llvm-svn: 63094
|
|
|
|
|
|
|
|
|
|
|
| |
instantiation history in an effort to speed up c99-intconst-1.c.
Now that multiple nested instantiations are allowed, we just
make them and don't pay the cost of lookups. With the other
changes that went in before this, reverting this is actually
a speedup for c99-intconst-1.c, speeding it up from 1.96s to 1.80s,
and preserves much better loc info.
llvm-svn: 63036
|
|
|
|
|
|
| |
unique the Filenames in #line directives, assigning them UIDs.
llvm-svn: 63010
|
|
|
|
| |
llvm-svn: 63003
|
|
|
|
| |
llvm-svn: 63000
|
|
|
|
|
|
| |
we just discard them.
llvm-svn: 62999
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a macro. Since these tokens may themselves be from macro
expansions, we need to resolve down to the spelling loc when the
macro ends up being instantiated. Instead of resolving this for
each token expanded from the macro definition, just do it once when
the macro is defined. This speeds up clang on c99-intconst-1.c from
2.66s to 2.43s (9.5%), reducing the FileID lookups from 407244 linear and
114175649 binary to 2529040 linear and 64771121 binary.
llvm-svn: 62993
|
|
|
|
|
|
|
| |
safe because a #line can change the file characteristic on a per-loc
basis.
llvm-svn: 62501
|