| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
"1-4" specifiers are returned as numeric constants, not identifiers,
and should be treated as such. Currently pragma handler incorrectly
assumes that they are returned as identifiers.
Patch by Andrey Bokhanko.
Differential Revision: http://reviews.llvm.org/D9856
llvm-svn: 238129
|
|
|
|
| |
llvm-svn: 237872
|
|
|
|
|
|
|
|
|
|
| |
visibility is enabled) or leave and re-enter it, restore the macro and module
visibility state from last time we were in that submodule.
This allows mutually-#including header files to stand a chance at being
modularized with local visibility enabled.
llvm-svn: 237871
|
|
|
|
|
|
|
|
|
|
|
|
| |
glibc's headers use __need_* macros to selectively export parts of themselves
to each other. This requires us to enter those files repeatedly when building
a glibc module.
This can be unreverted once we have a better mechanism to deal with that
non-modular aspect of glibc (possibly some way to mark a header as "textual if
this macro is defined").
llvm-svn: 237718
|
|
|
|
|
|
|
|
|
|
| |
enter it more than once, even if it doesn't have #include guards -- we already
know that it is intended to have the same effect every time it's included, and
it's already had that effect. This particularly helps with local submodule
visibility builds, where the include guard macro may not be visible in the
includer, but will become visible the moment we enter the included file.
llvm-svn: 237609
|
|
|
|
|
|
|
| |
Fix a tiny bug where we'd try to load a module file for the module we're in
the middle of building.
llvm-svn: 237552
|
|
|
|
|
|
| |
modules is disabled, track submodule visibility anyway if -fmodules-local-submodule-visibility is enabled. This, in effect, gives modules semantics but without precompilation.
llvm-svn: 237550
|
|
|
|
|
|
| |
rather than converting to an absolute path. No observable change expected, but this allows us to correctly compute the module for an umbrella header, which later changes will require.
llvm-svn: 237508
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, enabling -fmodules-local-submodule-visibility results in name
visibility rules being applied to submodules of the current module in addition
to imported modules (that is, names no longer "leak" between submodules of the
same top-level module). This also makes it much safer to textually include a
non-modular library into a module: each submodule that textually includes that
library will get its own "copy" of that library, and so the library becomes
visible no matter which including submodule you import.
llvm-svn: 237473
|
|
|
|
|
|
|
|
|
|
|
|
| |
This, in preparation for the introduction of more new keywords in the
implementation of the C++ language, generalizes the support for future keyword
compat diagnostics (e.g., diag::warn_cxx11_keyword) by extending the
applicability of the relevant property in IdentifierTable with appropriate
renaming.
Patch by Hubert Tong!
llvm-svn: 237332
|
|
|
|
|
|
| |
change intended.
llvm-svn: 237331
|
|
|
|
|
|
| |
standard.
llvm-svn: 237202
|
|
|
|
|
|
|
|
| |
test macro only supports C++ style attributes, it doesn't apply to code compiled as C code, and can lead to diagnostics when given a scoped attribute.
This addresses PR23435.
llvm-svn: 236996
|
|
|
|
|
|
| |
This reverts commit 9242ff16b0460b488691fd70b42a2bf81a531e3a.
llvm-svn: 236806
|
|
|
|
| |
llvm-svn: 236804
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fix PR22407, where the Lexer overflows the buffer when parsing
#include<\
(end of file after slash)
Test Plan:
Added a test that will trigger in asan build.
This case is also covered by the clang-fuzzer bot.
Reviewers: rnk
Reviewed By: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D9489
llvm-svn: 236466
|
|
|
|
|
|
| |
MacroDirective*, in order to preserve full information on module macro expansion.
llvm-svn: 236404
|
|
|
|
|
|
|
|
|
|
| |
Preprocessor::MacroDefinition -> MacroDefinition.
clang::MacroDefinition now models the currently-defined value of a macro. The
previous MacroDefinition type, which represented a record of a macro definition
directive for a detailed preprocessing record, is now called MacroDefinitionRecord.
llvm-svn: 236400
|
|
|
|
| |
llvm-svn: 236390
|
|
|
|
| |
llvm-svn: 236376
|
|
|
|
|
|
| |
overrides nothing.
llvm-svn: 236374
|
|
|
|
|
|
|
|
| |
should not export the macro.
... at least, not unless we have local submodule visibility enabled.
llvm-svn: 236369
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag specifies that the normal visibility rules should be used even for
local submodules (submodules of the currently-being-built module). Thus names
will only be visible if a header / module that declares them has actually been
included / imported, and not merely because a submodule that happened to be
built earlier declared those names. This also removes the need to modularize
bottom-up: textually-included headers will be included into every submodule
that includes them, since their include guards will not leak between modules.
So far, this only governs visibility of macros, not of declarations, so is not
ready for real use yet.
llvm-svn: 236350
|
|
|
|
|
|
|
| |
It has no place there; it's not a property of the Module, and it makes
restoring the visibility set when we leave a submodule more difficult.
llvm-svn: 236300
|
|
|
|
| |
llvm-svn: 236285
|
|
|
|
|
|
| |
Wire this up to "#pragma clang __debug macro <name>".
llvm-svn: 236280
|
|
|
|
| |
llvm-svn: 236197
|
|
|
|
| |
llvm-svn: 236181
|
|
|
|
| |
llvm-svn: 236178
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modules builds fundamentally have a non-linear macro history. In the interest
of better source fidelity, represent the macro definition information
faithfully: we have a linear macro directive history within each module, and at
any point we have a unique "latest" local macro directive and a collection of
visible imported directives. This also removes the attendent complexity of
attempting to create a correct MacroDirective history (which we got wrong
in the general case).
No functionality change intended.
llvm-svn: 236176
|
|
|
|
| |
llvm-svn: 236032
|
|
|
|
| |
llvm-svn: 235957
|
|
|
|
|
|
|
| |
the active module macros at the point of definition, rather than reconstructing
it from the macro history. No functionality change intended.
llvm-svn: 235941
|
|
|
|
| |
llvm-svn: 235693
|
|
|
|
|
|
|
|
| |
local macros.
The surrounding infrastructure isn't quite ready for this yet.
llvm-svn: 235677
|
|
|
|
|
|
| |
from local submodules.
llvm-svn: 235669
|
|
|
|
|
|
| |
textually included into a file in the module.
llvm-svn: 235661
|
|
|
|
|
|
| |
duplicating the info within it.
llvm-svn: 235644
|
|
|
|
|
|
|
|
|
|
|
| |
that submodule.
Previously we'd defer this determination until writing the AST, which doesn't
allow us to use this information when building other submodules of the same
module. This change also allows us to use a uniform mechanism for writing
module macro records, independent of whether they are local or imported.
llvm-svn: 235614
|
|
|
|
|
|
| |
in this class.
llvm-svn: 235570
|
|
|
|
|
|
| |
by buildbot.
llvm-svn: 235464
|
|
|
|
|
|
|
|
| |
This graph will be used to determine the current set of active macros. This is
foundation work for getting macro visibility correct across submodules of the
current module. No functionality change for now.
llvm-svn: 235461
|
|
|
|
|
|
|
|
|
|
| |
In public MS headers for XAudio, clang would fail to generate a valid UUID due to the UUID components being combined with the '-' UUID separators. Clang would attempting to recover but would preserve the leading whitespace from the tokens after each failed paste leading to spaces creeping into the UUID and causing an error in the __declspace(uuid()) parsing.
Reference: Microsoft DirectX SDK (June 2010)\Include\XAudio2.h(51)
Resolves http://llvm.org/pr23071
llvm-svn: 235186
|
|
|
|
|
|
|
|
|
|
|
| |
initialize it.
Writing 4k of zeros is preferrable to 4k of random memory. Document that. While
there remove the initialization of the first byte of the buffer and start at
index zero. It was writing a literal '0' instead of a null byte at the
beginning anyways, which didn't matter since we never read it.
llvm-svn: 234202
|
|
|
|
|
|
| |
No functional change intended.
llvm-svn: 234184
|
|
|
|
|
|
|
|
|
|
|
| |
directive
ExpandBuiltinMacro would strip the identifier and downstream users crash
when they encounter an identifier token with nullptr identifier info.
Found by afl-fuzz.
llvm-svn: 233497
|
|
|
|
|
|
| |
It will crash downstream somewhere. Found by afl-fuzz.
llvm-svn: 233493
|
|
|
|
|
|
|
|
|
| |
While dereferencing ThisTokEnd is fine and we know that it's not in
[a-zA-Z0-9_.], ThisTokEnd[1] is really past the end.
Found by asan and with a little help from clang-fuzz.
llvm-svn: 233491
|
|
|
|
|
|
|
| |
We know that the last accessible char is not in [a-zA-Z0-9_.] so we can
happily scan on as long as it is. No functionality change.
llvm-svn: 233490
|
|
|
|
|
|
|
| |
modules, and allow sub-modules of a module with a use-declaration to make use
of the nominated modules.
llvm-svn: 233323
|