Age | Commit message (Collapse) | Author |
|
Add serialization for captured statements and captured decls. Also add
a const_capture_iterator to CapturedStmt.
Test contributed by Wei Pan
Differential Revision: http://llvm-reviews.chandlerc.com/D727
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181048 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179959 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
VerifyDiagnosticConsumer previously would not check that the diagnostic and
its matching directive referenced the same source file. Common practice was
to create directives that referenced other files but only by line number,
and this led to problems such as when the file containing the directive
didn't have enough lines to match the location of the diagnostic in the
other file, leading to bizarre file formatting and other oddities.
This patch causes VerifyDiagnosticConsumer to match source files as well as
line numbers. Therefore, a new syntax is made available for directives, for
example:
// expected-error@file:line {{diagnostic message}}
This extends the @line feature where "file" is the file where the diagnostic
is generated. The @line syntax is still available and uses the current file
for the diagnostic. "file" can be specified either as a relative or absolute
path - although the latter has less usefulness, I think! The #include search
paths will be used to locate the file and if it is not found an error will be
generated.
The new check is not optional: if the directive is in a different file to the
diagnostic, the file must be specified. Therefore, a number of test-cases
have been updated with regard to this.
This closes out PR15613.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179677 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179538 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
relevant standard library declarations
instead of depending on a system header inclusion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179537 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
available on all targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179514 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179447 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
1) Driver/output-file-is-dir.c - Checks for object file which can't
be created for Hexagon since assembler is unavailable.
2) PCH/cxx-typeid.cpp - 'typeinfo' include file is unavailable for Hexagon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179385 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
-emit-obj
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179301 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
caching the linkage for a declaration before we set up its redeclaration chain,
when determining whether a declaration could be a redeclaration of something
from an unimported submodule. We actually want to look at the declaration as if
it were not a redeclaration here, so compute the linkage but don't cache it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178733 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
member inside a class template) when loading a PCH file or module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178496 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Report and suggested fix by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=13020
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177330 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
the filename of the PCH file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176717 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Related to rdar://13114142
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176227 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175606 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
until recursive loading is finished.
Otherwise we may end up with a template trying to deserialize a template
parameter that is in the process of getting loaded.
rdar://13135282
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175329 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
restrictions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
preprocessor options;
since only one of them is allowed in command-line, process them separately.
Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.
Related to radar://13140508
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174385 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
-Wundefined-internal warnings with PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173538 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
problematic on win32 for while.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173439 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173419 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
bogus with a PCH
that redefined a macro without undef'ing it first.
Proper reconstruction of the macro info history from modules will properly fix this in subsequent commits.
rdar://13016031
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173281 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change also makes the serialisation store the required semantics,
fixing an issue where PPC128 was always assumed when re-reading a
128-bit value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173139 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
OpenCL restrictions (OpenCL 1.2 spec 6.9)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
complicated modules (<rdar://problem/13038265>). Unfortunately, this
un-fixes <rdar://problem/13016031>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172783 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Previously we would serialize the macro redefinitions as a list, part of
the identifier, and try to chain them together across modules individually
without having the info that they were already chained at definition time.
Change this by serializing the macro redefinition chain and then try
to synthesize the chain parts across modules. This allows us to correctly
pinpoint when 2 different definitions are ambiguous because they came from
unrelated modules.
Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH
is redefined without undef'ing it first.
rdar://13016031
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172620 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
http://llvm-reviews.chandlerc.com/D52
Patch by Philip Craig!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170634 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Add OpenCL images as clang builtin types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
these files to Windows style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
to r169831.
"ansi-escape-sequences" is easy convenient to exclude win32. Please be patient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169945 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169923 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
the cases where we can't determine whether special members would be trivial
while building the class, we eagerly declare those special members. The impact
of this is bounded, since it does not trigger implicit declarations of special
members in classes which merely *use* those classes.
In order to determine whether we need to apply this rule, we also need to
eagerly declare move operations and destructors in cases where they might be
deleted. If a move operation were supposed to be deleted, it would instead
be suppressed, and we could need overload resolution to determine if we fall
back to a trivial copy operation. If a destructor were implicitly deleted,
it would cause the move constructor of any derived classes to be suppressed.
As discussed on cxx-abi-dev, C++11's selected constructor rules are also
retroactively applied as a defect resolution in C++03 mode, in order to
identify that class B has a non-trivial copy constructor (since it calls
A's constructor template, not A's copy constructor):
struct A { template<typename T> A(T &); };
struct B { mutable A a; };
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169673 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
shouldn't need them after r169441.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169442 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169437 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
constructor/assignment operator with a const-qualified parameter type. The
prior method for determining this incorrectly used overload resolution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168775 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
not ReadExpr().
Also add a test case making sure the thread safety attributes work as expected
when they come from a PCH.
Fixes rdar://12584141 & http://llvm.org/PR13982
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168017 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
new container so we can safely iterate over them.
The container holding the lookup decls can under certain conditions
be changed while iterating (e.g. because of deserialization).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167816 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
reference instead of relying on computing it.
In general, if storage is no issue, it is preferable to deserialize info from
the PCH instead of trying to recompute it after the PCH was loaded.
The incentive to change this now was due to r155303 changing how friend template
classes in dependent contexts are handled; such classes can now be chained to
a previous template class but the computed InjectedClassNameType may be different
due to the extra template parameters from the dependent context.
The new handling requires more investigation but, in the meantime, writing out
InjectedClassNameType fixes PCH issue in rdar://12627738.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167425 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167379 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The stat cache became essentially useless ever since we started
validating all file entries in the PCH.
But the motivating reason for removing it now is that it also affected
correctness in this situation:
-You have a header without include guards (using "#pragma once" or #import)
-When creating the PCH:
-The same header is referenced in an #include with different filename cases.
-In the PCH, of course, we record only one file entry for the header file
-But we cache in the PCH file the stat info for both filename cases
-Then the source files are updated and the header file is updated in a way that
its size and modification time are the same but its inode changes
-When using the PCH:
-We validate the headers, we check that header file and we create a file entry with its current inode
-There's another #include with a filename with different case than the previously created file entry
-In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode
-because of the different inodes, we think they are different files so we go ahead and include its contents.
Removing the stat cache will potentially break clients that are attempting to use the stat cache
as a way of avoiding having the actual input files available. If that use case is important, patches are welcome
to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with
literal strings, line/column computations, etc.).
This fixes rdar://5502805
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167172 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
diagnostic states; make sure the ASTReader sets the diagnostic state
properly instead of always recreating it.
Fixes rdar://12581618 & http://llvm.org/PR14181
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166987 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166711 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
(so that it can have additional options set when trying to debug issues causing regressions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166681 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
the macros that are #define'd or #undef'd on the command line. This
checking happens much earlier than the current macro-definition
checking and is far cleaner, because it does a direct comparison
rather than a diff of the predefines buffers. Moreover, it allows us
to use the result of this check to skip over PCH files within a
directory that have non-matching -D's or -U's on the command
line. Finally, it improves the diagnostics a bit for mismatches,
fixing <rdar://problem/8612222>.
The old predefines-buffer diff'ing will go away in a subsequent commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166641 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
test, so that the test will work on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166601 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
-std=c++11.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166478 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
xpass) on msvc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166473 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166471 91177308-0d34-0410-b5e6-96231b3b80d8
|