| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
so in a less malloc-intensive way.
llvm-svn: 157064
|
|
|
|
| |
llvm-svn: 153819
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expansions, e.g
"#include MACRO(STUFF)".
-As an inclusion position for the included file, use the file location of the file where it
was included but *after* the macro expansions. We want the macro expansions to be considered
as before-in-translation-unit for everything in the included file.
-In the preprocessing record take into account that only inclusion directives can be encountered
as "out-of-order" (by comparing the start of the range which for inclusions is the hash location)
and use binary search if there is an extreme number of macro expansions in the include directive.
Fixes rdar://11111779
llvm-svn: 153527
|
|
|
|
| |
llvm-svn: 153009
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
|
|
| |
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.
llvm-svn: 152098
|
|
|
|
|
|
|
|
| |
-Add location parameter for the directives callbacks
-Skip callbacks if the directive is inside a skipped range.
-Make sure the directive callbacks are invoked in source order.
llvm-svn: 152017
|
|
|
|
|
|
| |
implements PR 10705.
llvm-svn: 151949
|
|
|
|
|
|
|
|
| |
commit to a particular syntax for modules,
and don't have time to push it forward in the near future.
llvm-svn: 151841
|
|
|
|
| |
llvm-svn: 151804
|
|
|
|
|
|
| |
Fixes PR10705.
llvm-svn: 151800
|
|
|
|
|
|
| |
-fms-compatibility.
llvm-svn: 151776
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 151768
|
|
|
|
|
|
|
| |
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
|
|
|
|
| |
llvm-svn: 149566
|
|
|
|
|
|
| |
appropriate or when GCC requires it)
llvm-svn: 148292
|
|
|
|
| |
llvm-svn: 147469
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 147467
|
|
|
|
|
|
|
| |
to make a macro public (the default for headers) or private,
respectively.
llvm-svn: 147455
|
|
|
|
|
|
| |
"AutoModuleImport" preprocessor option and is tied to -fmodules.
llvm-svn: 147448
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hitting a submodule that was never actually created, e.g., because
that header wasn't parsed. In such cases, complain (because the
module's umbrella headers don't cover everything) and fall back to
including the header.
Later, we'll add a warning at module-build time to catch all such
cases. However, this fallback is important to eliminate assertions in
the ASTWriter when this happens.
llvm-svn: 146933
|
|
|
|
|
|
|
|
| |
#__include_macros) in the arguments of a function-style macro. Directives in the
arguments of such macros have undefined behaviour, and GCC does not correctly
support these cases. In some situations, this can lead to better diagnostics.
llvm-svn: 146765
|
|
|
|
|
|
|
| |
that's currently being built. This is important for supporting
transitive dependencies ("export *" in the module map) completely.
llvm-svn: 146156
|
|
|
|
|
|
|
| |
implicit ImportDecl in the translation unit to record the presence of
the import.
llvm-svn: 145727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(sub)module, all of the names may be hidden, just the macro names may
be exposed (for example, after the preprocessor has seen the import of
the module but the parser has not), or all of the names may be
exposed. Importing a module makes its names, and the names in any of
its non-explicit submodules, visible to name lookup (transitively).
This commit only introduces the notion of name visible and marks
modules and submodules as visible when they are imported. The actual
name-hiding logic in the AST reader will follow (along with test cases).
llvm-svn: 145586
|
|
|
|
|
|
|
|
|
| |
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).
llvm-svn: 145538
|
|
|
|
| |
llvm-svn: 145514
|
|
|
|
|
|
|
|
|
|
| |
callback client to suggest an alternative search path and after we
complain when the included file can't be found. The former can't be
tested in isolation, the latter doesn't actually matter (because we
won't make a module suggestion if no header is available). However,
the flow is better this way.
llvm-svn: 145502
|
|
|
|
| |
llvm-svn: 145501
|
|
|
|
|
|
| |
an #include/#import as a module import.
llvm-svn: 145500
|
|
|
|
|
|
|
| |
top-level module name to a module path (e.g., std.vector). We're still
missing a number of pieces for this actually to do something.
llvm-svn: 145462
|
|
|
|
|
|
| |
from Jason Haslam!
llvm-svn: 145012
|
|
|
|
|
|
|
| |
preprocess/parse a header, report back with an actual module (which
may be a submodule) rather than just the name of the module.
llvm-svn: 144925
|
|
|
|
|
|
|
| |
public. Add a __private_macro__ directive to hide a macro, similar to
the __module_private__ declaration specifier.
llvm-svn: 142188
|
|
|
|
|
|
|
|
| |
This also adds a -Wc++98-compat-pedantic for warning on constructs which would
be diagnosed by -std=c++98 -pedantic (that is, it warns even on C++11 features
which we enable by default, with no warning, in C++98 mode).
llvm-svn: 142034
|
|
|
|
| |
llvm-svn: 141596
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 140478
|
|
|
|
|
|
|
| |
#include or #import direcctives of framework headers into module
imports of the corresponding framework module.
llvm-svn: 139860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 138257
|
|
|
|
| |
llvm-svn: 136210
|
|
|
|
| |
llvm-svn: 135962
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
| |
llvm-svn: 134996
|
|
|
|
|
|
| |
file. rdar://9745065
llvm-svn: 134919
|
|
|
|
|
|
|
| |
(SourceManager::createFileID cannot return an invalid file ID).
Also update a comment to reflect this.
llvm-svn: 134168
|