| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 140846
|
|
|
|
|
|
| |
Patch by Jason Haslam!
llvm-svn: 140612
|
|
|
|
|
|
|
|
| |
buffer as an 'unsigned char', so that integer promotion doesn't
sign-extend character values > 127 into oblivion. Fixes
<rdar://problem/10188919>.
llvm-svn: 140608
|
|
|
|
|
|
| |
variable.
llvm-svn: 140514
|
|
|
|
| |
llvm-svn: 140478
|
|
|
|
| |
llvm-svn: 140368
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
|
|
| |
may be unordered and MSVC's debug-mode doesn't like it.
llvm-svn: 140337
|
|
|
|
| |
llvm-svn: 140288
|
|
|
|
| |
llvm-svn: 140287
|
|
|
|
| |
llvm-svn: 140256
|
|
|
|
|
|
| |
return a cursor for the inner macro.
llvm-svn: 140207
|
|
|
|
|
|
| |
don't store an extra location for it.
llvm-svn: 140190
|
|
|
|
| |
llvm-svn: 140073
|
|
|
|
|
|
| |
return iterators for local, non-loaded, preprocessed entities.
llvm-svn: 140062
|
|
|
|
|
|
|
|
|
|
| |
which will do a binary search and return a pair of iterators
for preprocessed entities in the given source range.
Source ranges of preprocessed entities are stored twice currently in
the PCH/Module file but this will be fixed in a subsequent commit.
llvm-svn: 140058
|
|
|
|
|
|
| |
It already works (and is useful with) macro locs as well.
llvm-svn: 140057
|
|
|
|
|
|
|
|
| |
that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.
Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.
llvm-svn: 139987
|
|
|
|
|
|
|
|
| |
the AST reader), merge that header file information with whatever
header file information we already have. Otherwise, we might forget
something we already knew (e.g., that the header was #import'd already).
llvm-svn: 139979
|
|
|
|
| |
llvm-svn: 139887
|
|
|
|
|
|
|
| |
#include or #import direcctives of framework headers into module
imports of the corresponding framework module.
llvm-svn: 139860
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Use an array of offsets for all preprocessed entities
-Get rid of the separate array of offsets for just macro definitions;
for references to macro definitions use an index inside the preprocessed
entities array.
-Deserialize each preprocessed entity lazily, at first request; not in bulk.
Paves the way for binary searching of preprocessed entities that will offer
efficiency and will simplify things on the libclang side a lot.
llvm-svn: 139809
|
|
|
|
|
|
|
|
|
| |
target triple to separate modules built under different
conditions. The hash is used to create a subdirectory in the module
cache path where other invocations of the compiler (with the same
version, language options, etc.) can find the precompiled modules.
llvm-svn: 139662
|
|
|
|
|
|
|
|
|
| |
but there is a corresponding umbrella header in a framework, build the
module on-the-fly so it can be immediately loaded at the import
statement. This is very much proof-of-concept code, with details to be
fleshed out over time.
llvm-svn: 139558
|
|
|
|
|
|
|
|
| |
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.
llvm-svn: 139538
|
|
|
|
|
|
| |
for a builtin macro expansion.
llvm-svn: 139298
|
|
|
|
|
|
|
| |
Objective-C. The @encode'ing of such an enumeration type is the same
as its underlying type. <rdar://problem/5276348>.
llvm-svn: 139297
|
|
|
|
|
|
|
|
|
|
| |
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.
llvm-svn: 139275
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
llvm-svn: 139265
|
|
|
|
|
|
|
|
| |
Jean-Daniel Dupas!
Also provide a modicum of test coverage for ranged for in C++98.
llvm-svn: 139149
|
|
|
|
|
|
|
|
| |
scannig backwards to see if the newline is escaped.
3% speedup in preprocessing all of clang with -Eonly. Also includes a small testcase for coverage.
llvm-svn: 139116
|
|
|
|
| |
llvm-svn: 139115
|
|
|
|
| |
llvm-svn: 139104
|
|
|
|
|
|
|
|
| |
Fix bug this uncovered.
Address minor comments from Doug.
Enable cxx_implicit_moves feature.
llvm-svn: 139101
|
|
|
|
|
|
| |
Fixes http://llvm.org/PR10826.
llvm-svn: 139087
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
llvm-svn: 139086
|
|
|
|
|
|
|
|
| |
The function was only counting lines that included tokens and not empty lines,
but MaxLines (mainly initiated to the line where the code-completion point resides)
is a count of overall lines (even empty ones).
llvm-svn: 139085
|
|
|
|
|
|
|
|
| |
and language-specific initialization. Use this to allow ASTUnit to
create a preprocessor object *before* loading the AST file. No actual
functionality change.
llvm-svn: 138983
|
|
|
|
|
|
| |
in the face of buffering C++/ObjC method bodies.
llvm-svn: 138972
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 138959
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 138943
|
|
|
|
|
|
| |
on Windows.
llvm-svn: 138880
|
|
|
|
|
|
|
|
| |
existing practice with Python extension modules. Not that Python
extension modules should be using a double-underscored identifier
anyway, but...
llvm-svn: 138870
|
|
|
|
|
|
|
|
| |
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 :)
llvm-svn: 138842
|
|
|
|
|
|
|
|
|
| |
collision between C99 hexfloats and C++0x user-defined literals by
giving C99 hexfloats precedence. Also, warning about user-defined
literals that conflict with hexfloats and those that have names that
are reserved by the implementation. Fixes <rdar://problem/9940194>.
llvm-svn: 138839
|
|
|
|
|
|
|
| |
features, so clients can check for the availability of these features
even before we get around to implementing them.
llvm-svn: 138741
|
|
|
|
|
|
|
|
|
| |
__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.
llvm-svn: 138704
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 138679
|
|
|
|
|
|
| |
out-of-sync how a file is compiled. Patch by Matthias Kleine!
llvm-svn: 138580
|
|
|
|
| |
llvm-svn: 138475
|