a4de17562d13d7a8188108243c4cfbd52f33229a |
|
04-Mar-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r256229 http://b/26987366 (cherry picked from commit 87d948ecccffea9e9e37d0d053b246e2d6d6c47b) Change-Id: I10ca401a280e905253aafabad9118693a2f24ffb
/external/clang/include/clang/Lex/Preprocessor.h
|
b6d6993e6e6d3daf4d9876794254d20a134e37c2 |
|
01-Jul-2015 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r239765 Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/include/clang/Lex/Preprocessor.h
|
0e2c34f92f00628d48968dfea096d36381f494cb |
|
23-Mar-2015 |
Stephen Hines <srhines@google.com> |
Update aosp/master clang for rebase to r230699. Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/include/clang/Lex/Preprocessor.h
|
176edba5311f6eff0cad2631449885ddf4fbc9ea |
|
01-Dec-2014 |
Stephen Hines <srhines@google.com> |
Update aosp/master Clang for rebase to r222490. Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/include/clang/Lex/Preprocessor.h
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/include/clang/Lex/Preprocessor.h
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/Lex/Preprocessor.h
|
a5ba7b405dff48a5a0a63fff32c99eedb044842b |
|
07-Nov-2013 |
Douglas Gregor <dgregor@apple.com> |
Modules: Teach the preprocessor to recognize 'import' only after an '@'. The preprocessor currently recognizes module declarations to load a module based on seeing the 'import' keyword followed by an identifier. This sequence is fairly unlikely in C (one would need a type named 'import'), but is more common in Objective-C (where a variable named 'import' can cause problems). Since import declarations currently require a leading '@', recognize that in the preprocessor as well. Fixes <rdar://problem/15084587>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c641709607d45bf97772e925647db6c94866c50a |
|
22-Oct-2013 |
Daniel Jasper <djasper@google.com> |
Allow a header to be part of multiple modules. This patch changes two things: a) Allow a header to be part of multiple modules. The reasoning is that in existing codebases that have a module-like build system, the same headers might be used in several build targets. Simple reasons might be that they defined different classes that are declared in the same header. Supporting a header as a part of multiple modules will make the transistion easier for those cases. A later step in clang can then determine whether the two modules are actually compatible and can be merged and error out appropriately. The later check is similar to what needs to be done for template specializations anyway. b) Allow modules to be stored in a directory tree separate from the headers they describe. Review: http://llvm-reviews.chandlerc.com/D1951 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ddd2dfc1d3f4a36cbe8cd775c588623a17049f9f |
|
24-Sep-2013 |
Daniel Jasper <djasper@google.com> |
Module use declarations (II) Review: http://llvm-reviews.chandlerc.com/D1546. I have picked up this patch form Lawrence (http://llvm-reviews.chandlerc.com/D1063) and did a few changes. From the original change description (updated as appropriate): This patch adds a check that ensures that modules only use modules they have so declared. To this end, it adds a statement on intended module use to the module.map grammar: use module-id A module can then only use headers from other modules if it 'uses' them. This enforcement is off by default, but may be turned on with the new option -fmodules-decluse. When enforcing the module semantics, we also need to consider a source file part of a module. This is achieved with a compiler option -fmodule-name=<module-id>. The compiler at present only applies restrictions to the module directly being built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d2f9308220af22bfc1bcd3bc2cad118dbd8be013 |
|
19-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make Preprocessor::Lex non-recursive. Before this patch, Lex() would recurse whenever the current lexer changed (e.g. upon entry into a macro). This patch turns the recursion into a loop: the various lex routines now don't return a token when the current lexer changes, and at the top level Preprocessor::Lex() now loops until it finds a token. Normally, the recursion wouldn't end up being very deep, but the recursion depth can explode in edge cases like a bunch of consecutive macros which expand to nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this patch). <rdar://problem/14569770> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f0dd853bb1e8f3e59b169e6d34a8556c6003c47c |
|
20-Aug-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC migrator: More work towards insertion of ObjC audit pragmas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
671538e8a51eab5bd65a1f9f327ba7f44f84e486 |
|
12-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Introducing -Wheader-guard, a warning that checks header guards actually work properly. This warning checks that the #ifndef and #define directives at the beginning of a header refer to the same macro name. Includes a fix-it hint to correct the header guard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3b7deda7137e62810a810ce25b062927a9fc7c71 |
|
24-May-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[modules] If we hit a failure while loading a PCH/module, abort parsing instead of trying to continue in an invalid state. Also don't let libclang create a PCH with such an error. Fixes rdar://13953768 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
440d456c5cf9613a3ee6a3297f892ddd8da5b8f8 |
|
22-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16094: I should have known Obj-C init-capture disambiguation couldn't be *that* easy... Try a bit harder to disambiguate. This is mostly straightforward, but for =-style initializers, we actually need to know where an expression ends: [foo = bar baz] is a message send, whereas [foo = bar + baz] is a lambda-introducer. Handle this by parsing the expression eagerly, and replacing it with an annotation token. By chance, we use the *exact same* parsing rules in both cases (except that we need to assume we're inside a message send for the parse, to turn off various forms of inapplicable error recovery). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7247c88d1e41514a41085f83ebf03dd5220e054a |
|
15-May-2013 |
David Blaikie <dblaikie@gmail.com> |
Use only explicit bool conversion operator The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. DiagnosticBuilder kept its implicit conversion operator owing to the prevalent use of it in return statements. One bug was found in ExprConstant.cpp involving a comparison of two PointerUnions (PointerUnion did not previously have an operator==, so instead both operands were converted to bool & then compared). A test is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix (adding operator== to PointerUnion in LLVM). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
3e25b990f1e2ba2a9a63dde5fd111492a7f6194a |
|
30-Apr-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH] Fix memory leak related to deserialized MacroInfo objects. Deserialized MacroInfos were not destroyed and if their SmallVector did heap allocation, it was leaked. rdar://13768967 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
d560ce3b66325ff22cd3aca23c6de3143bd74d24 |
|
27-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[Preprocessor] Remove PPMutationListener. It's not used anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
fd61d6fe0aa9853f0577ca88a63901c3773e8101 |
|
25-Mar-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Correct indentation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
9317ab94bb68122ba6fc728eb73c1308fb913cd1 |
|
22-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH/Modules] De/Serialize MacroInfos separately than MacroDirectives. -Serialize the macro directives history into its own section -Get rid of the macro updates section -When de/serializing an identifier from a module, associate only one macro per submodule that defined+exported it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
baa74bd3968028d8e5b10ee9b50d0dceb41e85a9 |
|
22-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[modules] When a MacroInfo object is deserialized, allocate and store its submodule ID. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c515978bd3a703aa733f846a0094ffa84d149074 |
|
24-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the full information about the macro (e.g if it was imported and where). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
9484c1dcf084452228aae439edcd00e1b4ce7470 |
|
01-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Const'ify Preprocessor::getPredefinesFileID. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
95d912c994832333a998bc7d4ae0e8e830a2d38b |
|
01-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce SourceManager::PredefinesFileID, to allow each checking of whether a source location came from the predefines buffer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
74c2498bb9e339345ee32bdd095e76157cec3b86 |
|
30-Jan-2013 |
Jordan Rose <jordan_rose@apple.com> |
Don't warn about Unicode characters in -E mode. People use the C preprocessor for things other than C files. Some of them have Unicode characters. We shouldn't warn about Unicode characters appearing outside of identifiers in this case. There's not currently a way for the preprocessor to tell if it's in -E mode, so I added a new flag, derived from the PreprocessorOutputOptions. This is only used by the Unicode warnings for now, but could conceivably be used by other warnings or even behavioral differences later. <rdar://problem/13107323> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
dc1088f6201c3fb8f3f97f54c343f7d163fbec06 |
|
19-Jan-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH/Modules] Revert r172843, it caused a module to fail building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f953276b6165dc7e8f4679cce4d0e7c649cd4232 |
|
18-Jan-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH/Modules] Re-apply r172620 and r172629, now with 100% less infinite loops! Makes sure that a deserialized macro is only added to the preprocessor macro definitions only once. Unfortunately I couldn't get a reduced test case. rdar://13016031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d3b036efdf0bf4ec216c701183a4b990cd041cd6 |
|
18-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Revert Clang r172620 and r172629, which caused a hang when building complicated modules (<rdar://problem/13038265>). Unfortunately, this un-fixes <rdar://problem/13016031>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
31672b1745195d709b641f1c0f44e203742fa73b |
|
16-Jan-2013 |
Aaron Ballman <aaron@aaronballman.com> |
No longer crashing with an assert when __has_include or __has_include_next is used outside of a preprocessor directive. This fixes PR14837. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7f69b1ab4f63ded511dddd7fb7e1cd8860757016 |
|
16-Jan-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH/Modules] Change how macro [re]definitions are de/serialized. Previously we would serialize the macro redefinitions as a list, part of the identifier, and try to chain them together across modules individually without having the info that they were already chained at definition time. Change this by serializing the macro redefinition chain and then try to synthesize the chain parts across modules. This allows us to correctly pinpoint when 2 different definitions are ambiguous because they came from unrelated modules. Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH is redefined without undef'ing it first. rdar://13016031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b3958476b21702a15f64f09d2862506d03dffe7b |
|
14-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Constify argument of Preprocessor::getMacroInfoHistory and propagate to callers, removing unneeded const_cast git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f |
|
12-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove useless 'llvm::' qualifier from names like StringRef and others that are brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d93335c43fd462145fee3ea8f4d84d430577c821 |
|
07-Jan-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Pull the bulk of Lexer::MeasureTokenLength() out into a new function, Lexer::getRawToken(). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
30a2e16f6c27f888dd11eba6bbbae1e980078fcb |
|
04-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Sort #include lines for all files under include/... This is a simpler sort, entirely automatic with the help of llvm/utils/sort_includes.py -- no manual edits here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
37ed12720a35b7bfa1c4de73ad6f1c6c1c88ee17 |
|
04-Dec-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactor recording the preprocessor conditional directive regions out of PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
03e67fbf7a2646447972742b6bb97c82ce4698fb |
|
11-Nov-2012 |
Nico Weber <nicolasweber@gmx.de> |
Delete comment reference to non-existent method git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a71a7d8a1ce4474e7bdb680658fb58b6caf391d3 |
|
24-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
(De-)serialize the preprocessor options, including macros defined, -include'd files, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
36a16498ff911a218f26c7955376bbe99ddb16df |
|
24-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
Teach the preprocessor to hold onto the preprocessor options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3ab50fe3fc8311fb68c4f5eb97e9bb3d0041bf1a |
|
11-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce a simple "hint" scheme to eliminate the quadratic behavior associated with deserializing macro history for an identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
6c6c54a59a6e7dbe63ff6a9bbab76f6e0c7c8462 |
|
11-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
Deserialize macro history when we deserialize an identifier that has macro history. When deserializing macro history, we arrange history such that the macros that have definitions (that haven't been #undef'd) and are visible come at the beginning of the list, which is what the preprocessor and other clients of Preprocessor::getMacroInfo() expect. If additional macro definitions become visible later, they'll be moved toward the front of the list. Note that it's possible to have ambiguities, but we don't diagnose them yet. There is a partially-implemented design decision here that, if a particular identifier has been defined or #undef'd within the translation unit, that definition (or #undef) hides any macro definitions that come from imported modules. There's still a little work to do to ensure that the right #undef'ing happens. Additionally, we'll need to scope the update records for #undefs, so they only kick in when the submodule containing that update record becomes visible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
1952354bd376062c3ab3d328c0fc6c36530c9309 |
|
29-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Move the 'find macro by spelling' infrastructure to the Preprocessor class and use it to suggest appropriate macro for __attribute__((deprecated)) in -Wdocumentation-deprecated-sync. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
4d7e0ced7f16a04aabe2d8d91cbbb52fb1162810 |
|
25-Sep-2012 |
Alexander Kornienko <alexfh@google.com> |
Macro history (de-)serialization. Deserialization currently reads only the latest macro definition. Needs more work. Summary: Passes all tests (+ the new one with code completion), but needs a thorough review in part related to modules. Reviewers: doug.gregor Reviewed By: alexfh CC: cfe-commits, rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D41 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b09de5177ee8101818a59dcd0038c75b190a2509 |
|
25-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce builtin macros to determine whether we're building a specific module (__building_module(modulename)) and to get the name of the current module as an identifier (__MODULE__). Used to help headers behave differently when they're being included as part of building a module. Oh, the irony. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
c12906ee78e006df6a71acf52ca9dd3171ddbf07 |
|
24-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we don't end up making an #undef'd macro visible after the fact. Test cases will come when we're actually (de-)serializing macro history. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
1824d54df85a462ada812dadda18130f951d40f3 |
|
13-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix Doxygen misuse: refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c30981a563a8947cb26b1e308d122fa2ef90fceb |
|
30-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Make preprocessor act in a GCC-compatible fashion when a macro is redefined within its own argument list. The original definition is used for the immediate expansion, but the new definition is used for any subsequent occurences within the argument list or after the expansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
70517ca5c07c4b41ff8662b94ee22047b0299f8c |
|
23-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix a bunch of -Wdocumentation warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ad0fe03b897f9486191e75c8d90c3ffa9b4fd6a5 |
|
23-Aug-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix an assortment of doxygen comment issues found by -Wdocumentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0576681bac125be07f77f66b02a3dba2c3a24557 |
|
18-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers and nested names as id-expressions, using the annot_primary_expr annotation, where possible. This removes some redundant lookups, and also allows us to typo-correct within tentative parsing, and to carry on disambiguating past an identifier which we can determine will fail lookup as both a type and as a non-type, allowing us to disambiguate more declarations (and thus offer improved error recovery for such cases). This also introduces to the parser the notion of a tentatively-declared name, which is an identifier which we *might* have seen a declaration for in a tentative parse (but only if we end up disambiguating the tokens as a declaration). This is necessary to correctly disambiguate cases where a variable is used within its own initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
58bf98725b6d4588338e191d2ab981b104471dab |
|
22-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: * Escaped # and < characters in Doxygen comments as needed; * Fixed up some \brief summaries; * Marked up some parameter references with \p; * Added \code...\endcode around code examples; * Used \returns a little more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
aa0cd85838f2a024e589ea4e8c2094130065af21 |
|
20-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Structured comment parsing, first step. * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
809d1be9820039b4cf6efa48246a0d70ffa13394 |
|
14-Jun-2012 |
James Dennett <jdennett@google.com> |
More doxygen/documentation cleanups. This reduces the number of warnings generated by Doxygen by about 100 (roughly 10%). Issues addressed: (1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments when they're not supposed to be Doxygen commands or links, and similarly for "<baz>" when it's not intended as as HTML tag; (2) Changed some \t commands (which don't exist) to \c ("to refer to a word of code", as the Doxygen manual says); (3) \precondition becomes \pre; (4) When touching comments, deleted a couple of spurious spaces in them; (5) Changed some \n and \r to \\n and \\r; (6) Fixed one tiny typo: #pragms -> #pragma. This patch touches documentation/comments only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
8c0b3787e7ccc7978b42dfbb84da2b802c743a5d |
|
06-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
Add a -rewrite-includes option, which is similar to -rewrite-macros, but only expands #include directives. Patch contributed by Lubos Lunak (l.lunax@suse.cz). Review by Matt Beaumont-Gay (matthewbg@google.com). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
66c44e700fb3f244b2c443bfbd6a05b5f1843ec0 |
|
10-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] Make sure that MacroExpands callbacks are always in source order. Fixes assertion hit in the preprocessing record. rdar://11426523 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
e2e8768c290ceceb3ac2e369b5243f40d6c0e3e2 |
|
31-Mar-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed MacroInfo definition range for function like macros with empty body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
4207edaf03da28fa917a94b31c5c1eef0e6417dc |
|
18-Mar-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Turns #import in MS Mode into an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e55329d6834647ba0e06f8a319e5d84c77310035 |
|
16-Mar-2012 |
Axel Naumann <Axel.Naumann@cern.ch> |
From Vassil Vassilev: Enable incremental parsing by the Preprocessor, where more code can be provided after an EOF. It mainly prevents the tearing down of the topmost lexer. To be used like this: PP.enableIncrementalProcessing(); while (getMoreSource()) { while (Parser.ParseTopLevelDecl(ADecl)) {...} } PP.enableIncrementalProcessing(false); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
c6c54521f95760a5eaf29b668d4bf41fe2af49d7 |
|
05-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] Enhance PreprocessingRecord to keep track of locations of conditional directives. Introduce PreprocessingRecord::rangeIntersectsConditionalDirective() which returns true if a given range intersects with a conditional directive block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
f4fb07ed4dfd144a39d904fc77b3b0bab580eb2e |
|
29-Feb-2012 |
Nico Weber <nicolasweber@gmx.de> |
Allow operator keywords to be #defined in ms-ext mode. Fixes PR10606. I'm not sure if this is the best way to go about it, but I locally enabled this code path without the msext conditional, and all tests pass, except for test/Preprocessor/cxx_oper_keyword.cpp which explicitly checks that operator keywords can't be redefined. I also parsed chromium/win with a clang with and without this patch. It introduced no new errors, but removes 43 existing errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e1d4330adaaa7faf093e725c9c993207eb2d778a |
|
25-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't record nested macro expansions in the preprocessing record, it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c93dc7889644293e318e19d82830ea2acc45b678 |
|
20-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import IntrusiveRefCntPtr<> into clang namespace The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 |
|
07-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
6f42b62b6194f53bcbc349f5d17388e1936535d7 |
|
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import OwningPtr<> into clang namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
8fe83e1df954d72c0f4ffc15d20a5222ec151c21 |
|
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move a method from IdentifierTable.h out of line and remove the SmallString include. Fix all the transitive include users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
fdd15602a42bbe26185978ef1e17019f6d969aa7 |
|
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove Diagnostic.h include from Preprocessor.h. - Move the offending methods out of line and fix transitive includers. - This required changing an enum in the PPCallback API into an unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
5d5051f3e79bf754134ccdf7a1dc7778cd80c73e |
|
24-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Only mark an IdentifierInfo as having changed since deserialization when it actually has changed (and not, e.g., when we've simply attached a deserialized macro definition). Good for ~1.5% reduction in module file size, mostly in the identifier table. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
69bda4c027671df7163619f215209529eb236620 |
|
19-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For Lexer's isAt[Start/End]OfMacroExpansion add an out parameter for the macro start/end location. It is commonly needed after calling the function; with this way we avoid recalculating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c2a8d6cee01fc4845f5409bf5c021a64616ac8c3 |
|
18-Jan-2012 |
Anna Zaks <ganna@apple.com> |
Refactor: Pull getImmediateMacroName() out of DiagnosticRenderer and into Lexer and Preprocessor; making it widely available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d6aba06861c41ccbc4926e5fe3cecd97b20410c0 |
|
04-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't treat 'import' as a contextual keyword when we're in a caching lexer, or when modules are disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c13a34b690d2dc2a03c2fea75a0a1438636c19ce |
|
03-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the uglified keyword __import_module__ for importing modules. This leaves us without an explicit syntax for importing modules in C/C++, because such a syntax needs to be discussed first. In Objective-C/Objective-C++, the @import syntax is used to import modules. Note that, under -fmodules, C/C++ programs can import modules via the #include mechanism when a module map is in place for that header. This allows us to work with modules in C/C++ without committing to a syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
94ad28b31433058445a27db722f60402ee820bea |
|
03-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Under -fmodules, accept #public <macroname> and #private <macroname> to make a macro public (the default for headers) or private, respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
5948ae1021122164b22f74353bb7fe325a64f616 |
|
03-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce a non-uglified syntax for module imports in Objective-C: @import identifier [. identifier]* ; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
752c74d99b647710a495c2ff5f815c30a30c3264 |
|
03-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Add a "Modules" language option, which subsumes the previous "AutoModuleImport" preprocessor option and is tied to -fmodules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
90db26000aefe9335370013eec64c85232d80227 |
|
02-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Implementing parsing and resolution of module export declarations within module maps, which will (eventually) be used to re-export a module from another module. There are still some pieces missing, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
1a4761edca58c6b559de825b9abfb66f7f1ba94a |
|
01-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Promote ModuleMap::Module to a namespace-scope class in the Basic library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b514c792821a8f053027d88444e13bfaa8efef76 |
|
30-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach the preprocessor how to handle module import declarations that involve submodules (e.g., importing std.vector), rather than always importing the top-level module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
1c2e9332fa69727425a3a2b912e36e2ab62083f8 |
|
20-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow preprocessor callbacks to recover from a "file not found" error, from Jason Haslam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c69c42e939e6bdaa56d162cc36da4f6b6c53e8db |
|
17-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When making a suggestion regarding which module to load rather than preprocess/parse a header, report back with an actual module (which may be a submodule) rather than just the name of the module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ba243b59a1074e0962f6abfa3bb9aa984eac1245 |
|
09-Nov-2011 |
David Blaikie <dblaikie@gmail.com> |
Fixing 80 col violations (& removing any trailing whitespace on files I was touching anyway) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
aa93a875605536d72a10359a0098396192b7d4ec |
|
17-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
For modules, all macros that aren't include guards are implicitly public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d768150ef57f617c8d9fef48f3c92e8f21698024 |
|
12-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Implement built-in macro '__has_warning', which allows one to query if a warning flag is valid. Fixes <rdar://problem/10263428>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
98d86b98b3fd0bd9c546123b16fd9995509aaae1 |
|
11-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when in C++98 mode. Only the first occurrence of each keyword will produce a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a08529cc3f00e0b47a3c028823634129ac46847b |
|
03-Oct-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed exapnsion range for # and ##. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
6b4ff04dd22e7159887ea6c1bb8b1c01fc9c70a9 |
|
27-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce a callback to PPCallbacks for lines skipped by the preprocessor. Patch by Jason Haslam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d6471f7c1921c7802804ce3ff6fe9768310f72b9 |
|
26-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename Diagnostic to DiagnosticsEngine as per issue 5397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
b8db7cd9ac05c522855631670ec2e97255384f5a |
|
08-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Optimize the preprocessor's handling of the __import_module__ keyword. We now handle this keyword in HandleIdentifier, making a note for ourselves when we've seen the __import_module__ keyword so that the next lexed token can trigger a module import (if needed). This greatly simplifies Preprocessor::Lex(), and completely erases the 5.5% -Eonly slowdown Argiris noted when I originally implemented __import_module__. Big thanks to Argiris for noting that horrible regression! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7d100872341f233c81e1d7b72b40457e62c36862 |
|
04-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Support code-completion for C++ inline methods and ObjC buffering methods. Previously we would cut off the source file buffer at the code-completion point; this impeded code-completion inside C++ inline methods and, recently, with buffering ObjC methods. Have the code-completion inserted into the source buffer so that it can be buffered along with a method body. When we actually hit the code-completion point the cut-off lexing or parsing. Fixes rdar://10056932&8319466 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
998b3d3e8528ebd9d2c5d78d3a82edd90a8953a4 |
|
02-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow the preprocessor to be constructed without performing target- and language-specific initialization. Use this to allow ASTUnit to create a preprocessor object *before* loading the AST file. No actual functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e2ca828119b8bff4a5c25c6db8ee4fec558451e7 |
|
01-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try keeping a 'LeadingEmptyMacroLoc' in NullStmt. This fails in the face of buffering C++/ObjC method bodies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3e3cd93b2fd9644e970c389e715c13883faf68b6 |
|
01-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach ASTContext and Preprocessor to hold on to references to the same LangOptions, rather than making distinct copies of LangOptions. Granted, LangOptions doesn't actually get modified, but this will eventually make it easier to construct ASTContext and Preprocessor before we know all of the LangOptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7143aab97c6e849a5a5005b7853b8c7d5af008ed |
|
01-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Modules hide macro definitions by default, so that silly things like include guards don't show up as macro definitions in every translation unit that imports a module. Macro definitions can, however, be exported with the intentionally-ugly #__export_macro__ directive. Implement this feature by not even bothering to serialize non-exported macros to a module, because clients of that module need not (should not) know that these macros even exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
65030af6526748ce11534e92f0ccefc44091ba13 |
|
31-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch __import__ over to __import_module__, so we don't conflict with existing practice with Python extension modules. Not that Python extension modules should be using a double-underscored identifier anyway, but... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
6be16fe900bdd1e5f677d23ae34fffead5bcfc77 |
|
27-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Take an entirely different approach to handling the "parsing" of __import__ within the preprocessor, since the prior one foolishly assumed that Preprocessor::Lex() was re-entrant. We now handle __import__ at the top level (only), after macro expansion. This should fix the buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
6aa52ec6b969faabf3764baf79d89810b8249a7e |
|
27-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for a simple module import declaration, which loads the named module. The syntax itself is intentionally hideous and will be replaced at some later point with something more palatable. For now, we're focusing on the semantics: - Module imports are handled first by the preprocessor (to get macro definitions) and then the same tokens are also handled by the parser (to get declarations). If both happen (as in normal compilation), the second one is redundant, because we currently have no way to hide macros or declarations when loading a module. Chris gets credit for this mad-but-workable scheme. - The Preprocessor now holds on to a reference to a module loader, which is responsible for loading named modules. CompilerInstance is the only important module loader: it now knows how to create and wire up an AST reader on demand to actually perform the module load. - We search for modules in the include path, using the module name with the suffix ".pcm" (precompiled module) for the file name. This is a temporary hack; we hope to improve the situation in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
88710f22be1acb04b7d812aebe87bea56394c07c |
|
03-Aug-2011 |
Eli Friedman <eli.friedman@gmail.com> |
A couple fixes for preprocessor expressions: 1. Be more tolerant of comments in -CC (comment-preserving) mode. We were missing a few cases. 2. Make sure to expand the second FOO in "#if defined FOO FOO". (See also r97253, which addressed the case of "#if defined(FOO FOO".) Fixes PR10286. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
2d3ba4f5a923a90c3fc290ddfba5e36c2d0a9b46 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon Mulder! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
686775deca8b8685eb90801495880e3abdd844c2 |
|
20-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
now that we have a centralized place to do so, add some using declarations for some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
9e5bb85ac899eeab7c21b5ff9030c3da6ff4837b |
|
14-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move the rest of the preprocessor terminology from 'instantiate' and variants to 'expand'. This changed a couple of public APIs, including one public type "MacroInstantiation" which is now "MacroExpansion". The rest of the codebase was updated to reflect this, especially the libclang code. Two of the C++ (and thus easily changed) libclang APIs were updated as well because they pertained directly to the old MacroInstantiation class. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
433db06b614f26dc6829e86d6ff469e2cca7d4f9 |
|
14-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Convert terminology in the Lexer from 'instantiate' and variants to 'expand'. Also update the public API it provides to the new term, and propagate that update to the various clients. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7a759606d93975866051f67104ae58446e55f404 |
|
07-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move SourceManager::isAt[Start/End]OfMacroInstantiation functions to the Lexer, since they depend on it now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
5b3284a9275a27f5c4410e25eb8933be540601d6 |
|
30-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce a caching mechanism for macro expanded tokens. Previously macro expanded tokens were added to Preprocessor's bump allocator and never released, even after the TokenLexer that were lexing them was finished, thus they were wasting memory. A very "useful" boost library was causing clang to eat 1 GB just for the expanded macro tokens. Introduce a special cache that works like a stack; a TokenLexer can add the macro expanded tokens in the cache, and when it finishes, the tokens are removed from the end of the cache. Now consumed memory by expanded tokens for that library is ~ 1.5 MB. Part of rdar://9327049. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c5c5e92ec53f7e6ac7ebbbf77c6d8e4b7d88daec |
|
30-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Preprocessor::getTotalMemory() and use it in CIndex.cpp, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c1b5fa41f09512c74030b9a2a0d1564535e22a76 |
|
13-May-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Introduce __has_extension macro __has_extension is a function-like macro which takes the same set of feature identifiers as __has_feature. It evaluates to 1 if the feature is supported by Clang in the current language (either as a language extension or a standard language feature) or 0 if not. At the same time, add support for the C1X feature identifiers c_generic_selections (renamed from generic_selections) and c_static_assert, and document them. Patch by myself and Jean-Daniel Dupas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
dca8ee8b7bc86076916a3a80f553f7a4e98c14af |
|
06-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new libclang parsing flag, CXTranslationUnit_NestedMacroInstantiations, which indicates whether we want to see "nested" macro instantiations (e.g., those that occur inside other macro instantiations) within the detailed preprocessing record. Many clients (e.g., those that only care about visible tokens) don't care about this information, and in code that uses preprocessor metaprogramming, this information can have a very high cost. Addresses <rdar://problem/9389320>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
28bbe4b8acc338476fe0825769b41fb32b423c72 |
|
28-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
Parsing/AST support for Structured Exception Handling Patch authored by Sohail Somani. Provide parsing and AST support for Windows structured exception handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b7d98d35ea723624345f06e5895ddce2e0388ef0 |
|
27-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
If a null statement was preceded by an empty macro keep its instantiation source location in NullStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
4f32786ac45210143654390177105eb749b614e9 |
|
21-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes. This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
834e3f6c77d9ac03997a3f0c56934edcf406a355 |
|
08-Mar-2011 |
John McCall <rjmccall@apple.com> |
Fix my earlier commit to work with escaped newlines and leave breadcrumbs in case we want to make a world where we can check intermediate instantiations for this kind of breadcrumb. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
30900dafbe972f4802c2663262b4393edab0d1cd |
|
08-Mar-2011 |
John McCall <rjmccall@apple.com> |
Add an API call to retrieve the spelling data of a token from its SourceLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
3437f1f1294499d4ef306c1089fcb3e29ec2aa68 |
|
03-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Speed up code-completion by skipping function bodies. When we are in code-completion mode, skip parsing of all function bodies except the one where the code-completion point resides. For big .cpp files like 'SemaExpr.cpp' the improvement makes a huge difference, in some cases cutting down code-completion time -62% ! We don't get diagnostics for the bodies though, so modify the code-completion tests that check for errors. See rdar://8814203. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
39b49bcaaddb1049234fca9500c0ac02c088e23d |
|
23-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
now the FileManager has a FileSystemOpts ivar, stop threading FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
44aa1f397855f130e88e62ffc1029f7f83bb5d2e |
|
20-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing" and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro. Thanks to Abramo Bagnara for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a25b6a4b43e8b9611f7506e5fe1b448833b10a46 |
|
19-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g: if (condition) CALL(0); // empty macro but don't warn for empty body. Fixes rdar://8436021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 |
|
18-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactoring of Diagnostic class. -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b0607279cb98bbf2bbfe0db170aed39ef91e86a2 |
|
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
move getSpelling from Preprocessor to Lexer, which it is more conceptually related to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a95880d6513c617bb96634bcc1f16c6bdb80dedc |
|
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
push the preprocessor out of EncodeUCNEscape git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7ef5c27eb6e8ebe58b52013246c06753c3613263 |
|
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
move AdvanceToTokenCharacter and getLocForEndOfToken from Preprocessor to Lexer where they make more sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
872a45e91778eb0b706ff57272fe547d4512eb19 |
|
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
add a static version of PP::AdvanceToTokenCharacter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
48cf9824fbad42995f4d91d59d08d2620effd683 |
|
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
add a static form of the efficient PP::getSpelling method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
389db16c63eec6ecfa9b235155252d8da766e94e |
|
03-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement -working-directory. When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along. --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism. FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions. Addresses rdar://8583824. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
295a2a617ac335f590e430ab7fcd98f8ce109251 |
|
30-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Make the deserialization of macro definitions lazy, so that we can load identifiers without loading their corresponding macro definitions. This is likely to improve PCH performance slightly, and reduces deserialization stack depth considerably when using preprocessor metaprogramming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ecdcb883cbc6bb4a2445dc6f02d58d9bdb54a0ed |
|
21-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend the preprocessing record and libclang with support for inclusion directives, keeping track of every #include, #import, etc. in the translation unit. We keep track of the source location and kind of the inclusion, how the file name was spelled, and the underlying file to which the inclusion resolved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
cae5095c116c29a4e52c91fa0ad88df09dd2b45f |
|
20-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Add a __has_attribute macro that works much like __has_feature and __has_builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
9714a2385cb66b6efa373fc668641de602dd9adb |
|
20-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Really^2 fix <rdar://problem/8361834>, this time without crashing. Now MICache is a linked list (per the FIXME), where we tradeoff between MacroInfo objects being in MICache and MIChainHead. MacroInfo objects in the MICache chain are already "Destroy()'ed", so they can be reused. When inserting into MICache, we need to remove them from the regular linked list so that they aren't destroyed more than once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
af8fa25c0d4e0540952a50bbd06dc1558954ccd9 |
|
19-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Simplify lifetime management of MacroInfo objects in Preprocessor by having the Preprocessor maintain them in a linked list of allocated MacroInfos. This requires only 1 extra pointer per MacroInfo object, and allows us to blow them away in one place. This fixes an elusive memory leak with MacroInfos (whose exact location I couldn't still figure out despite substantial digging). Fixes <rdar://problem/8361834>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
6cf750298d3621d8a10a6dd07fcee8e274b9d94d |
|
30-Aug-2010 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Revert my user-defined literal commits - r1124{58,60,67} pending some issues being sorted out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0016d519b831859526b79405cdae4c64c73731c8 |
|
29-Aug-2010 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement C++0x user-defined string literals. The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
55817afdf9d453a443262a733f6caf6692dca118 |
|
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a preprocessor code-completion hook for contexts where we expect "natural" language and should not provide any completions, e.g., comments, string literals, #error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
1fbb447e9d43c2c676e94081fbfee7eb6cbe933b |
|
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement preprocessor code completion where a macro name is expected, e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname> expression in a preprocessor conditional. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9 |
|
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic code-completion support for preprocessor directives, e.g., after a "#" we'll suggest #if, #ifdef, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
083abdf67f157e9d2ab5a8c9d5e71240479d3c99 |
|
28-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Record macros in dependent PCHs. Also add various info tables to dependent PCHs; tests for this to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
56eb1ec6e54080e47bbc62412737c25afb5211ed |
|
27-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix predicate in 'InCachingLexMode' to include 'CurPTHLexer'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f4f6c9db68465b886ec2e596feaa6ecc782395a4 |
|
26-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic support for loading a precompiled preamble while reparsing an ASTUnit. When saving a preamble, create a buffer larger than the actual file we're working with but fill everything from the end of the preamble to the end of the file with spaces (so the lexer will quickly skip them). When we load the file, create a buffer of the same size, filling it with the file and then spaces. Then, instruct the lexer to start lexing after the preamble, therefore continuing the parse from the spot where the preamble left off. It's now possible to perform a simple preamble build + parse (+ reparse) with ASTUnit. However, one has to disable a bunch of checking in the PCH reader to do so. That part isn't committed; it will likely be handled with some other kind of flag (e.g., -fno-validate-pch). As part of this, fix some issues with null termination of the memory buffers created for the preamble; we were trying to explicitly NULL-terminate them, even though they were also getting implicitly NULL terminated, leading to excess warnings about NULL characters in source files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
03569eaabceb14a20e23d043135fdccbc7309a96 |
|
12-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
If we are past tok::eof and in caching lex mode, avoid caching repeated tok::eofs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
321c2688198f6f1a4086964e505f239683423cec |
|
14-May-2010 |
Chris Lattner <sabre@nondot.org> |
fit in 80 cols, remove prototypes for handling #assert since apparently noone cares. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e127a0d80155b45dafe77f2b4380e5fa111a3345 |
|
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
push some source location information down through the compiler, into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
dbd8209b33e6c9f151e4913a9c095d64a95439c4 |
|
23-Mar-2010 |
Daniel Dunbar <daniel@zuster.org> |
PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b9e1b75772db2c7db566c6034ba90a07f22e35eb |
|
19-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Make the preprocessing record a PPCallbacks subclass itself, eliminating the extra PopulatePreprocessingRecord object. This will become useful once we start writing the preprocessing record to precompiled headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
94dc8f640ebea52241412512ed48601626edbc58 |
|
19-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Optionally store a PreprocessingRecord in the preprocessor itself, and tie its creation to a CC1 flag -detailed-preprocessing-record. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
dbf8ee630e4c86e5150492eaf8dbceea3c718ee1 |
|
17-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Entering the main source file in the preprocessor can fail if the source file has been changed. Handle that failure more gracefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a543016fe07030f695d6d56fd22c8c8da617e0d7 |
|
16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Audit all callers of SourceManager::getCharacterData(); update some of them to recover more gracefully on failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
50f6af7a6d6951a63f3da7d4c5a7d3965bf73b63 |
|
16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce optional "Invalid" parameters to routines that invoke the SourceManager's getBuffer() and, therefore, could fail, along with Preprocessor::getSpelling(). Use the Invalid parameters in the literal parsers (string, floating point, integral, character) to make them robust against errors that stem from, e.g., PCH files that are not consistent with the underlying file system. I still need to audit every use caller to all of these routines, to determine which ones need specific handling of error conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
193575455e00eca03fd7177f60e3f2e6263cb661 |
|
13-Mar-2010 |
Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> |
Use SmallString instead of SmallVector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a5d10c4df435964600e104ebef6a96b106e416b7 |
|
07-Mar-2010 |
Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> |
Rename to addPPCallbacks since we're effectively adding a callback and maybe chaining it to an existing one git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
51f5fe3f2527cd1640d798d8d134268b14de3e86 |
|
27-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move method out-of-line. I thought this would be a candidate for inlining but I was wrong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a15e7eaea9e63f58d1a7e72ed167cbb244da438a |
|
27-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix thinko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
33e9abd21083a0191a7676a04b497006d2da184d |
|
22-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach CIndex's cursor visitor to restrict its traversal to a specific region of interest (if provided). Implement clang_getCursor() in terms of this traversal rather than using the Index library; the unified cursor visitor is more complete, and will be The Way Forward. Minor other tweaks needed to make this work: - Extend Preprocessor::getLocForEndOfToken() to accept an offset from the end, making it easy to move to the last character in the token (rather than just past the end of the token). - In Lexer::MeasureTokenLength(), the length of whitespace is zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
046c2277dcbcc8eb89dbb5b1b8c5226b7cb81635 |
|
18-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
allow the HandlerComment callback to push tokens into the preprocessor. This could be used by an OpenMP implementation or something. Patch by Abramo Bagnara! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
88a35862fbe473f2a4f0c19f24dbe536937e1dc6 |
|
04-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach Preprocessor::macro_begin/macro_end to lazily load all macro definitions from a precompiled header. This ensures that code-completion with macro names behaves the same with or without precompiled headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
23f77e59718385512984d4e2a021bef52b9f6ddf |
|
15-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
set up the machinery for a MacroArgs cache hanging off Preprocessor. We creating and free thousands of MacroArgs objects (and the related std::vectors hanging off them) for the testcase in PR5610 even though there are only ~20 live at a time. This doesn't actually use the cache yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
1d9c54df56391ac4740db27d551782e81189cb51 |
|
14-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
formatting changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
63ceaa32a2371e38d1f912080fe471285e6b6e56 |
|
06-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
109ae73ec71a1d27358510ce049b59637b4a6b40 |
|
03-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Minor cleanup to the code-completion-point logic suggested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
2968442603b029949246467253eeac8139a5b6d8 |
|
02-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend the source manager with the ability to override the contents of files with the contents of an arbitrary memory buffer. Use this new functionality to drastically clean up the way in which we handle file truncation for code-completion: all of the truncation/completion logic is now encapsulated in the preprocessor where it belongs (<rdar://problem/7434737>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
39d9841ed4c0568d4b44dfbc12ac04491f60a374 |
|
01-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
pass the reason for failure up from MemoryBuffer and report it 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" ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
6e2901407bff59aeb4cc301cc58b034723d0eb49 |
|
30-Nov-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR5633 by making the preprocessor handle the case where we can 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". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0ff1042ddaad1419264be0de6da17f3b378482a4 |
|
14-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add static version of Preprocessor::getSpelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
444be7366d0a1e172c0290a1ea54c1cb16b5947c |
|
13-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
5814e657c9ad9ef6049a2a4af0d2aad248a8a15c |
|
11-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Allow Preprocessor to take ownership of the HeaderSearch object. I think it should probably always own the header search object, but I'm not sure... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c3222091e1ffa35d0264ca6b680a88c9dc84ede2 |
|
05-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Make LookUpIdentifierInfo const. This makes the Identifiers table mutable and is a little fuzzy, but conceptually it's just uniquing the identifier. Chris, please review. I debated splitting into const/non-const versions where the const one propogated constness to the resulting IdentifierInfo*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3da736c1143126be19b253804b3b135ebcd3d6ff |
|
05-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
StringRefize Preprocessor::getIdentifierInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
90b1827c1c1cf075266b96b416eefcf37924333b |
|
05-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Kill PreprocessorFactory, which was both morally repugnant and totally unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
92bd8c70a6837b647a6c55964f8d0a50bf561dbc |
|
02-Nov-2009 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Added __has_include and __has_include_next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a28cc090f265d5bdaef9ebb24fb9d579928d3a18 |
|
30-Oct-2009 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Re-arranged some internal functions for coming __has_include changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b657f115c3b4e262e72906a28cbcf3eaccd9460c |
|
22-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Replace the -code-completion-dump option with -code-completion-at=filename:line:column which performs code completion at the specified location by truncating the file at that position and enabling code completion. This approach makes it possible to run multiple tests from a single test file, and gives a more natural command-line interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
81b747b7fcc91c2fba9a3183d8fac80adbfc1d3e |
|
17-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of a code-completion interface in Clang. In essence, code completion is triggered by a magic "code completion" token produced by the lexer [*], which the parser recognizes at certain points in the grammar. The parser then calls into the Action object with the appropriate CodeCompletionXXX action. Sema implements the CodeCompletionXXX callbacks by performing minimal translation, then forwarding them to a CodeCompletionConsumer subclass, which uses the results of semantic analysis to provide code-completion results. At present, only a single, "printing" code completion consumer is available, for regression testing and debugging. However, the design is meant to permit other code-completion consumers. This initial commit contains two code-completion actions: one for member access, e.g., "x." or "p->", and one for nested-name-specifiers, e.g., "std::". More code-completion actions will follow, along with improved gathering of code-completion results for the various contexts. [*] In the current -code-completion-dump testing/debugging mode, the file is truncated at the completion point and EOF is translated into "code completion". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f4d5eb4866a27d497f0bb75b12c2ffd48ad4d9c0 |
|
12-Sep-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
SmallVectorize preprocessor's token cache. Testing shows there is almost never more than one token in the cache. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
ba1e898c64048e25cb65afec3807ad463e41914b |
|
23-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change Preprocessor to keep a copy of LangOptions instead of reference, like ASTContext. Now when creating a Preprocessor we can pass it a temporary LangOptions object instead of having to remember to keep it around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
1b63e4f732dbc73d90abf886b4d21f8e3a165f6d |
|
14-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Sink the BuiltinInfo object from ASTContext into the preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
148772a841cae6f32db16d890e788b92a763bb3f |
|
13-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
implement and document a new __has_feature and __has_builtin magic builtin preprocessor macro. This appears to work with two caveats: 1) builtins are registered in -E mode, and 2) target-specific builtins are unconditionally registered even if they aren't supported by the target (e.g. SSE4 builtin when only SSE1 is enabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e5393fb93eb879d9ebbef102ae9311fa77e023cc |
|
03-May-2009 |
Daniel Dunbar <daniel@zuster.org> |
PR4063, with feeling: Chain PP callbacks by default. - This is somewhat cleaner and also fixes PR4063 for real, I had the order wrong so we were just creating an empty dependency file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ab82f41b217ce588a9456c0b4411f219d3ed0df8 |
|
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
#line is allowed to have macros that expand to nothing after them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c1f9d828c733ec1eba06d01070735d1f36fda733 |
|
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e1d918e9fe55e3b34401fd5d420c47ea0f9572c9 |
|
11-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Compare the predefines buffer in the PCH file with the predefines buffer generated for the current translation unit. If they are different, complain and then ignore the PCH file. This effectively checks for all compilation options that somehow would affect preprocessor state (-D, -U, -include, the dreaded -imacros, etc.). When we do accept the PCH file, throw away the contents of the predefines buffer rather than parsing them, since all of the results of that parsing are already stored in the PCH file. This eliminates the ugliness with the redefinition of __builtin_va_list, among other things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
531cc8355608295caa01f31fa4e078d77a3d6470 |
|
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
do a dance with predefines, and finally enable reading of macros from PCH. This works now, except for limitations not being able to do things with identifiers. The basic example in the testcase works though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f908c519c1625e81d9e33d8a2a306a92834fe317 |
|
10-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
make a method public git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7c5d24efcd2e505b5739f7def08dfe25ce59a1b2 |
|
10-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
emit function-like and object-like macros to the PCH file. Note that we don't do anything useful with identifier infos yet and don't emit the tokens that the macros are defined to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
14f79002e58556798e86168c63e48d533287eda5 |
|
10-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH serialization/deserialization of the source manager. With this improvement, source locations read from the PCH file will properly resolve to the source files that were used to build the PCH file itself. Once we have the preprocessor state stored in the PCH file, source locations that refer to macro instantiations that occur in the PCH file should have the appropriate instantiation information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
de076650fa79a02743b5fe57a72f991ba24779f9 |
|
08-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject the #__include_macros directive unless it comes from the predefines buffer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
880dcf21dfdb3ff763c60195b6794bab0d913095 |
|
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Add accessor Preprocessor::getPTHManager(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7c175fb196a2bc3dbc86ea3865c713e1875f3f6d |
|
13-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR3798 by ignoring all diagnostics generated while repreprocessing a file in rewrite macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
836040f9eafe862fb1607df5c30cd3df0c22c832 |
|
13-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
make Preprocessor::Diags be a pointer instead of a reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
32fca722dd974b8202d0fb9c71b6c185c0767da6 |
|
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
make the token lexer allocate its temporary token buffers for preexpanded macro arguments from the preprocessor's bump pointer. This reduces # mallocs from 12444 to 11792. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
b2fb6de9070fea9abc56c8e8d5469066e964cefe |
|
27-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up and document code modification hints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
39a8de10c18365bde7062d8959b7ed525449c561 |
|
25-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing of nested-name-specifiers that involve template-ids, e.g., std::vector<int>::allocator_type When we parse a template-id that names a type, it will become either a template-id annotation (which is a parsed representation of a template-id that has not yet been through semantic analysis) or a typename annotation (where semantic analysis has resolved the template-id to an actual type), depending on the context. We only produce a type in contexts where we know that we only need type information, e.g., in a type specifier. Otherwise, we create a template-id annotation that can later be "upgraded" by transforming it into a typename annotation when the parser needs a type. This occurs, for example, when we've parsed "std::vector<int>" above and then see the '::' after it. However, it means that when writing something like this: template<> class Outer::Inner<int> { ... }; We have two tokens to represent Outer::Inner<int>: one token for the nested name specifier Outer::, and one template-id annotation token for Inner<int>, which will be passed to semantic analysis to define the class template specialization. Most of the churn in the template tests in this patch come from an improvement in our error recovery from ill-formed template-ids. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0301b3ff132a4d986c092d161cb77d74b04cd2a6 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
require the MAcroInfo objects are explcitly destroyed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
337edcdbec05316b407d0d64865c88ff8597d910 |
|
12-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
PTH: Cache stat information for files in the PTH file. Hook up FileManager to use this stat information in the PTH file using a 'StatSysCallCache' object. Performance impact (Cocoa.h, PTH): - number of stat calls reduces from 1230 to 425 - fsyntax-only: time improves by 4.2% We can reduce the number of stat calls to almost zero by caching negative stat calls and directory stat calls in the PTH file as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
09b5c1d08a33ecf5d9c61b922fbe679867336684 |
|
06-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add interface for walking macro table. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
277faca30c9f8f72b79f55695cbe3395ec246e7c |
|
27-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
PTH: Use Token::setLiteralData() to directly store a pointer to cached spelling data in the PTH file. This removes a ton of code for looking up spellings using sourcelocations in the PTH file. This simplifies both PTH-generation and reading. Performance impact for -fsyntax-only on Cocoa.h (with Cocoa.h in the PTH file): - PTH generation time improves by 5% - PTH reading improves by 0.3%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7216dc9cb49f47254595120cf15a737cee53f0bd |
|
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
rename getSpelledCharacterAt to getSpellingOfSingleCharacterNumericConstant, optimize it to use the LiteralData when possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
478a18ec47fdb7e0e580a2635648456e9db9ad4f |
|
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
add parsing and constraint enforcement for GNU line marker directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
359cc4475487ea0a660b3e8918334a2866e71c66 |
|
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
parse and enforce required constraints on #line directives. Right now we just discard them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
17d527b051fbc3927b8a1b4ce4607a9b2ed445ee |
|
23-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Preprocessor doesn't require and IdentifierInfoLookup object. Patch by Axel Naumann! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
6b7b84036126a8f2a3e312cfec0a9a4f8ae9d8ed |
|
17-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
suck the call to "getSpellingLoc" that all clients do into the implementation of PTHManager::getSpelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
0c21e84b82191ae1c4d04444a84008c464433868 |
|
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt. Slightly speed up sema of numbers like '1' by going directly to TargetInfo instead of through ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
df7c17a8d02fe09a3466786bae3e40fc3252687a |
|
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Change some terminology in SourceLocation: instead of referring to the "physical" location of tokens, refer to the "spelling" location. This is more concrete and useful, tokens aren't really physical objects! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
72b1b15ee88aac0a63e2c1dc53fe22f5ab297b20 |
|
15-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
IdentifierInfo: - IdentifierInfo can now (optionally) have its string data not be co-located with itself. This is for use with PTH. This aspect is a little gross, as getName() and getLength() now make assumptions about a possible alternate representation of IdentifierInfo. Perhaps we should make IdentifierInfo have virtual methods? IdentifierTable: - Added class "IdentifierInfoLookup" that can be used by IdentifierTable to perform "string -> IdentifierInfo" lookups using an auxilliary data structure. This is used by PTH. - Perform tests show that IdentifierTable::get() does not slow down because of the extra check for the IdentiferInfoLookup object (the regular StringMap lookup does enough work to mitigate the impact of an extra null pointer check). - The upshot is that now that some IdentifierInfo objects might be owned by the IdentiferInfoLookup object. This should be reviewed. PTH: - Modified PTHManager::GetIdentifierInfo to *not* insert entries in IdentifierTable's string map, and instead create IdentifierInfo objects on the fly when mapping from persistent IDs to IdentifierInfos. This saves a ton of work with string copies, hashing, and StringMap lookup and resizing. This change was motivated because when processing source files in the PTH cache we don't need to do any string -> IdentifierInfo lookups. - PTHManager now subclasses IdentifierInfoLookup, allowing clients of IdentifierTable to transparently use IdentifierInfo objects managed by the PTH file. PTHManager resolves "string -> IdentifierInfo" queries by doing a binary search over a sorted table of identifier strings in the PTH file (the exact algorithm we use can be changed as needed). These changes lead to the following performance changes when using PTH on Cocoa.h: - fsyntax-only: 10% performance improvement - Eonly: 30% performance improvement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
28396608ec20d44e9d1470e1ea51689bb504d0de |
|
14-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
PTH: - Use canonical FileID when using getSpelling() caching. This addresses some cache misses we were seeing with -fsyntax-only on Cocoa.h - Added Preprocessor::getPhysicalCharacterAt() utility method for clients to grab the first character at a specified sourcelocation. This uses the PTH spelling cache. - Modified Sema::ActOnNumericConstant() to use Preprocessor::getPhysicalCharacterAt() instead of SourceManager::getCharacterData() (to get PTH hits). These changes cause -fsyntax-only to not page in any sources from Cocoa.h. We see a speedup of 27%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
83cf05a3b0e655dc8ea1cb4c4e1eef541b770992 |
|
05-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a bug where we'd try to look beyond the current cached tokens when not in backtracking mode. This was just using the wrong predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0ea76727ae91bca918a8414ed85b530eddcfedeb |
|
15-Dec-2008 |
Ted Kremenek <kremenek@apple.com> |
Preprocessor: Allocate MacroInfo objects using a BumpPtrAllocator instead using new/delete. This speeds up -Eonly on Cocoa.h using the regular lexer by 1.8% and the PTHLexer by 3%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
268ee7016a2811803989487c0ad3799486092c63 |
|
12-Dec-2008 |
Ted Kremenek <kremenek@apple.com> |
Added PTH optimization to not process entire blocks of tokens that appear in skipped preprocessor blocks. This improves PTH speed by 6%. The code for this optimization itself is not very optimized, and will get cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
6137dc99ef0c2b14050631367057758b0d596cb3 |
|
02-Dec-2008 |
Ted Kremenek <kremenek@apple.com> |
Preprocessor: - Added method "setPTHManager" that will be called by the driver to install a PTHManager for the Preprocessor. - Fixed some comments. - Added EnterSourceFileWithPTH to mirror EnterSourceFileWithLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
adc4eeb08042a35ae914fc557ffec0cef3df2374 |
|
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Move the Preprocessor::Diag methods inline. This has the interesting (and carefully calculated) effect of allowing the compiler to reason about the aliasing properties of DiagnosticBuilder object better, allowing the whole thing to be promoted to registers instead of resulting in a ton of stack traffic. While I'm not very concerned about the performance of the Diag() method invocations, I *am* more concerned about their code size and impact on the non-diagnostic code. This patch shrinks the clang executable (in release-asserts mode with gcc-4.2) from 14523980 to 14519816 bytes. This isn't much, but it shrinks the lexer from 38192 to 37776, PPDirectives.o from 31116 to 28868 bytes, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
9efe9709287801562a3cbe1e5f3ab5dd8175c25b |
|
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
inline a method into its only two call sites. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3cbfe2c4159e0a219ae660d50625c013aa4afbd0 |
|
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Split the DiagnosticInfo class into two disjoint classes: one for building up the diagnostic that is in flight (DiagnosticBuilder) and one for pulling structured information out of the diagnostic when formatting and presenting it. There is no functionality change with this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3296ccea50e7b6649638bd666181e0825145e898 |
|
22-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix predicate: we're not in caching mode if CurPPLexer == 0, not CurLexer == 0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
34eaa24e6c2dc72bbbd5ad09694368cfd09c5f14 |
|
21-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Add comment to IsFileLexer, clean up indentation, and tighten how it's written. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
81d24e135c60dcbe421864e6a4334ba99b8fe7ec |
|
20-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Rename IsNonPragmaNonMacroLexer to IsFileLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7062d9e9fc3ed89c4e4ea7055efea6585b7bac8d |
|
20-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Preprocessor::isCurrentLexer() now takes a PreprocessorLexer* argument to match against CurPPLexer instead of CurLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
68e48e4a81767997ef0231e47eca4f665102c95e |
|
20-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Preprocessor::getCurrentFileLexer() now returns a PreprocessorLexer* instead of a Lexer*. This means it will either return the current (normal) file Lexer or a PTHLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
41938c8493b4380df738263166b746eacb33c309 |
|
19-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
- Move static function IsNonPragmaNonMacroLexer into Preprocessor.h. - Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry (simplifies some uses). - Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile. - Add 'FileID' to PreprocessorLexer, and have Preprocessor query this fileid when looking up the FileEntry for a file Performance testing of -Eonly on Cocoa.h shows no performance regression because of this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
08b2c3743a29a2dddcf72e95f747760e213cdde7 |
|
19-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix this: With this snippet: void f(a::b); An assert is hit: Assertion failed: CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token", file ..\..\lib\Lex\PPCaching.cpp, line 98 Introduce Preprocessor::RevertCachedTokens that reverts a specific number of tokens when backtracking is enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
fad03b2b38a3baea4b67e79e676fee15078e3258 |
|
19-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove Preprocessor::CacheTokens boolean data member. The same functionality can be provided by using Preprocessor::isBacktrackEnabled(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
2df37b8eaecc5382e0e511a738f88918f48d9454 |
|
19-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Revert 59574 (caused tests to fail). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0a3626444039396802fa35db24733c1963aebfac |
|
19-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
- Move static function IsNonPragmaNonMacroLexer into Preprocessor.h. - Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry (simplifies some uses). - Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile. Performance testing of -Eonly on Cocoa.h shows no performance regression because of this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
204b2fed909b1eabea7aeb6caadd7cff718edee5 |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Remove the last of the old-style Preprocessor::Diag methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
f89963b1e819d5e73796a4f9d7cd70129846e2ec |
|
18-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Preprocessor::PushIncludeMacroStack() should always zero out CurPPLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f6452c5421c5db5a7ceff581525f286931d97f1a |
|
18-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Add hooks to use PTHLexer::Lex instead of Lexer::Lex when CurLexer is null. Performance tests on Cocoa.h (using the regular Lexer) shows no performance difference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
9c1b750c59d510e6c9eccb1f37bccc46ccfe6844 |
|
18-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
- Add 'CurPPLexer' to Preprocessor to keep track of the current PreprocessorLexer, which will either be a 'Lexer' or 'PTHLexer'. - Added stub field 'CurPTHLexer' to keep track of the current PTHLexer. - Modified IncludeStackInfo to track both the current PTHLexer and current PreprocessorLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
2e1cd4264d363ca869bf37ef160902f211d21b8c |
|
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Introduction the DeclarationName class, as a single, general method of representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
caaa7df2c78bbd40197823034c0275f3dcbd63e7 |
|
13-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Using llvm::OwningPtr<> for CurLexer and CurTokenLexer. This makes both the ownership semantics of these objects explicit within the Preprocessor and also tightens up the code (explicit deletes not needed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0deae4b0eb085d1a34e0cb983750b5ed835c16a4 |
|
12-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Unbreak last commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d038def6e3f33bebf8c12bb3a95b2492c154a5dd |
|
12-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Add Preprocessor::PushIncludeMacroStack() and Preprocessor::PopIncludeMacroStack(), two utility methods for manipulating the Preprocessor stack. These will be used to remove manually manipulation of IncludeMacroStack from the rest of the Preprocessor implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3604e3895ecd850291b518e5a82246c888ce9d0f |
|
08-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce annotation tokens, a special kind of token, created and used only by the parser to replace a group of tokens with a single token encoding semantic information. Will be fully utilized later for C++ nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
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/include/clang/Lex/Preprocessor.h
|
721818304ac462d8c6ce05eecd02884033db78f1 |
|
26-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
Fix the rest of rdar://6243860 hopefully. This requires changing FileIDInfo to whether the fileid is a 'extern c system header' in addition to whether it is a system header, most of this is spreading plumbing around. Once we have that, PPLexerChange bases its "file enter/exit" notifications to PPCallbacks to base the system header state on FileIDInfo instead of HeaderSearch. Finally, in Preprocessor::HandleIncludeDirective, mirror logic in GCC: the system headerness of a file being entered can be set due to the #includer or the #includee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ed5c38682c056c147c8a4abb748b4f285de206dd |
|
24-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e671e1bc73615eda155059a772266ed2882d758c |
|
24-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Comment tweak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
a9e274c01ebae45629d93aaa07be450fb77dd3cb |
|
22-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow nested backtracks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7bfaaaecb3113f955db31e8d8a51acffd1bc0c27 |
|
10-Aug-2008 |
Nico Weber <nicolasweber@gmx.de> |
* Remove isInSystemHeader() from DiagClient, move it to SourceManager * 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
03db1b31dd926409b7defc1c90b66549464652c0 |
|
10-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahead and backtracking. 1) New public methods added: -EnableBacktrackAtThisPos -DisableBacktrack -Backtrack -isBacktrackEnabled 2) LookAhead() implementation is replaced with a more efficient one. 3) LookNext() is removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e3d5e3ae5bd8028774f07d7c3751d4db82118942 |
|
10-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Add an accessor, patch by Csaba Hruska. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
9e0ed0bd5a3a7bac73973980ff32132a7724e674 |
|
10-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add Preprocessor::LookNext method, which implements an efficient way to 'take a peek' at the next token without consuming it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
8ed3044a33679cbfa0617d465a50ec557d671ed7 |
|
05-May-2008 |
Chris Lattner <sabre@nondot.org> |
Neil pointed out that clang doesn't generate ranges from diagnostics related to pp-expressions. Doing so is pretty simple and this patch implements it, yielding nice diagnostics like: t.c:2:7: error: division by zero in preprocessor expression #if 1 / (0 + 0) ~ ^ ~~~~~~~ t.c:5:14: error: expected ')' in preprocessor expression #if (412 + 42 ~~~~~~~~^ t.c:5:5: error: to match this '(' #if (412 + 42 ^ t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574 #if (-42 + 0U) / -2 ~~~ ^ ~~ t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614 #if (-42 + 0U) / -2 ~~~~~~~~~~ ^ ~~ 5 diagnostics generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
aa39197431a0a0b1326ecf6b3be6a11f6e2f8503 |
|
20-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify ownership of the predefines buffer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
339b9c27759d7b6a53e2370f83f66e78b3254595 |
|
18-Apr-2008 |
Ted Kremenek <kremenek@apple.com> |
class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor. clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and passes it to the preprocessor object. clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main(). html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new Preprocessor to highlight macros. class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros(). Updated clients of HTMLDiagnostics to use this new interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ec6c574478a22008847d7ebc2498ef3336752096 |
|
17-Apr-2008 |
Ted Kremenek <kremenek@apple.com> |
Added "PreprocessorFactory", an interface for lazily creating Preprocessor objects on-demand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
eb50ed88c2aa040fac08bf2a50bde4dd3da6eb19 |
|
14-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make the preprocessor own its PPCallbacks, fixing a memory leak. Patch by Sam Bishop! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
6b884508c3bc97cc9df9516adb92fbf88dd0a2e4 |
|
10-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
implement simple support for arbitrary token lookahead. Change the objc @try parser to use it, fixing a FIXME. Update the objc-try-catch-1.m file to pass now that we get more reasonable errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
fde2bf9befede63e3f01f84519784c17b4c81480 |
|
09-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
rename HandleEndOfMacro -> HandleEndOfTokenLexer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
6cfe7594a46b5d270142cfcb688a9c1a3a487a48 |
|
09-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
rename some MacroExpander-related ivars to TokenLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
5d75de0f821023f4ed4815825bf3aea8a0b5e40d |
|
09-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Rename MacroExpander.cpp/h -> TokenLexer.cpp/h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
1543e9c69202b8e128c7fe34784ae7aa90964889 |
|
09-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
rename the MacroExpander class to TokenLexer. It handles both token streams and macro lexing, so a more generic name is useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
42e6737f2efb113563140ad794c21c7709250402 |
|
05-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Remove the first layer of support for "portability" warnings. This is theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
3f1cc838f9caf469990f23fccd0940263c0c61ff |
|
07-Feb-2008 |
Chris Lattner <sabre@nondot.org> |
Implement support for the extremely atrocious MS /##/ extension, which pastes together a comment. This is only enabled with -fms-extensions of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
94b3cdb57fd5d245963e597626e0dfd88d479795 |
|
08-Jan-2008 |
Chris Lattner <sabre@nondot.org> |
readability improvement suggested by Sam Bishop, thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
0bc735ffcfb223c0186419547abaa5c84482663e |
|
29-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Don't attribute in file headers anymore. See llvmdev for the discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
95041a2029a069386ee67439f6d0fb524a9d184f |
|
19-Dec-2007 |
Ted Kremenek <kremenek@apple.com> |
Interned MainFileID within SourceManager. Since SourceManager is referenced by both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
7dcc968f17a6ff9088c9651dddccc8d4025a1271 |
|
19-Dec-2007 |
Ted Kremenek <kremenek@apple.com> |
Typo fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
2243449253475574fc6f14986ff8f7fce5d46799 |
|
19-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Add support for #pragma mark, which shouldn't warn about bogus tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e0579f08d4a4ae57971b74ca1863106df4c6399f |
|
12-Dec-2007 |
Ted Kremenek <kremenek@apple.com> |
constified getFullLoc(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
2a2da1d0522b59c8c56f97a8607106be977a14af |
|
12-Dec-2007 |
Ted Kremenek <kremenek@apple.com> |
Renamed getFullSourceLoc() -> getFullLoc(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
ea8646993741739d8a04d67396fe466dcc3a104f |
|
12-Dec-2007 |
Ted Kremenek <kremenek@apple.com> |
Added method: Preprocessor::getFullSourceLoc. Used by clients of Preprocessor to get a FullSourceLoc from a SourceLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c3d8d57b010e2ed15a2a7685d5761db14f5d2252 |
|
09-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Add dumping support for locations, make -dumptokens print out the location info of each token. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
e5956bd2730c051835f9acd9e957c5d79f99e7c3 |
|
17-Oct-2007 |
Chris Lattner <sabre@nondot.org> |
add some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
53b0dabbe52219a8057659b90539837394ef0fa1 |
|
10-Oct-2007 |
Chris Lattner <sabre@nondot.org> |
Make a significant change to invert the control flow handling predefined macros. Previously, these were handled by the driver, now they are handled by the preprocessor. Some fallout of this: 1. Instead of preprocessing two buffers (the predefines, then the main source file) we now start preprocessing the main source file and inject the predefines as a "psuedo #include" from the main source file. 2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify Preprocessor::isInPrimaryFile. 3. The driver doesn't have to know about standard #defines, the preprocessor knows, which is nice for people wanting to define their own drivers. 4. This allows us to put normal tokens in the predefine buffer, for example a definition for __builtin_va_list that is target-specific, and a typedef for id in objc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
c7229c338c21ef26b01ef3ecf9eec4fd373fa9ec |
|
07-Oct-2007 |
Chris Lattner <sabre@nondot.org> |
move IdentifierTable.h from liblex to libbasic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
cc1a875f94630e58d24a55577ffbf0e89b7da8c7 |
|
07-Oct-2007 |
Chris Lattner <sabre@nondot.org> |
improve layering: Now instead of IdentifierInfo knowing anything about MacroInfo, only the preprocessor knows. This makes MacroInfo truly private to the Lex library (and its direct clients) instead of being accessed in the Basic library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
29238a0bf7cbf5b396efb451a0adb5fe4aa037ca |
|
05-Oct-2007 |
Steve Naroff <snaroff@apple.com> |
Layering refinements for selectors (suggested by Chris). Specifics... - Add SelectorTable, which enables us to remove MultiKeywordSelector from the public header. - Remove FoldingSet from IdentifierInfo.h and Preprocessor.h. - Remove Parser::ObjcGetUnarySelector and Parser::ObjcGetKeywordSelector, they are subsumed by SelectorTable. - Add MultiKeywordSelector to IdentifierInfo.cpp. - Move a bunch of selector related methods from ParseObjC.cpp to IdentifierInfo.cpp. - Added some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
bcfb06ac6da1aa3c74ac1ef7a49c2807522366e7 |
|
29-Sep-2007 |
Steve Naroff <snaroff@apple.com> |
Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument. This motivated implementing a devious clattner inspired solution:-) This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema). This change was critical to make now, before we have too many clients. I still need to add some comments to the Selector class...will likely add later today/tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
68d331a78e655d97294e94fcfa63f92cc1f40578 |
|
27-Sep-2007 |
Steve Naroff <snaroff@apple.com> |
Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits: #1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable. #2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%. #3: It results in many API simplifications. Here are some highlights: - Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages). - Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo). - Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured). I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later. Thanks to Chris for talking this through with me and suggesting this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
f1c99acc544a4e70f308db4e7200ca04cd5a06d2 |
|
23-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
refactor the interface to Preprocessor::GetIncludeFilenameSpelling, no functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
d217773f106856a11879ec79dc468efefaf2ee75 |
|
20-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
At one point there were going to be lexer and parser tokens. Since that point is now long gone, we should rename LexerToken to Token, as it is the only kind of token we have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
97ba77cf09bf7b83b679165ce67ad7d49ffd568c |
|
16-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
Add a new Preprocessor::AdvanceToTokenCharacter method which, given a sloc specifying the start of a token and a logical (phase 3) character number, returns a sloc representing the input character corresponding to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
9594acf32de2939b15eafa8fe818607bfc56bf66 |
|
15-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
Cache macro expander objects to avoid thrashing malloc in heavy expansion situations. This doesn't significantly improve carbon.h, but it does speed up INPUTS/macro_pounder_obj.c by 48% git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|
5f016e2cb5d11daeb237544de1c5d59f20fe1a6e |
|
11-Jul-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Stage two of getting CFE top correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/Preprocessor.h
|