Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | push some source location information down through the compiler, | Chris Lattner | 2010-04-20 | 1 | -6/+2 |
| | | | | | | | | into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. llvm-svn: 101939 | ||||
* | add a PPCallback handler for a skipped #include, patch by | Chris Lattner | 2010-04-19 | 1 | -6/+9 |
| | | | | | | Zhanyong Wan! llvm-svn: 101813 | ||||
* | Improve line marker directive locations, patch by Jordy Rose | Chris Lattner | 2010-04-14 | 1 | -2/+3 |
| | | | | llvm-svn: 101226 | ||||
* | Reinstate my CodeModificationHint -> FixItHint renaming patch, without | Douglas Gregor | 2010-03-31 | 1 | -3/+3 |
| | | | | | | the C-only "optimization". llvm-svn: 100022 | ||||
* | Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder | Douglas Gregor | 2010-03-31 | 1 | -3/+3 |
| | | | | llvm-svn: 100018 | ||||
* | Rename CodeModificationHint to FixItHint, since we've been using the | Douglas Gregor | 2010-03-31 | 1 | -3/+3 |
| | | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008 | ||||
* | Audit all Preprocessor::getSpelling() callers, improving failure | Douglas Gregor | 2010-03-16 | 1 | -5/+16 |
| | | | | | | recovery for those that need it. llvm-svn: 98689 | ||||
* | Audit all callers of SourceManager::getCharacterData(); update some of | Douglas Gregor | 2010-03-16 | 1 | -1/+6 |
| | | | | | | them to recover more gracefully on failure. llvm-svn: 98672 | ||||
* | Use SmallString instead of SmallVector | Kovarththanan Rajaratnam | 2010-03-13 | 1 | -5/+5 |
| | | | | llvm-svn: 98436 | ||||
* | Add an overload of Preprocessor::getSpelling which takes a SmallVector and | Benjamin Kramer | 2010-02-27 | 1 | -6/+2 |
| | | | | | | returns a StringRef. Use it to simplify some repetitive code. llvm-svn: 97322 | ||||
* | Fix PR6282: the include guard optimization cannot happen if the | Chris Lattner | 2010-02-12 | 1 | -7/+10 |
| | | | | | | | | guard macro is already defined for the first occurrence of the header. If it is, the body will be skipped and not be properly analyzed for the include guard optimization. llvm-svn: 95972 | ||||
* | revert my patch for rdar://7520940 that warns when a published header | Chris Lattner | 2010-01-22 | 1 | -13/+2 |
| | | | | | | | is #included with "foo.h" style syntax instead of framework syntax. It produced too much noise. llvm-svn: 94120 | ||||
* | simplify the code for skipping in a #if 0 block. The CurLexer | Chris Lattner | 2010-01-18 | 1 | -4/+1 |
| | | | | | | | pointer is always non-null because the PTH case exits earlier in the method. llvm-svn: 93794 | ||||
* | stringref'ize a bunch of filename handling logic. Much | Chris Lattner | 2010-01-10 | 1 | -38/+28 |
| | | | | | | nicer than passing around two const char*'s. llvm-svn: 93094 | ||||
* | clarify comment. | Chris Lattner | 2010-01-10 | 1 | -2/+2 |
| | | | | llvm-svn: 93084 | ||||
* | implement rdar://7520940: published framework headers should | Chris Lattner | 2010-01-10 | 1 | -2/+13 |
| | | | | | | | import other headers within the same framework with the full framework path, not with a relative include. llvm-svn: 93083 | ||||
* | Convert to StringRef, avoid a memcpy in the common case. | Benjamin Kramer | 2009-12-31 | 1 | -19/+16 |
| | | | | llvm-svn: 92357 | ||||
* | formatting changes. | Chris Lattner | 2009-12-14 | 1 | -4/+5 |
| | | | | llvm-svn: 91263 | ||||
* | Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients ↵ | Daniel Dunbar | 2009-12-06 | 1 | -1/+1 |
| | | | | | | should be forced to deal with error conditions. llvm-svn: 90700 | ||||
* | pass the reason for failure up from MemoryBuffer and report it | Chris Lattner | 2009-12-01 | 1 | -2/+3 |
| | | | | | | | | | | | | 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 | ||||
* | Fix PR5633 by making the preprocessor handle the case where we can | Chris Lattner | 2009-11-30 | 1 | -1/+4 |
| | | | | | | | | | | 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 | ||||
* | Re-arranged some internal functions for coming __has_include changes. | John Thompson | 2009-10-30 | 1 | -7/+7 |
| | | | | llvm-svn: 85589 | ||||
* | Move clients to use IdentifierInfo::getNameStart() instead of getName() | Daniel Dunbar | 2009-10-18 | 1 | -1/+1 |
| | | | | llvm-svn: 84436 | ||||
* | Remove tabs, and whitespace cleanups. | Mike Stump | 2009-09-09 | 1 | -175/+175 |
| | | | | llvm-svn: 81346 | ||||
* | There is no need to value initialize this array. | Daniel Dunbar | 2009-07-13 | 1 | -1/+1 |
| | | | | llvm-svn: 75517 | ||||
* | Fix a couple of bugs: | Chris Lattner | 2009-05-25 | 1 | -18/+27 |
| | | | | | | | | | | | | 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 | ||||
* | In assembler-with-cpp mode, don't error on '#' (stringize) operator applied to | Daniel Dunbar | 2009-05-22 | 1 | -3/+5 |
| | | | | | | non-argument names, pass the tokens through. llvm-svn: 72283 | ||||
* | Use v.data() instead of &v[0] when SmallVector v might be empty. | Jay Foad | 2009-05-21 | 1 | -2/+2 |
| | | | | llvm-svn: 72210 | ||||
* | improve MacroInfo to track the source range of the macro definition, | Chris Lattner | 2009-04-21 | 1 | -1/+10 |
| | | | | | | patch by Alexei Svitkine! llvm-svn: 69659 | ||||
* | add a preprocessor callback function for #undef, patch by | Chris Lattner | 2009-04-21 | 1 | -1/+5 |
| | | | | | | Alexei Svitkine! llvm-svn: 69656 | ||||
* | Fix PR4006, incorrect handling of __VA_ARGS__ when it was the first token | Chris Lattner | 2009-04-19 | 1 | -9/+9 |
| | | | | | | | 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 | ||||
* | more fun with line markers: the digit string is required to be interpreted | Chris Lattner | 2009-04-18 | 1 | -23/+23 |
| | | | | | | | 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 | ||||
* | second half of PR3940: #line requires simple digit sequence. | Chris Lattner | 2009-04-18 | 1 | -1/+2 |
| | | | | llvm-svn: 69422 | ||||
* | enforce requirements imposed by C90 6.8 TC1, fixing PR3919. | Chris Lattner | 2009-04-18 | 1 | -11/+26 |
| | | | | llvm-svn: 69415 | ||||
* | Fix PR3938 by taking into account C99 6.10p4. | Chris Lattner | 2009-04-18 | 1 | -1/+1 |
| | | | | llvm-svn: 69413 | ||||
* | Fix two problems from PR3916, and one problem I noticed while hacking | Chris Lattner | 2009-04-17 | 1 | -2/+5 |
| | | | | | | on the code. llvm-svn: 69404 | ||||
* | implement PR3940: #line numbers not fully checked | Chris Lattner | 2009-04-17 | 1 | -0/+5 |
| | | | | llvm-svn: 69403 | ||||
* | #line is allowed to have macros that expand to nothing after them. | Chris Lattner | 2009-04-17 | 1 | -7/+13 |
| | | | | llvm-svn: 69401 | ||||
* | Offer a fixit hint for our warning about tokens at the end of a directive: | Chris Lattner | 2009-04-14 | 1 | -1/+7 |
| | | | | | | | | | | | | | 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 | ||||
* | Fix the #import / #include_next "extra tokens at end of #foo directive" | Chris Lattner | 2009-04-14 | 1 | -9/+9 |
| | | | | | | | Warning to properly report that it is an import/include_next instead of claiming it is a #include. llvm-svn: 69023 | ||||
* | Fix assertion failure in PTH when tokens followed a closing #endif. | Daniel Dunbar | 2009-04-13 | 1 | -3/+2 |
| | | | | | | | | | - Ted, please check. - Missing test case because PTH won't reliably cache the tokens in a test case. *cough* llvm-svn: 68966 | ||||
* | add a ppcallback hook for macro definitions. | Chris Lattner | 2009-04-12 | 1 | -0/+4 |
| | | | | llvm-svn: 68883 | ||||
* | finish the implementation of -imacros. The driver still needs to be hooked up. | Chris Lattner | 2009-04-08 | 1 | -4/+10 |
| | | | | llvm-svn: 68640 | ||||
* | reject the #__include_macros directive unless it comes from the | Chris Lattner | 2009-04-08 | 1 | -1/+20 |
| | | | | | | predefines buffer. llvm-svn: 68627 | ||||
* | Add initial support for -imacros. Right now it has the same semantics as | Chris Lattner | 2009-04-08 | 1 | -2/+4 |
| | | | | | | -include, but that will be fixed soon. llvm-svn: 68625 | ||||
* | push line markers through -E mode. | Chris Lattner | 2009-03-27 | 1 | -0/+22 |
| | | | | llvm-svn: 67854 | ||||
* | when preprocessing a .S file, unknown directives should just be passed through, | Chris Lattner | 2009-03-18 | 1 | -0/+19 |
| | | | | | | | | | | | | | | 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 | ||||
* | This is not considered a preprocessor directive in .S files: | Chris Lattner | 2009-03-18 | 1 | -0/+2 |
| | | | | | | # 4 llvm-svn: 67233 | ||||
* | use accessor instead of poking ivar directly | Chris Lattner | 2009-03-13 | 1 | -1/+1 |
| | | | | llvm-svn: 66954 | ||||
* | #import is not considered an extension for ObjC. | Chris Lattner | 2009-03-06 | 1 | -1/+2 |
| | | | | llvm-svn: 66246 |