| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 233006
|
|
|
|
|
|
|
|
|
|
| |
Simplify boolean expressions using `true` and `false` with `clang-tidy`
Patch by Richard Thomson.
Differential Revision: http://reviews.llvm.org/D8531
llvm-svn: 232999
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there are lots more.
There are two use cases where str() is really needed:
1) To use one of StringRef member functions which is not available in
SmallString.
2) To convert to std::string, as StringRef implicitly converts while
SmallString do not. We may wish to change this, but it may introduce
ambiguity.
llvm-svn: 232622
|
|
|
|
|
|
|
|
| |
These calls are usually guarded by checks for isAnnotation() but it
looks like we missed a spot. This would cause the included test to
crash clang.
llvm-svn: 232616
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iterator_adaptor_base
This basically creates a wrapper around an 'int' that poses as an iterator.
While that looks a bit counter-intuitive it works just fine because iterator
operations and basic integer arithmetic works in exactly the same way.
Remove the manual integer wrapping code and reduce the reliance on iterator
internals in the implementation. No functionality change intended.
llvm-svn: 232322
|