0189fd61ec72d86e008aa5615be80581f84cf703 |
|
20-Jul-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Added preproc callback for pragma directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
ad5f8336f96911805bb625cc4fb1a4487745508a |
|
30-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Lex: Cleanup whitespace in PragmaRegionHandler git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
bc3f628815b3841dc99109e7f67f9afa7793bc94 |
|
20-Jun-2013 |
Lawrence Crowl <crowl@google.com> |
This patch adds new private headers to the module map. Private headers may be included from within the module, but not from outside the module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
7adf79a620cb7fbde0608e21727425930676b7db |
|
06-May-2013 |
Reid Kleckner <reid@kleckner.net> |
Move PragmaCommentHandler to lib/Parse in preparation for calling Sema Summary: No functionality change. The existing tests for this pragma only verify that we can preprocess it. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D751 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
269cc2daf3a36ad878ea1d4cb356aa38311f6e2d |
|
04-May-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Lex: Fix quadratic behavior when unescaping _Pragma strings. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
142b35e25b579e2a883d6ca37c3c1121f562f242 |
|
17-Apr-2013 |
Jordan Rose <jordan_rose@apple.com> |
Fix off-by-one error in #pragma clang system_header. The system_header pragma (from GCC) is implemented using line notes in the source manager. However, a line note's line number specifies the number not for the current line, but for the next line. This was making all line numbers appear off by one after the pragma. Reported by Andy Gibbs, uncovered during r179677. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
076eea20b80024fc63bbd71fb019375983680ea6 |
|
17-Apr-2013 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Implemented #pragma GCC warning/error in the same mould as #pragma message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
85192c7fe187d5486e12dbc6960af28f16a558a0 |
|
16-Apr-2013 |
Tareq A. Siraj <tareq.a.sriaj@intel.com> |
Parser support for #pragma clang __debug captured This patch implements parsing ‘#pragma clang __debug’ as a first step for implementing captured statements. Captured statements are a mechanism for doing outlining in the AST. see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. Currently returns StmtEmpty Author: Andy Zhang <andy.zhang@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D369 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
c56fff7fd231aebf4b152f60f8f11ef91835c48a |
|
26-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses. For each macro directive (define, undefine, visibility) have a separate object that gets chained to the macro directive history. This has several benefits: -No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like PPMutationListener become unnecessary. -No need to keep extra source locations for the undef/visibility locations for the define directive object (which is the majority of the directives) -Much easier to hide/unhide a section in the macro directive history. -Easier to track the effects of the directives across different submodules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
0b91cc47a5642de2e1f567fe0f29420acdcdebbe |
|
10-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Handle _Pragma on a u8, u, or U string literal per the C11 specification. Also handle raw string literals here. C++11 doesn't yet specify how they will behave, but discussion on core suggests that we should just strip off everything but the r-char-sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
9818a1d443e97677dd3422305de9cc2b1fb2a8c1 |
|
20-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class for the data specific to a macro definition (e.g. what the tokens are), and MacroDirective class which encapsulates the changes to the "macro namespace" (e.g. the location where the macro name became active, the location where it was undefined, etc.) (A MacroDirective always points to a MacroInfo object.) Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but splitting the concepts allows us to better model the effect of modules to the macro namespace (also as a bonus it allows better modeling of push_macro/pop_macro #pragmas). Modules can have their own macro history, separate from the local (current translation unit) macro history; MacroDirectives will be used to model the macro history (changes to macro namespace). For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created to indicate that "FOO" became active at the import location. Module "A" itself will contain another MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives will point to the same MacroInfo object. Introducing the separation of macro concepts is the first part towards better modeling of module macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
55fc873017f10f6f566b182b70f6fc22aefa3464 |
|
04-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Sort all of Clang's files under 'lib', and fix up the broken headers uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
e74dc199e95cc523c8806e0de41d8814e8bc5c42 |
|
30-Nov-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Comments: no need to escape any characters in \code ... \endcode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
fafd101e6b557595ffbb5e9e9b47a3fc0385dc19 |
|
30-Nov-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Support for #pragma region/endregion for MSVC compatibility. Patch thanks to pravic! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
97f8461a2c553f68a258612d2322e4281c3f0915 |
|
17-Nov-2012 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Made the "expected string literal" diagnostic more expressive git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
02a176871d91bba3004e4f94b2d4d588ae4b2122 |
|
17-Nov-2012 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Refactored duplicate string literal lexing code within Preprocessor, into a common LexStringLiteral function. In doing so, some consistency problems have been ironed out (e.g. where the first token in the string literal was lexed with macro expansion, but subsequent ones were not) and also an erroneous diagnostic has been corrected. LexStringLiteral is complemented by a FinishLexStringLiteral function which can be used in the situation where the first token of the string literal has already been lexed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
6e347bccd1f132a41f9b72adbd25dc6be1dabe90 |
|
24-Oct-2012 |
Mahesha S <mahesha.llvm@gmail.com> |
Removed an extra blank line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
a8235d6c4093cd38dcf742909651f867de62e55b |
|
10-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
Rework the (de-)serialization of macros, as stored in MacroInfo*. Instead of simply dumping an offset into the current file, give each macro definition a proper ID with all of the standard modules-remapping facilities. Additionally, when a macro is modified in a subsequent AST file (e.g., #undef'ing a macro loaded from another module or from a precompiled header), provide a macro update record rather than rewriting the entire macro definition. This gives us greater consistency with the way we handle declarations, and ties together macro definitions much more cleanly. Note that we're still not actually deserializing macro history (we never were), but it's far easy to do properly now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
374b3837d676133fcc1eb70a25c8baf8ec4a5c4a |
|
24-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
StringRef'ize Preprocessor::CreateString(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
e40c4238a572bf8241a04e0005f70550cbfc1cfb |
|
29-Aug-2012 |
Alexander Kornienko <alexfh@google.com> |
Fixed a problem with #pragma push_macro/pop_macro implementation. Summary: The problem was with the following sequence: #pragma push_macro("long") #undef long #pragma pop_macro("long") in case when "long" didn't represent a macro. Fixed crash and removed code duplication for #undef/pop_macro case. Added regression tests. Reviewers: doug.gregor, klimek Reviewed By: doug.gregor CC: cfe-commits, chapuni Differential Revision: http://llvm-reviews.chandlerc.com/D31 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
8a64bb58c3b24d7d97895e435bbc0965c99bd3be |
|
29-Aug-2012 |
Alexander Kornienko <alexfh@google.com> |
Keep history of macro definitions and #undefs Summary: Summary: Keep history of macro definitions and #undefs with corresponding source locations, so that we can later find out all macros active in a specified source location. We don't save the history in PCH (no need currently). Memory overhead is about sizeof(void*)*3*<number of macro definitions and #undefs>+<in-memory size of all #undef'd macros> I've run a test on a file composed of 109 .h files from boost 1.49 on x86-64 linux. Stats before this patch: *** Preprocessor Stats: 73222 directives found: 19171 #define. 4345 #undef. #include/#include_next/#import: 5233 source files entered. 27 max include stack depth 19210 #if/#ifndef/#ifdef. 2384 #else/#elif. 6891 #endif. 408 #pragma. 14466 #if/#ifndef#ifdef regions skipped 80023/451669/1270 obj/fn/builtin macros expanded, 85724 on the fast path. 127145 token paste (##) operations performed, 11008 on the fast path. Preprocessor Memory: 5874615B total BumpPtr: 4399104 Macro Expanded Tokens: 417768 Predefines Buffer: 8135 Macros: 1048576 #pragma push_macro Info: 0 Poison Reasons: 1024 Comment Handlers: 8 Stats with this patch: ... Preprocessor Memory: 7541687B total BumpPtr: 6066176 Macro Expanded Tokens: 417768 Predefines Buffer: 8135 Macros: 1048576 #pragma push_macro Info: 0 Poison Reasons: 1024 Comment Handlers: 8 In my test increase in memory usage is about 1.7Mb, which is ~28% of initial preprocessor's memory usage and about 0.8% of clang's total VMM allocation. As for CPU overhead, it should only be noticeable when iterating over all macros, and should mostly consist of couple extra dereferences and one comparison per macro + skipping of #undef'd macros. It's less trivial to measure, though, as the preprocessor consumes a very small fraction of compilation time. Reviewers: doug.gregor, klimek, rsmith, djasper Reviewed By: doug.gregor CC: cfe-commits, chandlerc Differential Revision: http://llvm-reviews.chandlerc.com/D28 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
377da4c6b78c0130fb6141313636c8fda7b60b72 |
|
21-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Use LLVM_BUILTIN_TRAP instead of lame volatile int traps. (from a todo mentioned in r159469 & originally suggested by Chandler Carruth) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
e75d9cfbf41a0ee9e456a665776f91fdd9773b36 |
|
30-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
Use -frewrite-includes for crash reports. In future changes we should: * use __builtin_trap rather than derefing 'random' volatile pointers. * avoid dumping temporary files into /tmp when running tests, instead preferring a location that is properly cleaned up by lit. Review by Chandler Carruth. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
b6e95b7752893f66e9d067b4287dff2dbf4a5802 |
|
17-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: * Escaped #pragma (as \#pragma) in Doxygen comments; * Added \code...\endcode annotations around code examples in doc comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
6fe6a49c4058211ff4489023c78615ec0266c5ff |
|
08-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Disable _Pragma during HTML macro rewriting to keep from crashing. The preprocessor's handling of diagnostic push/pops is stateful, so encountering pragmas during a re-parse causes problems. HTMLRewrite already filters out normal # directives including #pragma, so it's clear it's not expected to be interpreting pragmas in this mode. This fix adds a flag to Preprocessor to explicitly disable pragmas. The "right" fix might be to separate pragma lexing from pragma parsing so that we can throw away pragmas like we do preprocessor directives, but right now it's important to get the fix in. Note that this has nothing to do with the "hack" of re-using the input preprocessor in HTMLRewrite. Even if we someday copy the preprocessor instead of re-using it, the copy would (and should) include the diagnostic level tables and have the same problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
14e645557ae91c6770d62beb00a1c522e0bfd5d6 |
|
03-Apr-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Correct handling of _Pragma macro inside a macro argument. If we are pre-expanding a macro argument don't actually "activate" the pragma at that point, activate the pragma whenever we encounter it again in the token stream. This ensures that we will activate it in the correct location or that we will ignore it if it never enters the token stream, e.g: \#define EMPTY(x) \#define INACTIVE(x) EMPTY(x) INACTIVE(_Pragma("clang diagnostic ignored \"-Wconversion\"")) This also fixes the crash in rdar://11168596. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d |
|
11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
99831e4677a7e2e051af636221694d60ba31fcdb |
|
06-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
User-defined literals: reject string and character UDLs in all places where the grammar requires a string-literal and not a user-defined-string-literal. The two constructs are still represented by the same TokenKind, in order to prevent a combinatorial explosion of different kinds of token. A flag on Token tracks whether a ud-suffix is present, in order to prevent clients from needing to look at the token's spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
7eb7d99d75ac0239b787f217d57fc3235c0ff957 |
|
03-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
4c55c54db8e676aa3e042188773d9d82d59fff91 |
|
02-Mar-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Adding support for #pragma include_alias in MS compatibility mode. This implements PR 10705. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
10285d9113c14d1e523f86a55b193eb752638ea5 |
|
01-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r151800, which was committed without review and has correctness issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
7abe1666f225b6d1a11aa7ed19d9a0dcc49391cb |
|
01-Mar-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Implements support for #pragma include_alias in ms compatibility mode. Fixes PR10705. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
f7ccbad5d9949e7ddd1cbef43d482553b811e026 |
|
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import SmallString<> into clang namespace (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
ce52bb3dec520ef94574280ac3ef8ad63f4f1ce2 |
|
06-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix a memory leak of PragmaNamespaces, rdar://10611796. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
eee242ff426bf79149f221798966e58688383c1e |
|
27-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Make the loading of information attached to an IdentifierInfo from an AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
8dfac0baaf0f81d3945bcb306480e358ba8d1f08 |
|
30-Sep-2011 |
John McCall <rjmccall@apple.com> |
Add explicit attributes to mark functions as having had their CoreFoundation object-transfer properties audited, and add a #pragma to cause them to be automatically applied to functions in a particular span of code. This has to be implemented largely in the preprocessor because of the requirement that the region be entirely contained in a single file; that's hard to impose from the parser without registering for a ton of callbacks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Switch assert(0/false) llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
62ec1f2fd7368542bb926c04797fb07023547694 |
|
17-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
fba18aa8f2cd1994dc65e8cb9f4be201c560dc0b |
|
16-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Add an experimental flag -fauto-module-import that automatically turns #include or #import direcctives of framework headers into module imports of the corresponding framework module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
f84139a1331c63c998e8b7d54148c75ac0b48ccd |
|
31-Aug-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Change err_pp_file_not_found back to an Error; when it's a Warning, we suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.) Fixes <rdar://10041960>. And also brings down the number of warnings without a flag by one :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
5cee1195584fa8672253139c86e922daeda69b9e |
|
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add support for C++0x unicode string and character literals, from Craig Topper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
bb52786da8d055568eef6e5694288c1258bc8c2a |
|
12-Jul-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Implement -MG. Fixes PR9613 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
c09ce1224dedc470fce9747e5936ff83cc6762eb |
|
22-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Copy diagnostic pragmas to the preprocessed output, from Richard Osborne! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
65aa6885818d4b4eea2e5a9d12085b2398148662 |
|
21-Jun-2011 |
Jay Foad <jay.foad@gmail.com> |
Make more use of llvm::StringRef in various APIs. In particular, don't use the deprecated forms of llvm::StringMap::GetOrCreateValue(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
1066c6c7c4d5186c2434b90b054c302564f98080 |
|
25-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
Disable MSVC warning about runtime stack overflow for DebugOverflowStack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
477aab6782795e7472055a54108d2df270ce1a89 |
|
25-May-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
A StringRef-ication of the DiagnosticIDs API and internals. Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static diagnostic data structures, which resulted in a huge global-var-init function. Depends on llvm commit r132046. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
784c257c8f5c3a737b0ae1dceb5d54d29b6637cf |
|
23-May-2011 |
Chris Lattner <sabre@nondot.org> |
Invoke the FileChanged callback before pushing the linemarker for a system header. Getting it in the wrong order generated incorrect line markers in -E mode. In the testcase from PR9861 we used to generate: # 1 "test.c" 2 # 1 "./foobar.h" 1 # 0 "./foobar.h" # 0 "./foobar.h" 3 # 2 "test.c" 2 now we properly produce: # 1 "test.c" 2 # 1 "./foobar.h" 1 # 1 "./foobar.h" 3 # 2 "test.c" 2 This fixes PR9861. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
7412494982c8b50c90961302c3a718633b2c3ab7 |
|
26-Apr-2011 |
Manuel Klimek <klimek@google.com> |
To be able to replay compilations we need to accurately remodel how includes get resolved, especially when they are found relatively to another include file. We also try to get it working for framework includes, but that part of the code is untested, as I don't have a code base that uses it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
b5142bb7af5c70fffd09f05172a1379a35a9c29a |
|
16-Mar-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add a 'RawPath' parameter to the PPCallbacks interface. This allows clients to observe the exact path through which an #included file was located. This is very useful when trying to record and replay inclusion operations without it beind influenced by the aggressive caching done inside the FileManager to avoid redundant system calls and filesystem operations. The work to compute and return this is only done in the presence of callbacks, so it should have no effect on normal compilation. Patch by Manuel Klimek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
84021556baceb76eedf7d44be8ba71d9b8cfacce |
|
28-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Rename tok::eom to tok::eod. The previous name was inaccurate as this token in fact appears at the end of every preprocessing directive, not just macro definitions. No functionality change, except for a diagnostic tweak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
a5ef584fd3d18da0c98342b4b6453948b7eb30d3 |
|
22-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Reimplement __pragma support using a TokenLexer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
b2eb53d9fd973a1a02e05e67a3307b3efd12eff2 |
|
22-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Make TokenLexer capable of storing preprocessor directive tokens git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
321b8179afaf803dcc56b2a19f7b0891a03c92c8 |
|
14-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
9d3f5f7550a2fab4178ed01425758c349b73a609 |
|
14-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Make LexOnOffSwitch a Preprocessor member function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
c4bf2b9afb7d47445a9dc6bc848657098a4e3851 |
|
22-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Introduced raw_identifier token kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
0827408865e32789e0ec4b8113a302ccdc531423 |
|
15-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix diagnostic pragmas. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
cb7b1e17b63967317ab5cc55682168cf0380519a |
|
12-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to always check the result of SourceManager::getPresumedLoc(), so that we don't try to make use of an invalid presumed location. Doing so can cause crashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
b275e3d4069fcc189b33e75a0611a6abd1efd28f |
|
19-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix typo in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
d83fc546a4351df49a8d106daaecb959e7278a86 |
|
27-Sep-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Fix coding standard mistake from my last commit. That, and keep aKor happy :P. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
301669b381dfead44bda5ea3211d69ffec5a530b |
|
27-Sep-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Lexer: Implement GCC's version of pragma message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
80c60f72848896f867f6b7e664e7060d9e78f019 |
|
10-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When we parse a pragma, keep track of how that pragma was originally spelled (#pragma, _Pragma, __pragma). In -E mode, use that information to add appropriate newlines when translating _Pragma and __pragma into #pragma, like GCC does. Fixes <rdar://problem/8412013>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
96de25986d28171945db96a6c6a54f91fd12ae4b |
|
06-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
fix 7320: we can't delete a trailing space if it doesn't exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
6493a4d7129673f7878da2382dedf4f9abc57e4c |
|
30-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Now that GCC will have #pragma push/pop (in GCC 4.6), allow the #pragma without requiring it to be in the "clang" namespace, from Louis Gerbarg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
3da92a9d21f707c164797dd967ba894b2282b343 |
|
29-Aug-2010 |
John McCall <rjmccall@apple.com> |
Complain if a __pragma isn't terminated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
1ef8a2e7675f3d8b6e8d9963b00378086e1dcdc7 |
|
29-Aug-2010 |
John McCall <rjmccall@apple.com> |
Add support for Microsoft's __pragma in the preprocessor. Patch by Francois Pichet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
ff759a66526d6a985fb4efae69c6b798d83364df |
|
19-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
CrashRecovery: Add #pragma clang __debug handle_crash, useful when debugging CrashRecovery since it avoids sending a signal which may be intercepted by the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
5505413ee8e4e2924f52ba81181071f3a492e7d9 |
|
18-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing those crash paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
f47724bf78299c7a50f008e0443c5f9f9f279ddc |
|
17-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
Implement #pragma push_macro, patch by Francois Pichet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
5595b2e72f896dcff45d9518f18167f049fbf6b7 |
|
29-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
Transcribe clattner email to SVN. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
d7ac856be5a124cf3b7810d033fb34d3a39c0e2c |
|
29-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
Change #pragma crash to segv, instead of abort. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
abf7b72a965efba4a5ac6f85c66d5aba0c83f972 |
|
28-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
Preprocessor: Add support for '#pragma clang __debug crash' and '#pragma clang __debug overflow_stack'. - For testing crash reporting stuff... you'd think I could just use some C++ code but Doug keeps fixing stuff! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
9b36c3f0de0105e903130bbda3c4aea7d792c0af |
|
13-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Modify the pragma handlers to accept and use StringRefs instead of IdentifierInfos. When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded). We can avoid this if we just use StringRefs for the pragmas. As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
abfe094ce71c42656dcb84a3bdc3e79cb3c16fc3 |
|
26-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
Implement support for #pragma message, patch by Michael Spencer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
c72cc5072cdc1a1a6e05f9d0f962f293a69248c4 |
|
11-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
453091cc2082e207ea2c2dda645a9bc01b37fb0c |
|
16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Audit all Preprocessor::getSpelling() callers, improving failure recovery for those that need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
ddeea5644367c9c153c9fee9e51bdea85ce43cbd |
|
27-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add an overload of Preprocessor::getSpelling which takes a SmallVector and returns a StringRef. Use it to simplify some repetitive code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
f45b646244705410866d62f1d8bf017a047ed662 |
|
22-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
revert my patch for rdar://7520940 that warns when a published header is #included with "foo.h" style syntax instead of framework syntax. It produced too much noise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
a139481e62fdb209d9d87a54a5733f989d2e8d51 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
stringref'ize a bunch of filename handling logic. Much nicer than passing around two const char*'s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
804f65271953f358dc01bfcf74a93e8c93c5b2d6 |
|
10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
implement rdar://7520940: published framework headers should import other headers within the same framework with the full framework path, not with a relative include. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
04ae2df026b275aae5dddfc0db5ca55ff4e62179 |
|
12-Jul-2009 |
Chris Lattner <sabre@nondot.org> |
add push/pop semantics for diagnostics. Patch by Louis Gerbarg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
2e22253e03e175144aeb9d13350a12fd83f858be |
|
02-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Add support for retrieving the Doxygen comment associated with a given declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
027cff63321262a5a85a402c39aac06ee66c745d |
|
18-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a crash that can occur when a #pragma handler eats to the end of the line, and when the pragma is at the end of a file. In this case, the last token consumed could pop the lexer, invalidating CurPPLexer. Thanks to Peter Thoman for pointing it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
6896a371e302c63ce3d4a99ad2c32e42dde6a9e4 |
|
15-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Fix #pragma GCC system_header by making it insert a virtual linemarker into the file at the point of the pragma. This allows clang to know that all sourcelocations after the pragma are in a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
e8fa06e07363b6d5e6c371bbd454d51bab78d01d |
|
12-May-2009 |
Chris Lattner <sabre@nondot.org> |
accept "#pragma clang foo" where we accept "#pragma GCC foo". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
edaf877d2469147ba818187a3e57a00b3f73b123 |
|
20-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement "#pragma GCC diagnostic". Besides being a nice feature, this will let us test for multiple different warning modes in the same file in regression tests. This implements rdar://2362963, a 10-year old feature request :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
4d8aac3778b40c161bed9964125948ee01c08821 |
|
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't support it. I don't know what evaluation method we use for complex arithmetic, so I don't know whether/if we should warn about use of CX_LIMITED_RANGE. This concludes my planned hacking on STDC pragmas, flame away :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
6c5cf4a2e234923ab66127de0874a71cb6bfdd83 |
|
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
diagnose invalid syntax of STDC pragmas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
f545be5552b6fd40a4c766fbf82dab0ab5305790 |
|
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject invalid stuff in the STDC namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
062f23246510393c19b537b68ec88b6a08ee8996 |
|
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
stub out STDC #pragmas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
af7cdf45da4925f788e87a4c318ee67404646088 |
|
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
basic support for -Wunknown-pragmas, more coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
35410d5cbbb18735d76e00496540d416dc49b577 |
|
14-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix the #import / #include_next "extra tokens at end of #foo directive" Warning to properly report that it is an import/include_next instead of claiming it is a #include. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
d7ee349f1dd84e023d09a35fb4d40c15888a55ac |
|
17-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
typo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
1fa495304c81e03f07f278a47b5efe9317104aab |
|
08-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
simplify some logic by making ScratchBuffer handle the application of trailing \0's to created tokens instead of making all clients do it. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
e7fb48466afcbf2c4ccdfa658824282fdc3c512c |
|
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
track "just a little more" location information for macro instantiations. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 |
|
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
move library-specific diagnostic headers into library private dirs. Reduce redundant #includes. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
20c6b3b85e186cd52d5d99489132d71d498159eb |
|
27-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Split the single monolithic DiagnosticKinds.def file into one .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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
47246be8ac5b0ddde6c402b8fc6946b6135487b5 |
|
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
This change refactors some of the low-level lexer interfaces a bit. Token now has a class of kinds for "literals", which include numeric constants, strings, etc. These tokens can optionally have a pointer to the start of the token in the lexer buffer. This makes it faster to get spelling and do other gymnastics, because we don't have to go through source locations. This change is performance neutral, but will make other changes more feasible down the road. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
bcc2a67e5180612417727cbdd8afd0f79fdf726d |
|
19-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Make SourceLocation::getFileLoc private to reduce the API exposure of SourceLocation. This requires making some cleanups to token pasting and _Pragma expansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
42e00d19b0dac64732eb5449d52a076282fcbf77 |
|
17-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Change the Lexer ctor used to lex _Pragma directives into a static factory method. This lets us clean up the interface and make it more obvious that this method is *really really* _Pragma specific. Note that _Pragma handling uglifies the Lexer in the critical path. It would be very interesting to consider making _Pragma remapping be a new special lexer class of its own. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
2b2453a7d8fe732561795431f39ceb2b2a832d84 |
|
17-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
this massive patch introduces a simple new abstraction: it makes "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
/external/clang/lib/Lex/Pragma.cpp
|
172e336b12fa32a1737f66d77a3f2de86f9cc8e8 |
|
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
only notify callbacks if they exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
a9d9145741ef77db45890911674705b81605b10b |
|
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Improve #pragma comment support by building the string argument and notifying PPCallbacks about it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
636c5ef6572e899d36cec1b0023fb28ba65189e1 |
|
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Implement basic support for parsing #pragma comment, a microsoft extension documented here: http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx This is according to my understanding reading the docs, I don't know if it really agrees fully with what VC++ allows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
35c10c25ddec4effbd26dead23ea5b04ee32f45a |
|
20-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Just use the SourceLocation of SysHeaderTok when doing a callback to emit #line information. A diff of the -E output for Cocoa.h shows that there is no change in output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
ac80c6e06b5815228e46294e51c493a74a21f8bc |
|
19-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Use PreprocessorLexer::getFileID() instead of Lexer::getFileLoc(). This is an intermediate step to having getCurrentLexer() return a PreprocessorLexer* instead of a Lexer*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
17ff58a63197b398ae52697b088dc0fb8b255519 |
|
19-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
When using a PTHLexer, use DiscardToEndOfLine() instead of ReadToEndOfLine(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
56b05c8829efd13b7e5b333f8f587c71d025c67d |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove one more Preprocessor::Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
3692b09faa9fe346f39bc922db6dce48cdcc3f63 |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Convert the lexer and start converting the PP over to using canonical Diag methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
68a91d5736c2c03d60a9d1c59d08191b8e0d6c52 |
|
18-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Replace more uses of 'CurLexer->' with 'CurPPLexer->'. No performance change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
4095080aff204008eefb26b100906c6ca2bc4bb6 |
|
04-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Preprocessor::RemovePragmaHandler. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
0b9e736308af5397f558ffc8e780c438c2fdb563 |
|
26-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
clean up a bunch of fixme's I added, by moving DirectoryLookup::DirType into SourceManager.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
acc5f3e42334525bf28c86471551f83dfce222d5 |
|
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|
bda0b626e74513950405c27525af87e214e605e2 |
|
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make a major restructuring of the clang tree: introduce a top-level lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/Pragma.cpp
|