]>
granicus.if.org Git - clang/log
NAKAMURA Takumi [Sun, 2 Feb 2014 16:46:03 +0000 (16:46 +0000)]
clang/lib/ASTMatchers/Dynamic/CMakeLists.txt: redundant
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200642
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 2 Feb 2014 16:35:43 +0000 (16:35 +0000)]
Sema: Reject templates in all extern "C" contexts.
Otherwise we'd accept them if the LinkageDecl was not the direct
parent DeclContext. PR17968.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 2 Feb 2014 15:28:46 +0000 (15:28 +0000)]
Report a correct end location for nameless parameters.
Ranges before:
void test(void (*)(int), int, float);
~~~~~~~~~~~~~ ~~~~ ~~~~~~
Ranges after:
void test(void (*)(int), int, float);
~~~~~~~~~~~~~ ~~~ ~~~~~
This does not change the actual location of the ParmVarDecl, it still
points to the location where the name would be. PR17970.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200640
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Sun, 2 Feb 2014 10:39:45 +0000 (10:39 +0000)]
Revert r200555, r200545.
These changes make it impossible to use ARM EHABI for stack unwinding without
enabling exceptions and break AddressSanitizer on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200627
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 2 Feb 2014 05:26:43 +0000 (05:26 +0000)]
[Sema] Follow-up on r200521 for the -Wnon-literal-null-conversion warning and revert its behavior for C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200622
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 1 Feb 2014 21:06:21 +0000 (21:06 +0000)]
Fix an assertion failure when building for the iOS simulator. rdar://
15959009
When building for i386 or x86_64 with IPHONEOS_DEPLOYMENT_TARGET set in the
environment, the toolchain correctly recognizes that the target platform is
the iOS simulator. The code in Darwin::addMinVersionArgs was not updated for
svn 197148, where isTargetIPhoneOS() was widely replaced by isTargetIOSBased().
This is kind of a strange case, though, because we probably ought to be
passing -ios_simulator_version_min to the linker, but according to the FIXME
in the code, we intentionally avoid that unless the -mios-simulator-version-min
option was used. I don't know whether it is safe to change that yet, so
for now, I am just fixing the assertion failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200618
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 1 Feb 2014 00:23:22 +0000 (00:23 +0000)]
Remove local type use in template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200598
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 1 Feb 2014 00:04:45 +0000 (00:04 +0000)]
[ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objects
When a non-trivial parameter is present, clang now gathers up all the
parameters that lack inreg and puts them into a packed struct. MSVC
always aligns each parameter to 4 bytes and no more, so this is a pretty
simple struct to lay out.
On win64, non-trivial records are passed indirectly. Prior to this
change, clang was incorrectly using byval on win64.
I'm able to self-host a working clang with this change and additional
LLVM patches.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D2636
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200597
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 31 Jan 2014 22:54:50 +0000 (22:54 +0000)]
[ms-cxxabi] Use x86_cdeclmethodcc for __cdecl methods on win32
This fixes PR15768, where the sret parameter and the 'this' parameter
are in the wrong order.
Instance methods compiled by MSVC never return records in registers,
they always return indirectly through an sret pointer. That sret
pointer always comes after the 'this' parameter, for both __cdecl and
__thiscall methods.
Unfortunately, the same is true for other calling conventions, so we'll
have to change the overall approach here relatively soon.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D2664
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 31 Jan 2014 22:28:50 +0000 (22:28 +0000)]
[ms-cxxabi] Raise aggregate memptr alignment to 8 for x86_32
With this change, we give different results for __alignof than MSVC, but
our record layout is compatible.
Some data member pointers also now have a size that is not a multiple of
their alignment.
Fixes PR18618.
Reviewers: majnemer
Differential Revision: http://llvm-reviews.chandlerc.com/D2669
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 31 Jan 2014 22:28:08 +0000 (22:28 +0000)]
Fix comment typo in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 31 Jan 2014 20:47:44 +0000 (20:47 +0000)]
Track the currently-being-built submodule inside the preprocessor (rather than
just storing a flag indicating if there was one), and include it in the 'end of
module' annotation. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 31 Jan 2014 19:44:55 +0000 (19:44 +0000)]
MS Intrin.h: implement __cpuidex and simplify __cpuid
The two identical implementations of __cpuid for X86 / X86_64 were
leftovers from my first iteration on the patch that implemented it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200568
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 31 Jan 2014 18:09:49 +0000 (18:09 +0000)]
[CMake] arcmt-test: Reorganize link libraries with *actually referenced* libs from arcmt-test.cpp.
arcmt-test doesn't depend on llvm codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 31 Jan 2014 16:19:26 +0000 (16:19 +0000)]
Last option on -fexception for arm-disable-ehabi
Previous commit would have a following flag overriding the behaviour
and not taken care of.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200555
91177308 -0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 31 Jan 2014 14:13:20 +0000 (14:13 +0000)]
Connect -fno-exceptions to -arm-disable-ehabi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 31 Jan 2014 12:49:42 +0000 (12:49 +0000)]
clang-format: (JavaScript) Don't crash on empty string literals.
Before, this would lead to a crash:
f('', true);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 31 Jan 2014 12:21:55 +0000 (12:21 +0000)]
Add tests for ARM RT library name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 31 Jan 2014 11:47:28 +0000 (11:47 +0000)]
ARM RT libs with generic name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200538
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:15 +0000 (11:19 +0000)]
[CMake] clang doesn't care whether CLANG_ENABLE_*(s) were set or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200533
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:09 +0000 (11:19 +0000)]
[CMake] Suppress SampleAnalyzerPlugin w/o ENABLE_STATIC_ANALYZER.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200532
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:04 +0000 (11:19 +0000)]
[CMake] Prune stray entries in add_dependencies(). target_link_libraries() implies it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 31 Jan 2014 10:49:34 +0000 (10:49 +0000)]
[sanitizer] update the list of supported platforms in the docs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 Jan 2014 10:46:52 +0000 (10:46 +0000)]
ARM & AArch64: unify the rest of the completely shared NEON implementations
This should be the last routine patch: AArch64 does still delegate to
EmitARMBuiltinExpr, but the remaining instances have complications of
one sort or another so some more cunning thought will be needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 Jan 2014 10:46:49 +0000 (10:46 +0000)]
ARM & AArch64: another block of miscellaneous NEON sharing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 Jan 2014 10:46:45 +0000 (10:46 +0000)]
ARM & AArch64: move shared vld/vst intrinsics to common implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 Jan 2014 10:46:41 +0000 (10:46 +0000)]
ARM & AArch64: more instructions into common block
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 Jan 2014 10:46:36 +0000 (10:46 +0000)]
ARM & AArch64: merge another NEON block completely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 31 Jan 2014 07:51:32 +0000 (07:51 +0000)]
[Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which are used
by some projects in their null macro.
rdar://
15925483
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200521
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Fri, 31 Jan 2014 05:15:34 +0000 (05:15 +0000)]
[OPENMP] Bug fixes in threadprivate declaration and data sharing attributes processing. (http://llvm-reviews.chandlerc.com/D2451)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Fri, 31 Jan 2014 04:07:13 +0000 (04:07 +0000)]
Make x86 Android default target CPUs compatible with GCC (http://llvm-reviews.chandlerc.com/D2655)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200510
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 31 Jan 2014 01:39:31 +0000 (01:39 +0000)]
libclang/Makefile: Reorder libraries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200508
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 31 Jan 2014 01:35:55 +0000 (01:35 +0000)]
Driver: Don't use DOS style paths on UNIX
We'd add, as a fallback, DOS style paths when using the driver using a
win32 triple. On a UNIX-like platform, this isn't particularly helpful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Fri, 31 Jan 2014 01:06:56 +0000 (01:06 +0000)]
Fix autolinking when modules are imported in pch files
Add the ImportDecl to the set of interesting delcarations that are
deserialized eagerly when an AST file is loaded (rather than lazily like
most decls). This is required to get auto linking to work when there is
no explicit import in the main file. Also resolve a FIXME to rename
'ExternalDefinitions', since that is only one of the things that need eager
deserialization. The new name is 'EagerlyDeserializedDecls'. The corresponding
AST bitcode is also renamed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 30 Jan 2014 22:38:41 +0000 (22:38 +0000)]
Introduce Parser::completeExpression.
This function returns a list of completions for a given expression and
completion position.
Differential Revision: http://llvm-reviews.chandlerc.com/D2261
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 30 Jan 2014 22:24:05 +0000 (22:24 +0000)]
PR14995: Allow a dependent type as the second parameter of operator++ and
operator--, since it might instantiate as 'int' (or, if it's a pack, it
might instantiate as an empty pack).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 30 Jan 2014 22:05:38 +0000 (22:05 +0000)]
Don't produce a 'returning reference to local' warning if a lambda returns a
reference (or pointer) to a variable from the closure object or from the
surrounding function scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Thu, 30 Jan 2014 21:50:18 +0000 (21:50 +0000)]
Revert "Fix assertion failures on annot_* tokens in clang -E"
This is causing a failure in the msan buildbot that I am having trouble
reproducing. Reverting until I can figure out what went wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Thu, 30 Jan 2014 18:09:55 +0000 (18:09 +0000)]
Fix assertion failures on annot_* tokens in clang -E
In particular, #pragma clang __debug, and #include implicitly changed
into @import were causing assertion failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 Jan 2014 14:48:01 +0000 (14:48 +0000)]
ARM & AArch64: extend shared NEON implementation to first block.
This extends the refactoring to the whole of the first block of
trivial correspondences (as a fairly arbitrary boundary).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 Jan 2014 14:47:57 +0000 (14:47 +0000)]
ARM & AArch64: fully share NEON implementation of permutation intrinsics
As a starting point, this moves the CodeGen for NEON permutation
instructions (vtrn, vzip, vuzp) into a new shared function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 Jan 2014 14:47:51 +0000 (14:47 +0000)]
ARM & AArch64: share the BI__builtin_neon enum defs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 30 Jan 2014 14:38:37 +0000 (14:38 +0000)]
clang-format: Support ObjC's NS_ENUMs.
Before:
typedef NS_ENUM(NSInteger, MyType) {
/// Information about someDecentlyLongValue.
someDecentlyLongValue,
/// Information about anotherDecentlyLongValue.
anotherDecentlyLongValue,
/// Information about aThirdDecentlyLongValue.
aThirdDecentlyLongValue};
After:
typedef NS_ENUM(NSInteger, MyType) {
/// Information about someDecentlyLongValue.
someDecentlyLongValue,
/// Information about anotherDecentlyLongValue.
anotherDecentlyLongValue,
/// Information about aThirdDecentlyLongValue.
aThirdDecentlyLongValue
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nikola Smiljanic [Thu, 30 Jan 2014 07:15:53 +0000 (07:15 +0000)]
Update debugging visualizers section.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200460
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 30 Jan 2014 04:48:04 +0000 (04:48 +0000)]
SPARCv9 supports atomic operations up to 64 bits.
Patch by Roman Divacky!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200452
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 30 Jan 2014 01:12:53 +0000 (01:12 +0000)]
Diagnose typedef names for linkage purposes that would change
a previously-computed linkage as an unsupportable error condition.
Per discussion on cfe-commits, this appears to be a
difficult-to-resolve flaw in our implementation approach;
we may pursue this as a language defect, but for now it's
better to diagnose it as unsupported than to produce
inconsistent results (or assertions). Anything that we can
do to limit how often this diagnostic fires, such as the
changes in r200380, is probably for the best, though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200438
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 30 Jan 2014 01:12:47 +0000 (01:12 +0000)]
Actually test that the local static variable from my
test in r200380 gets linkonce_odr linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 30 Jan 2014 01:01:36 +0000 (01:01 +0000)]
Use an Itanium triple in DWARF debug info tests
This should fix the clang part of the breakage in r200340.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 30 Jan 2014 00:16:39 +0000 (00:16 +0000)]
Objective-C [IRGen]. Generator a tail call to objc_getProperty() in
synthesized getters for performance improvement.
// rdar://
15884113
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 29 Jan 2014 22:13:45 +0000 (22:13 +0000)]
Consolidating several table-generated files containing parser-related string switches into a single file. This reduces build-related complexity by replacing four separate projects (and table-gen instantiations) with a single one.
No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200424
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 29 Jan 2014 22:07:36 +0000 (22:07 +0000)]
Sema: Diagnose improper application of inheritance keywords
We would previously allow inappropriate inheritance keywords to appear
on class declarations. We would also allow inheritance keywords on
templates which were not fully specialized; this was divergent from
MSVC.
Differential Revision: http://llvm-reviews.chandlerc.com/D2585
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 29 Jan 2014 18:52:43 +0000 (18:52 +0000)]
clang-format: More custom option fixes for protocol buffer files.
Before:
repeated double value = 1 [(
aaaaaaa .
aaaaaaaaa ) = {
aaaaaaaaaaaaaaaa :
AAAAAAAAAA ,
bbbbbbbbbbbbbbbb :
BBBBBBBBBB
}];
After:
repeated double value = 1
[(
aaaaaaa .
aaaaaaaaa ) = {
aaaaaaaaaaaaaaaa :
AAAAAAAAAA ,
bbbbbbbbbbbbbbbb :
BBBBBBBBBB }];
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 29 Jan 2014 18:43:40 +0000 (18:43 +0000)]
clang-format: Fix formatting of custom proto options.
Before:
repeated double value = 1 [(
aaaaaaa .
aaaaaaaaa ) = {
aaaaaaaaaaaaaaaaa :
AAAAAAAA
}];
After:
repeated double value = 1
[(
aaaaaaa .
aaaaaaaaa ) = {
aaaaaaaaaaaaaaaaa :
AAAAAAAA }];
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200405
91177308 -0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Wed, 29 Jan 2014 09:43:07 +0000 (09:43 +0000)]
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an updated test)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 29 Jan 2014 08:49:02 +0000 (08:49 +0000)]
Fix crash on unmatched #endif's.
The following snippet would crash:
#endif
#if A
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200381
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 29 Jan 2014 08:33:09 +0000 (08:33 +0000)]
Short-circuit a couple of queries (and avoid corrupting
the linkage cache) when type-checking static local
variables.
There's a very deep problem here where the linkage of
a declaration can suddenly massively change as soon as
it's given a typedef name; these fixes, while optimizations
in their own right, are really just targeted workarounds.
rdar://
15928125
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200380
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 29 Jan 2014 07:53:44 +0000 (07:53 +0000)]
Extensively comment bitfield layout, rearrange some
code for legibility, and fix a bug with bitfields in packed
ms_structs.
rdar://
15926990
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 29 Jan 2014 01:04:40 +0000 (01:04 +0000)]
clang-cl: Better error message when trying to compile stdin (PR18640)
We should suggest using /Tc or /Tp to set the input type, instead of
erroneously suggesting -x, which isn't a clang-cl flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Wed, 29 Jan 2014 00:09:16 +0000 (00:09 +0000)]
Fixing PR18430 by checking that the size of bitfields plus padding does not
grow into the following virtual base.
Differential Revision: http://llvm-reviews.chandlerc.com/D2560
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200359
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Tue, 28 Jan 2014 23:40:26 +0000 (23:40 +0000)]
A new conversion warning for when an Objective-C object literal is implicitly
cast into a boolean true value. This warning will catch code like:
if (@0) {}
if (@"foo") {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 28 Jan 2014 23:01:59 +0000 (23:01 +0000)]
Intrin.h: include setjmp.h to get a jmp_buf definition
This makes sure that the ms-intrin.cpp test passes by providing
a mock setjmp.h as a test input.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200344
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 28 Jan 2014 22:55:01 +0000 (22:55 +0000)]
Intrin.h: implement __rdtsc and __halt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 28 Jan 2014 22:46:29 +0000 (22:46 +0000)]
Objective-C. Fixes a bug where "new" family attribute
was not being overridden in the category method implementation
resulting in bogus warning. // rdar://
15919775
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200342
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 28 Jan 2014 20:41:15 +0000 (20:41 +0000)]
Objective-C. provide legacy encoding of *id and *Class types
instead of crashing. // rdar://
15824769 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 28 Jan 2014 20:13:43 +0000 (20:13 +0000)]
clang-format: Understand __attribute__s preceding parameter lists.
Before:
ReturnType __attribute__((unused))
function(int i);
After:
ReturnType __attribute__((unused))
function(int i);
This fixes llvm.org/PR18632.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 28 Jan 2014 18:51:11 +0000 (18:51 +0000)]
clang-format: Fix option formatting in protocol buffer files.
Before:
optional int32 foo[ default = true, deprecated = true ];
After:
optional int32 foo[default = true, deprecated = true];
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 28 Jan 2014 15:20:33 +0000 (15:20 +0000)]
clang-format: Add support for a space after @property
Mozilla and WebKit seem to use a space after @property (verified by
grepping their codebases) so we turn this on there as well.
Change by Christian Legnitto. Thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Tue, 28 Jan 2014 10:56:36 +0000 (10:56 +0000)]
[ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.
Arguments and return values must always be marshalled as for the base
AAPCS when the callee is a variadic function.
Patch by Oliver Stannard!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200307
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 28 Jan 2014 09:47:12 +0000 (09:47 +0000)]
[CMake] Apply llvm_update_compile_flags() to add_clang_library().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200302
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 28 Jan 2014 09:43:16 +0000 (09:43 +0000)]
[CMake] clangStaticAnalyzerFrontend: Deprecate LLVM_NO_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200296
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 28 Jan 2014 07:03:46 +0000 (07:03 +0000)]
Clarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 28 Jan 2014 06:59:32 +0000 (06:59 +0000)]
Fix this test and don't run it in ASan bootstrap
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 28 Jan 2014 06:30:35 +0000 (06:30 +0000)]
Turn on PIC by default on Android (http://llvm-reviews.chandlerc.com/D2603)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200290
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 28 Jan 2014 06:20:56 +0000 (06:20 +0000)]
Fix always-false conditional thinko in documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200289
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 28 Jan 2014 02:09:28 +0000 (02:09 +0000)]
Test case for clobbers on cpuid in ms inline asm
Tests r200279 in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 28 Jan 2014 01:47:34 +0000 (01:47 +0000)]
Relaxing the alignment requirements for fields in a transparent_union. Emits the diagnostic only when subsequent alignments are more strict than the alignment required by the first field.
Fixes PR15134
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Tue, 28 Jan 2014 00:46:47 +0000 (00:46 +0000)]
Apply the typo correction replacement location fix from r191450 to the
case when correcting for too many arguments (r191450 had only fixed the
problem for when there were too few arguments). Also fix the underlining
for both cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 27 Jan 2014 23:54:39 +0000 (23:54 +0000)]
Remove dead code; MacroDirective's IsHidden flag is always false.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 27 Jan 2014 22:57:33 +0000 (22:57 +0000)]
Reverting because reverting r200145.
Revert "check-clang doesn't require neither llvm_src_root nor llvm_obj_root."
This reverts commit r200146.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 27 Jan 2014 22:57:30 +0000 (22:57 +0000)]
Reverting because reverting r200145.
Revert "clang-check: Unittests doesn't requires tools."
This reverts commit r200147.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 27 Jan 2014 22:50:20 +0000 (22:50 +0000)]
Rumors of test_debuginfo's death are slightly exaggerated.
Revert "Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line.""
This reverts commit r200145.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 27 Jan 2014 22:44:17 +0000 (22:44 +0000)]
Another test for patch for // rdar://
15890251
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 27 Jan 2014 22:43:21 +0000 (22:43 +0000)]
Temporarily disable test that fails on Mac OS X 10.9.
PR18322. This test will be reenabled when the SDK gets fixed. In the meantime,
it is pretty disruptive to have this test keep failing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 27 Jan 2014 22:27:43 +0000 (22:27 +0000)]
ObjectiveC. Fixes a bug in recognition of an ivar
backing a property resulting in bogus warning.
// rdar://
15890251
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 27 Jan 2014 22:10:04 +0000 (22:10 +0000)]
Add a new attribute meta-spelling called "GCC" -- it widens into being a GNU spelling, and a CXX11 spelling with the namespace "gnu". It also sets a bit on the spelling certifying that it is known to GCC. From this, we can warn about the extension appropriately. As a consequence, the FunctionDefinition functionality is completely removed.
Replacing the functionality from r199676, which didn't solve the problem as elegantly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 27 Jan 2014 22:08:43 +0000 (22:08 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 27 Jan 2014 19:32:42 +0000 (19:32 +0000)]
Revert "intrin.h: include setjmp.h to get a jmp_buf definition"
This failed the ms-intrin.cpp test.
This reverts commit r200237.
This also comments out the _setjmpex declaration for now so that
intrin.h will work on x64 targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200243
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 27 Jan 2014 19:26:39 +0000 (19:26 +0000)]
Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
This reverts commit r200233.
The test required a registered ARM target, it was testing LLVM's
generated assembly, and it should have been an IRGen test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 27 Jan 2014 19:16:35 +0000 (19:16 +0000)]
Add implementations of some MSVC intrinsics
Adds an implementation for _InterlockedCompareExchangePointer() and
__faststorefence().
Patch by David Ziman!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200239
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 27 Jan 2014 19:14:49 +0000 (19:14 +0000)]
ObjectiveC. When introducing a new property declaration in
parimary class and in mrr mode, assume property's default
memory attribute (assign) and to prevent a bogus warning.
// rdar://
15859862
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 27 Jan 2014 19:14:09 +0000 (19:14 +0000)]
intrin.h: include setjmp.h to get a jmp_buf definition
This fixes an error on our _setjmpex declaration for 64-bit code and
allows us to declare _setjmp for 32-bit code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200237
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 27 Jan 2014 18:52:43 +0000 (18:52 +0000)]
Driver: support -fno-debug-types-section to override -fdebug-types-section
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 27 Jan 2014 18:48:02 +0000 (18:48 +0000)]
Add 'static __inline__' to MSVC intrinsics with implementations
This avoids warnings visible with -Wsystem-headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Mon, 27 Jan 2014 18:44:25 +0000 (18:44 +0000)]
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Mon, 27 Jan 2014 17:56:25 +0000 (17:56 +0000)]
XCore target exception handling
Implement __builtin_eh_return_data_regno()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 27 Jan 2014 17:55:43 +0000 (17:55 +0000)]
Comment parsing: don't crash while parsing \deprecated in a standalone comment
(comment without a decl).
I think this can not happen during normal compilation with -Wdocumentation,
only while using Clang APIs to parse comments outside of a source file.
Based on a patch by Olivier Goffart.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200230
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 27 Jan 2014 13:59:11 +0000 (13:59 +0000)]
[Mips] Fix __mips macro definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200223
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 27 Jan 2014 13:59:04 +0000 (13:59 +0000)]
[Mips] Change default CPU for MIPS 32/64 targets. Now they are mips32r2/mips64r2 respectively.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 27 Jan 2014 13:58:54 +0000 (13:58 +0000)]
[Mips] Add tests to check MIPS arch macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200221
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Mon, 27 Jan 2014 05:21:24 +0000 (05:21 +0000)]
Roll back the use of ConstStringRef for now
We might want try a different strategy so hold back on this for the moment, but
fix the off-by-one error in the original function template.
This reverts commit r200190.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200193
91177308 -0d34-0410-b5e6-
96231b3b80d8