| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is switches all the interfaces points (and most of the commenst
/ local variables I saw on my way through) regarding the
NestedMacroInstantiations bit.
The libclang enums corresponding to this state were renamed, but
a legacy enum was added with the old name, and the same value to keep
existing clients working. I've added a documentation blurb for it, but
let me know if there is a canonical way to document legacy elemenst of
the libclang interface.
No functionality changed here, even in tests.
llvm-svn: 135141
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MacroInstantiation -> MacroExpansion rename. Internally, everything is
switched.
Introduce a new cursor kind enum with the new name, but retain the old
name as an alias so that we don't break backwards compatibility.
Also update the debug printing routine to use 'macro expansions' as its
explicitly not guaranteed to be stable, and mechanically switch the test
cases over to that.
llvm-svn: 135140
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 135139
|
|
|
|
| |
llvm-svn: 134918
|
|
|
|
|
|
| |
prefix to 'clang_'.
llvm-svn: 134916
|
|
|
|
| |
llvm-svn: 134847
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a new mode of migration, where we avoid modifying the original files but
we emit temporary files instead.
<path> will be used to keep migration process metadata. Currently the temporary files
that are produced are put in the system's temp directory but we can put them
in the <path> if is necessary.
Also introduce new ARC migration functions in libclang whose only purpose,
currently, is to accept <path> and provide pairs of original file/transformed file
to map from the originals to the files after transformations are applied.
Finally introduce the c-arcmt-test utility that exercises the new libclang functions,
update arcmt-test, and add tests for the whole process.
rdar://9735086.
llvm-svn: 134844
|
|
|
|
|
|
|
|
|
| |
clang_codeCompleteGetContexts(), that provides the client with
information about the context in which code completion has occurred
and what kinds of entities make sense as completions at that
point. Patch by Connor Wakamo!
llvm-svn: 134615
|
|
|
|
|
|
|
| |
between different classes of errors. Addresses most of
<rdar://problem/9660328>.
llvm-svn: 134495
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bendersky. Specifically:
* Implemented a new function in libclang: clang_isAttribute
* Fixing TranslationUnit.get_includes to only go through the argument
* buffer when it contains something. This fixed a crash on Windows
* clang_getFileName returns CXString, not char*. Made appropriate
* fixes in cindex.py - now the relevant tests pass and we can see the
* full locations correctly again (previously there was garbage in
* place of the file name)
* Exposed clang_getCursorDisplayName to the python bindings
llvm-svn: 134460
|
|
|
|
|
|
|
|
|
|
|
| |
for a template template parameter.
Uses to follow.
I've also made the uniquing of SubstTemplateTemplateParmPacks
use a ContextualFoldingSet as a minor space efficiency.
llvm-svn: 134137
|
|
|
|
|
|
|
|
| |
it at the appropriate place in CIndex.cpp
No functionality change.
llvm-svn: 134104
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 134103
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cursor
when the expression source range overlaps the declaration range.
This can happen for C++ constructor expressions whose range generally
include the variable declaration, e.g.:
MyCXXClass foo; // Make sure pointing at 'foo' returns a VarDecl cursor.
rdar://9124499.
llvm-svn: 133930
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
annotation of the
variable declaration that it belongs to.
This can happen for C++ constructor expressions whose range generally
include the variable declaration, e.g.:
MyCXXClass foo; // Make sure we don't annotate 'foo' as a CallExpr cursor.
rdar://9124499.
llvm-svn: 133929
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given
const int& r = 1.0;
The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value.
IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.
llvm-svn: 133521
|
|
|
|
|
|
| |
edge has been broken.
llvm-svn: 133343
|
|
|
|
|
|
| |
layering problem has been addressed.
llvm-svn: 133217
|
|
|
|
|
|
| |
before it on the link line.
llvm-svn: 133145
|
|
|
|
|
|
| |
linking unnecessarily into libclang.
llvm-svn: 133129
|
|
|
|
| |
llvm-svn: 133116
|
|
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
|
|
|
|
|
|
| |
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.
llvm-svn: 132612
|
|
|
|
|
|
| |
libclang. Fixes <rdar://problem/9537904>.
llvm-svn: 132603
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameter types to be ill-formed. However, it relies on the
completeness of method parameter types when producing metadata, e.g.,
for a protocol, leading IR generating to crash in such cases.
Since there's no real way to tighten down the semantics of Objective-C
here without breaking existing code, do something safe but lame:
suppress the generation of metadata when this happens.
Fixes <rdar://problem/9123036>.
llvm-svn: 132171
|
|
|
|
|
|
|
|
|
| |
Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.
Depends on llvm commit r132046.
llvm-svn: 132047
|
|
|
|
|
|
|
|
| |
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.
llvm-svn: 132017
|
|
|
|
| |
llvm-svn: 131491
|
|
|
|
| |
llvm-svn: 131230
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)
This fixes the bug that we weren't catching
void foo() = delete;
void foo() {}
as being a redefinition.
llvm-svn: 131013
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>.
llvm-svn: 130990
|
|
|
|
| |
llvm-svn: 130953
|
|
|
|
|
|
|
| |
libclang to emit information about resource usage after parsing, code
completion, etc.
llvm-svn: 130946
|
|
|
|
|
|
| |
the Preprocessor's bump allocator as well as those from the PreprocessingRecord.
llvm-svn: 130823
|
|
|
|
|
|
|
|
| |
which determines whether a particular file is actually a header that
is intended to be guarded from multiple inclusions within the same
translation unit.
llvm-svn: 130808
|
|
|
|
| |
llvm-svn: 130748
|
|
|
|
|
|
|
|
|
|
|
| |
3 lines of code and improve a bunch of information in the libclang view
of the code.
Updates the two tests that exercise this with the new data, checking
that each new source location actually points back to the declared
template parameter.
llvm-svn: 130656
|
|
|
|
| |
llvm-svn: 130541
|
|
|
|
|
|
| |
buffers used by PCH.
llvm-svn: 130460
|
|
|
|
|
|
| |
SourceManager's memory buffers.
llvm-svn: 130433
|
|
|
|
|
|
| |
ASTContext's side tables.
llvm-svn: 130383
|
|
|
|
|
|
| |
SourceManager's content cache allocator.
llvm-svn: 130380
|
|
|
|
|
|
|
|
| |
Patch authored by Sohail Somani.
Provide parsing and AST support for Windows structured exception handling.
llvm-svn: 130366
|
|
|
|
|
|
|
|
|
|
| |
Patch authored by John Wiegley.
These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).
llvm-svn: 130351
|
|
|
|
|
|
|
|
|
|
|
| |
bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function. Diagnose this in the general case. Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.
llvm-svn: 130239
|
|
|
|
|
|
|
|
|
| |
Patch authored by David Abrahams.
These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.
llvm-svn: 130122
|
|
|
|
|
|
|
| |
that a TypeSourceInfo is always available, like we do everywhere else
in libclang. Fixes <rdar://problem/9311140>.
llvm-svn: 130034
|
|
|
|
|
|
|
|
|
| |
function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.
Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.
llvm-svn: 130022
|
|
|
|
|
|
|
|
| |
adjust the a ending macro location to the end of the instantiation
location before adjusting it to the end of the token. Fixes
<rdar://problem/9021561>.
llvm-svn: 129872
|
|
|
|
| |
llvm-svn: 129857
|