| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
including fixing a nasty recent regression that could make us print "/foo.h" with a command-line including "-I ./".
rdar://problem/9734352
llvm-svn: 134728
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiation and improve diagnostics which are stem from macro
arguments to trace the argument itself back through the layers of macro
expansion.
This requires some tricky handling of the source locations, as the
argument appears to be expanded in the opposite direction from the
surrounding macro. This patch provides helper routines that encapsulate
the logic and explain the reasoning behind how we step through macros
during diagnostic printing.
This fixes the rest of the test cases originially in PR9279, and later
split out into PR10214 and PR10215.
There is still some more work we can do here to improve the macro
backtrace, but those will follow as separate patches.
llvm-svn: 134660
|
|
|
|
|
|
| |
this living in a separate branch.
llvm-svn: 134649
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
clang_saveTranslationUnit() to save a PCH file if the only errors it
contains are recoverable errors. Fixes <rdar://problem/9727804>.
llvm-svn: 134503
|
|
|
|
|
|
|
| |
between different classes of errors. Addresses most of
<rdar://problem/9660328>.
llvm-svn: 134495
|
|
|
|
|
|
|
| |
exception in Objective-C; in Objective-C++ we still use std::terminate().
This is only available in very recent runtimes.
llvm-svn: 134456
|
|
|
|
|
|
|
|
|
|
|
|
| |
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.
The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.
llvm-svn: 134453
|
|
|
|
|
|
| |
Patch by Jean-Daniel Dupas.
llvm-svn: 134414
|
|
|
|
| |
llvm-svn: 134406
|
|
|
|
|
|
| |
ArchLinux. =/ Fixes PR10246.
llvm-svn: 134299
|
|
|
|
| |
llvm-svn: 134283
|
|
|
|
|
|
|
|
|
|
|
| |
CompilerInvocation on the stack, because other objects (e.g., the
CompilerInstance) maintain an intrusive reference-counted pointer to
the CompilerInvocation. This doesn't matter in the normal case,
because we take back the CompilerInvocation. However, during crash
recovery, this leads to us trying to free an object on the stack, and
hilarity ensues. Fixes <rdar://problem/9652540>.
llvm-svn: 134245
|
|
|
|
|
|
| |
replacing -freset-local-blocks. // rdar://9227352
llvm-svn: 134082
|
|
|
|
|
|
|
| |
wipe out stack blocks when they go out of scope.
// rdar://9227352
llvm-svn: 134045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function-style macros, by not recursively printing notes for other 'instantiated from' notes.
This is a one line fix here:
+ // Don't print recursive instantiation notes from an instantiation note.
+ Loc = SM.getSpellingLoc(Loc);
While here, fix the testcase to be more precise (it got filecheck'ized
brutally), and fix EmitCaretDiagnostic to be private and to not pass down
the unused 'Level' argument.
llvm-svn: 133993
|
|
|
|
| |
llvm-svn: 133911
|
|
|
|
|
|
|
|
| |
the caret location
points to a macro instantiation.
llvm-svn: 133802
|
|
|
|
|
|
|
|
| |
'ownership', not 'lifetime'.
rdar://9477613.
llvm-svn: 133779
|
|
|
|
|
|
|
|
|
|
|
| |
This is the only usage in clang's headers, and it's for a define
that only exists on CMake builds for the sake of the MSVC compiler,
so just use an ifdef instead.
Also add an include for config.h in a file that actually needs it,
and was picking it up by accident indirectly.
llvm-svn: 133710
|
|
|
|
| |
llvm-svn: 133633
|
|
|
|
|
|
|
|
| |
use an "IgnoreSysRoot" argument. HeaderSearchOptions had been using the
opposite form with "IsSysRootRelative", which made for much confusion when
looking at true/false values in calls in AddPath. No functional change.
llvm-svn: 133550
|
|
|
|
|
|
|
|
|
| |
The -cxx-isystem path is not prefixed with the sysroot directory, so it's
not a good way for the driver to set the system default C++ search path.
Instead, add -stdlib as a cc1 option and teach the frontend how to find the
headers. The driver can then just pass -stdlib through to "cc1".
llvm-svn: 133547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Changes bit-field access policy to try to use (aligned) register sized accesses.
The idea here is that by using larger accesses we expose more coalescing
potential to the backend when we have situations like adjacent bit-fields in the
same structure (which is common), and that the backend should be smart enough to
narrow the accesses down when no coalescing is done or when it is shown not to
be profitable.
--
$ clang -m32 -O3 -S -o - t.c
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movb (%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, (%eax)
movb 1(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 1(%eax)
movb 2(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 2(%eax)
movb 3(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 3(%eax)
popl %ebp
ret
$ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl $-2139062144, %ecx ## imm = 0xFFFFFFFF80808080
andl (%eax), %ecx
orl $16843009, %ecx ## imm = 0x1010101
movl %ecx, (%eax)
popl %ebp
ret
--
llvm-svn: 133532
|
|
|
|
|
|
| |
use the deprecated forms of llvm::StringMap::GetOrCreateValue().
llvm-svn: 133515
|
|
|
|
|
|
|
| |
an assembly file it worked correctly, while for a .c file it would given an
error about how --noexecstack is not a supported argument to -Wa.
llvm-svn: 133489
|
|
|
|
| |
llvm-svn: 133437
|
|
|
|
|
|
|
|
| |
initialization of SourceManager
because it is going to modify the input file.
llvm-svn: 133323
|
|
|
|
|
|
| |
hoped it would be.
llvm-svn: 133315
|
|
|
|
|
|
|
|
|
| |
situations
because the Angled directories and the System directories were not being uniqued
together, breaking #include_next. I'll see about a testcase, but it will be insane.
llvm-svn: 133212
|
|
|
|
| |
llvm-svn: 133211
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are somewhat special in that they wrap any other FrontendAction,
running various ARC transformations or checks prior to the standard
action's run. To implement them easily, this extends FrontendAction to
have a WrapperFrontendAction utility class which forwards all calls by
default to an inner action setup at construction time. This is then
subclassed to override the specific behavior needed by the different
ARCMT tools.
Finally, FrontendTool is taught how to create these wrapper actions from
the existing flags and options structures.
The result is that clangFrontend no longer depends on clangARCMigrate.
This is very important, as clangARCMigrate *heavily* depends on
clangFrontend. Fundamentally ARCMigrate is at the same layer as
a library like Rewrite, sitting firmly on top of the Frontend, but tied
together with the FrontendTool when building the clang binary itself.
llvm-svn: 133161
|
|
|
|
|
|
|
| |
AFAIK, RHEL5 (and its clones) provides g++44 as the package "gcc44-c++".
By default, g++-4.1.1 is available, though, its libstdc++ would not be suitable to clang++.
llvm-svn: 133156
|
|
|
|
|
|
| |
them only on Darwin tool chains.
llvm-svn: 133112
|
|
|
|
|
|
| |
for this.
llvm-svn: 133104
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
inference, to be used (only) by the Objective-C rewriter.
llvm-svn: 133025
|
|
|
|
|
|
| |
reason to allow the user to control these semantics through a flag.
llvm-svn: 132919
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:
t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^
It also means that we get decent type inference when writing code in
Objective-C++0x:
auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id
llvm-svn: 132868
|
|
|
|
| |
llvm-svn: 132855
|
|
|
|
|
|
|
| |
-undef flag is passed in. Also __ASSEMBLER__ with -x assembler-with-cpp. (Don't
ask.)
llvm-svn: 132708
|
|
|
|
| |
llvm-svn: 132653
|
|
|
|
| |
llvm-svn: 132651
|
|
|
|
|
|
| |
passing -Wunknown-warning-option will re-enable warnings about -Wno-foo.
llvm-svn: 132570
|
|
|
|
|
|
| |
places this is a problem.
llvm-svn: 132542
|
|
|
|
|
|
|
|
| |
Patch by Tobias Hunger!
Fixes PR10008
llvm-svn: 132541
|
|
|
|
| |
llvm-svn: 132460
|
|
|
|
|
|
| |
control of f/fno-diagnostics-show-note-include-stack flags. This should help with reducing diagnostic spew from macros instantiations.
llvm-svn: 132143
|
|
|
|
|
|
|
|
|
| |
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
|