]> granicus.if.org Git - clang/log
clang
9 years agodocs: Document byte arrays.
Peter Collingbourne [Thu, 12 Mar 2015 00:30:41 +0000 (00:30 +0000)]
docs: Document byte arrays.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231994 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: Print the clang version and original command in crash scripts
Justin Bogner [Thu, 12 Mar 2015 00:14:35 +0000 (00:14 +0000)]
Driver: Print the clang version and original command in crash scripts

When a crash report script doesn't work for a reproduction on your
machine for one reason or another, it can be really tricky to figure
out why not. The compiler version that crashed and the original
command line before stripping flags are very helpful when this comes
up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231989 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUnder duress, move check for target support of __builtin_setjmp/
Joerg Sonnenberger [Wed, 11 Mar 2015 23:46:32 +0000 (23:46 +0000)]
Under duress, move check for target support of __builtin_setjmp/
__builtin_longjmp to Sema as requested by John McCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231986 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd deprecation notice for -f(no-)sanitize-recover flags.
Alexey Samsonov [Wed, 11 Mar 2015 23:34:25 +0000 (23:34 +0000)]
Add deprecation notice for -f(no-)sanitize-recover flags.

These flags should be replaced with corresponding
-f(no-)sanitize-recover=<list> flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231983 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[analyzer] www: +progress for undefbehavior.ZeroAllocDereference
Anton Yartsev [Wed, 11 Mar 2015 22:29:32 +0000 (22:29 +0000)]
[analyzer] www: +progress for undefbehavior.ZeroAllocDereference

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231978 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't overconstrain a FileCheck pattern
David Majnemer [Wed, 11 Mar 2015 21:50:09 +0000 (21:50 +0000)]
Don't overconstrain a FileCheck pattern

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231971 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] ABI support for the QPX vector instruction set
Hal Finkel [Wed, 11 Mar 2015 19:14:15 +0000 (19:14 +0000)]
[PowerPC] ABI support for the QPX vector instruction set

Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231960 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMS ABI: Mark 'throw' as implemented in the compatibility doc
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231953 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMS ABI: Implement copy-ctor closures, finish implementing throw
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

Differential Revision: http://reviews.llvm.org/D8225

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231952 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] When merging the pattern of a class template definition into a prior
Richard Smith [Wed, 11 Mar 2015 18:21:02 +0000 (18:21 +0000)]
[modules] When merging the pattern of a class template definition into a prior
definition, be sure to update the definition data on all declarations, not just
the canonical one, since the pattern might not be in the list of pending
definitions (if it used to be canonical itself).

One-line fix by me; reduced testcase by Daniel Jasper!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231950 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReverted OpenCL2.0 atomic type commits r231932, r231935
Anastasia Stulova [Wed, 11 Mar 2015 17:26:37 +0000 (17:26 +0000)]
Reverted OpenCL2.0 atomic type commits r231932, r231935
(caused undesirable update of -std flag to use _Atomic)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231942 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agorevert r231700 (designated initializer patch) which broke
Fariborz Jahanian [Wed, 11 Mar 2015 16:59:48 +0000 (16:59 +0000)]
revert r231700 (designated initializer patch) which broke
several projects. rdar://20120666.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231939 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOpenCL: CL2.0 atomic type diagnostics
Anastasia Stulova [Wed, 11 Mar 2015 16:23:10 +0000 (16:23 +0000)]
OpenCL: CL2.0 atomic type diagnostics

Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231935 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOpenCL: CL2.0 atomic types
Anastasia Stulova [Wed, 11 Mar 2015 15:57:53 +0000 (15:57 +0000)]
OpenCL: CL2.0 atomic types

OpenCL C Spec v2.0 Section 6.13.11

- Made c11 _Atomic being accepted only for c11 compilations

- Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef

- Added diagnostics for atomics Khronos extension enabling

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231932 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd builtins for the 64-bit vector integer arithmetic instructions added in POWER8.
Kit Barton [Wed, 11 Mar 2015 15:57:19 +0000 (15:57 +0000)]
Add builtins for the 64-bit vector integer arithmetic instructions added in POWER8.

These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959.

Phabricator review: http://reviews.llvm.org/D8041

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231931 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Recognize the .ts (TypeScript) extension as JavaScript.
Daniel Jasper [Wed, 11 Mar 2015 14:58:38 +0000 (14:58 +0000)]
clang-format: Recognize the .ts (TypeScript) extension as JavaScript.

Patch by Martin Probst. Thank you.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231926 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Fix incorrect && recognition.
Daniel Jasper [Wed, 11 Mar 2015 12:59:49 +0000 (12:59 +0000)]
clang-format: Fix incorrect && recognition.

Before:
  if (a &&(b = c)) ..

After:
  if (a && (b = c)) ..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231920 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoEnable security checks for arc4random() on CloudABI as well.
Ed Schouten [Wed, 11 Mar 2015 08:48:55 +0000 (08:48 +0000)]
Enable security checks for arc4random() on CloudABI as well.

CloudABI also supports the arc4random() function. We can enable compiler
warnings for rand(), random() and *rand48() on this system as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231914 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix up default header paths for CloudABI.
Ed Schouten [Wed, 11 Mar 2015 08:46:01 +0000 (08:46 +0000)]
Fix up default header paths for CloudABI.

CloudABI is a pure cross compilation target. This means that we should
not add /usr/include and /usr/local/include. Instead, headers are stored
in $sysroot/$triple/include.

The method of going back to the sysroot (by using "../../..") is also
used in this function for some of the other environments (e.g., MinGW).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231913 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd target information for CloudABI on x86-64.
Ed Schouten [Wed, 11 Mar 2015 08:42:46 +0000 (08:42 +0000)]
Add target information for CloudABI on x86-64.

CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.

CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231912 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSema: Properly track mangling number/name for linkage for using decls
David Majnemer [Wed, 11 Mar 2015 06:45:39 +0000 (06:45 +0000)]
Sema: Properly track mangling number/name for linkage for using decls

Using declarations which are aliases to struct types have their name
used as the struct type's name for linkage purposes.  Otherwise, make
sure to give an anonymous struct defined inside a using declaration a
mangling number to disambiguate it from other anonymous structs in the
same context.

This fixes PR22809.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231909 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPrevent test from accessing files.
Daniel Jasper [Wed, 11 Mar 2015 06:01:01 +0000 (06:01 +0000)]
Prevent test from accessing files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231907 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
Alexey Bataev [Wed, 11 Mar 2015 04:48:56 +0000 (04:48 +0000)]
[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct
Differential Revision: http://reviews.llvm.org/D8200

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231905 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocument...
NAKAMURA Takumi [Wed, 11 Mar 2015 03:51:40 +0000 (03:51 +0000)]
CGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231903 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Avoid accidentally completing the redeclaration chain when updating
Richard Smith [Wed, 11 Mar 2015 01:44:51 +0000 (01:44 +0000)]
[modules] Avoid accidentally completing the redeclaration chain when updating
all the existing declarations of a record-like entity with a pointer to its
definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231901 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix test to specify an Itanium triple.
Richard Smith [Wed, 11 Mar 2015 01:09:01 +0000 (01:09 +0000)]
Fix test to specify an Itanium triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231900 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove a bugus test.
Rafael Espindola [Wed, 11 Mar 2015 00:28:59 +0000 (00:28 +0000)]
Remove a bugus test.

This was using the driver to test LLVM.

I checked that disabling the code path that the test was testing causes
llvm tests to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231895 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFor PR22870: produce an error rather than asserting if a designated initializer appea...
Richard Smith [Wed, 11 Mar 2015 00:12:17 +0000 (00:12 +0000)]
For PR22870: produce an error rather than asserting if a designated initializer appears in a signature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231892 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoGender-neutralize a comment.
Nico Weber [Wed, 11 Mar 2015 00:05:26 +0000 (00:05 +0000)]
Gender-neutralize a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231891 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Fix iterator invalidation issue with names being added to a module
Richard Smith [Wed, 11 Mar 2015 00:00:51 +0000 (00:00 +0000)]
[modules] Fix iterator invalidation issue with names being added to a module
while we're writing out the identifier table.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231890 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[analyzer] Make getCheckIfTracked() return either leak or regular checker.
Anton Yartsev [Tue, 10 Mar 2015 22:24:21 +0000 (22:24 +0000)]
[analyzer] Make getCheckIfTracked() return either leak or regular checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231863 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate clang for llvm r231861.
Eric Christopher [Tue, 10 Mar 2015 22:03:27 +0000 (22:03 +0000)]
Update clang for llvm r231861.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231862 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
Fariborz Jahanian [Tue, 10 Mar 2015 21:28:33 +0000 (21:28 +0000)]
[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
It is incorrect and better warning is issued under
-Warc-repeated-use-of-weak. rdar://16316934.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231851 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMS ABI: Mangle the location of the catchable type into it's name
David Majnemer [Tue, 10 Mar 2015 19:01:51 +0000 (19:01 +0000)]
MS ABI: Mangle the location of the catchable type into it's name

Because the catchable type has a reference to its name, mangle the
location to ensure that two catchable types with different locations are
distinct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231819 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRecognize objc_bridge(id) on bridged casts to CF types.
John McCall [Tue, 10 Mar 2015 18:41:23 +0000 (18:41 +0000)]
Recognize objc_bridge(id) on bridged casts to CF types.

Fixes <rdar://20107345>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231814 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake helper functions static. NFC.
Benjamin Kramer [Tue, 10 Mar 2015 18:24:01 +0000 (18:24 +0000)]
Make helper functions static. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231811 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThe semantic spelling enumeration should retain values to the spelling list indexes...
Aaron Ballman [Tue, 10 Mar 2015 17:19:18 +0000 (17:19 +0000)]
The semantic spelling enumeration should retain values to the spelling list indexes used by the attribute. The only attribute affected by this in practice is the OpenCLImageAccessAttr, which has duplicate semantic spellings that are automatically stripped.

We do not implicitly create an OpenCLImageAccessAttr, so this change only affects out of tree users. There is no way to test this behavior specifically that I can see, since this only affects implicit creation of attributes.

Fixes PR22403.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231803 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.
Sanjay Patel [Tue, 10 Mar 2015 15:19:26 +0000 (15:19 +0000)]
[X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.

We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.

This is the sibling patch for the LLVM half of this change:
http://reviews.llvm.org/D8086

Differential Revision: http://reviews.llvm.org/D8088

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231792 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDocument __has_feature(modules) in LanguageExtensions
Ben Langmuir [Tue, 10 Mar 2015 14:39:26 +0000 (14:39 +0000)]
Document __has_feature(modules) in LanguageExtensions

Fixes PR18985

Patch by Vassil Vassilev!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231789 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAllow -target= and --target options
Renato Golin [Tue, 10 Mar 2015 13:58:33 +0000 (13:58 +0000)]
Allow -target= and --target options

Using clang as a cross-compiler with the 'target' option could be confusing
for those inexperienced in the realm of cross compiling.

This patch would allow the use of all these four variants of the target option:
-target <triple>
--target <triple>
-target=<triple>
--target=<triple>

Patch by Gabor Ballabas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231787 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTeach raw_ostream to accept SmallString.
Yaron Keren [Tue, 10 Mar 2015 07:33:23 +0000 (07:33 +0000)]
Teach raw_ostream to accept SmallString.

Saves adding .str() call to any raw_ostream << SmallString usage
and a small step towards making .str() consistent in the ADTs by
removing one of the SmallString::str() use cases, discussion at

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html

I'll update the Phabricator patch http://reviews.llvm.org/D6372
for review of the Twine SmallString support, it's more complex
than this one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231763 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Initial codegen for 'omp task' directive.
Alexey Bataev [Tue, 10 Mar 2015 07:28:44 +0000 (07:28 +0000)]
[OPENMP] Initial codegen for 'omp task' directive.
The task region is emmitted in several steps:

Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry).
Here task_entry is a pointer to the function:
kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) {
    TaskFunction(gtid, tt->part_id, tt->shareds);
      return 0;
}
Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any).
Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t.
Emit a call to kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task), where new_task is a resulting structure from previous items.
Differential Revision: http://reviews.llvm.org/D7560

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231762 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fixed tests for non-debug builds. NFC.
Alexey Bataev [Tue, 10 Mar 2015 05:28:46 +0000 (05:28 +0000)]
[OPENMP] Fixed tests for non-debug builds. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231758 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Improved code for generating debug info + generation of all OpenMP regions...
Alexey Bataev [Tue, 10 Mar 2015 05:15:26 +0000 (05:15 +0000)]
[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope
Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions
Differential Revision: http://reviews.llvm.org/D7935

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231757 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[OPENMP] Improved code for generating debug info + generation of all OpenMP...
Rafael Espindola [Tue, 10 Mar 2015 04:40:21 +0000 (04:40 +0000)]
Revert "[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions Differential Revision: http://reviews.llvm.org/D7935"

This reverts commit r231752.

It was failing to link with cmake:

lib64/libclangCodeGen.a(CGOpenMPRuntime.cpp.o):/home/espindola/llvm/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:function clang::CodeGen::InlinedOpenMPRegionRAII::~InlinedOpenMPRegionRAII(): error: undefined reference to 'clang::CodeGen::EHScopeStack::popTerminate()'
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231754 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Improved code for generating debug info + generation of all OpenMP regions...
Alexey Bataev [Tue, 10 Mar 2015 04:22:11 +0000 (04:22 +0000)]
[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope
Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions
Differential Revision: http://reviews.llvm.org/D7935

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231752 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Don't bother looking up a declaration to merge into if we're not
Richard Smith [Tue, 10 Mar 2015 02:57:50 +0000 (02:57 +0000)]
[modules] Don't bother looking up a declaration to merge into if we're not
actually loading a formerly-canonical declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231742 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout
Mehdi Amini [Tue, 10 Mar 2015 02:36:43 +0000 (02:36 +0000)]
Update for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231739 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPR21687: when adding a redeclaration of a function with an implicit exception
Richard Smith [Tue, 10 Mar 2015 02:00:53 +0000 (02:00 +0000)]
PR21687: when adding a redeclaration of a function with an implicit exception
specification, update all prior declarations if the new one has an explicit
exception specification and the prior ones don't.

Patch by Vassil Vassilev! Some minor tweaking and test case by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231738 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Don't clobber a destructor's operator delete when adding another one;
Richard Smith [Tue, 10 Mar 2015 01:41:22 +0000 (01:41 +0000)]
[modules] Don't clobber a destructor's operator delete when adding another one;
move the operator delete updating into a separate update record so we can cope
with updating another module's destructor's operator delete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231735 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] This check is run before we resolve the header, not after, so just
Richard Smith [Tue, 10 Mar 2015 00:19:04 +0000 (00:19 +0000)]
[modules] This check is run before we resolve the header, not after, so just
check that private headers are in a list matching the role. (We can't perform
the opposite checks for non-private headers because we infer those.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231728 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Don't assert if the same header is named as both a public and a
Richard Smith [Mon, 9 Mar 2015 23:46:50 +0000 (23:46 +0000)]
[modules] Don't assert if the same header is named as both a public and a
private header within the same module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231725 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSuppress a couple of tests, clang/test/CodeGen/catch-undef-behavior.c and one, for...
NAKAMURA Takumi [Mon, 9 Mar 2015 22:32:03 +0000 (22:32 +0000)]
Suppress a couple of tests, clang/test/CodeGen/catch-undef-behavior.c and one, for -Asserts for now. They were introduced in r231711.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231717 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.
Alexey Samsonov [Mon, 9 Mar 2015 21:50:19 +0000 (21:50 +0000)]
[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.

This is a recommit of r231150, reverted in r231409. Turns out
that -fsanitize=shift-base check implementation only works if the
shift exponent is valid, otherwise it contains undefined behavior
itself.

Make sure we check that exponent is valid before we proceed to
check the base. Make sure that we actually report invalid values
of base or exponent if -fsanitize=shift-base or
-fsanitize=shift-exponent is specified, respectively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231711 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoARM: use ABI-specified alignment for byval parameters.
Tim Northover [Mon, 9 Mar 2015 21:40:42 +0000 (21:40 +0000)]
ARM: use ABI-specified alignment for byval parameters.

When passing a type with large alignment byval, we were specifying the type's
alignment rather than the alignment that the backend is actually capable of
producing (ABIAlign).

This would be OK (if odd) assuming the backend dealt with it prooperly,
unfortunately it doesn't and trying to pass types with "byval align 16" can
cause it to set fp incorrectly and trash the stack during the prologue. I'll be
fixing that in a separate patch, but Clang should still be emitting IR that's
as close to its intent as possible.

rdar://20059039

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231706 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PATCH Sema Objective-C]. Patch to warn on missing designated initializer
Fariborz Jahanian [Mon, 9 Mar 2015 20:39:51 +0000 (20:39 +0000)]
[PATCH Sema Objective-C]. Patch to warn on missing designated initializer
override where at least a declaration of a designated initializer is in a super
class and not necessarily in the current class. rdar://19653785.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231700 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRoll functions back into namespaces, msvc has problems with name lookup outside of it.
Benjamin Kramer [Mon, 9 Mar 2015 17:00:48 +0000 (17:00 +0000)]
Roll functions back into namespaces, msvc has problems with name lookup outside of it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231671 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCorrect doxygen for matcher macros that require a body. NFC.
Alexander Kornienko [Mon, 9 Mar 2015 16:57:49 +0000 (16:57 +0000)]
Correct doxygen for matcher macros that require a body. NFC.

http://reviews.llvm.org/D8146

Patch by Richard Thomson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231670 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake helper functions static. NFC.
Benjamin Kramer [Mon, 9 Mar 2015 16:47:52 +0000 (16:47 +0000)]
Make helper functions static. NFC.

Found by -Wmissing-prototypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231668 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake helper functions static
Benjamin Kramer [Mon, 9 Mar 2015 15:03:32 +0000 (15:03 +0000)]
Make helper functions static

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231657 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTooling: Hide implementation details
Benjamin Kramer [Mon, 9 Mar 2015 15:03:26 +0000 (15:03 +0000)]
Tooling: Hide implementation details

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231656 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInheritViz: Hide implementation details
Benjamin Kramer [Mon, 9 Mar 2015 15:03:20 +0000 (15:03 +0000)]
InheritViz: Hide implementation details

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231655 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoHide away implementation details of the ThreadSafetyAnalysis in anonymous namespaces
Benjamin Kramer [Mon, 9 Mar 2015 14:19:54 +0000 (14:19 +0000)]
Hide away implementation details of the ThreadSafetyAnalysis in anonymous namespaces

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231653 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a menu issue. patch by Vassil Vassilev
Sylvestre Ledru [Mon, 9 Mar 2015 09:09:55 +0000 (09:09 +0000)]
Fix a menu issue. patch by Vassil Vassilev

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231637 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Don't remove newline if macro ends in access specifier.
Daniel Jasper [Mon, 9 Mar 2015 08:13:55 +0000 (08:13 +0000)]
clang-format: Don't remove newline if macro ends in access specifier.

I.e.:

  #define A public:

  // The new line before this line would be removed.
  int a;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231636 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWarn when jumping out of a __finally block via goto.
Nico Weber [Mon, 9 Mar 2015 04:27:56 +0000 (04:27 +0000)]
Warn when jumping out of a __finally block via goto.

This only warns on direct gotos and indirect gotos with a unique label
(`goto *&&label;`).  Jumping out ith a true indirect goto is already an error.

This isn't O(1), but goto statements are less common than continue, break, and
return.  Also, the GetDeepestCommonScope() call in the same function does the
same amount of work, so this isn't worse than what's there in a complexity
sense, and it should be pretty fast in practice.

This is the last piece that was missing in r231623.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231628 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a theoretical bug when ParseCompoundStatement() returns StmtError.
Nico Weber [Mon, 9 Mar 2015 03:17:15 +0000 (03:17 +0000)]
Fix a theoretical bug when ParseCompoundStatement() returns StmtError.

ParseCompoundStatement() currently never returns StmtError, but if it did,
Sema would keep the __finally scope on its stack indefinitely.  Explicitly
add an error callback that clears it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231625 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWarn when jumping out of a __finally block via continue, break, return, __leave.
Nico Weber [Mon, 9 Mar 2015 02:47:59 +0000 (02:47 +0000)]
Warn when jumping out of a __finally block via continue, break, return, __leave.

Since continue, break, return are much more common than __finally, this tries
to keep the work for continue, break, return O(1).  Sema keeps a stack of active
__finally scopes (to do this, ActOnSEHFinally() is split into
ActOnStartSEHFinally() and ActOnFinishSEHFinally()), and the various jump
statements then check if the current __finally scope (if present) is deeper
than then destination scope of the jump.

The same warning for goto statements is still missing.

This is the moral equivalent of MSVC's C4532.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231623 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix typo in comment.
Nico Weber [Mon, 9 Mar 2015 02:34:29 +0000 (02:34 +0000)]
Fix typo in comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231622 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Mon, 9 Mar 2015 02:33:32 +0000 (02:33 +0000)]
Wrap to 80 columns. No behavior change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231621 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify boolean expressions in clang with clang-tidy
David Blaikie [Mon, 9 Mar 2015 02:02:07 +0000 (02:02 +0000)]
Simplify boolean expressions in clang with clang-tidy

Patch by Richard (legalize at xmission dot com).

Differential Revision: http://reviews.llvm.org/D8155

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231619 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoProperly initialize the parser_crash debug token.
Benjamin Kramer [Sun, 8 Mar 2015 19:28:24 +0000 (19:28 +0000)]
Properly initialize the parser_crash debug token.

Found by msan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231605 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix the MSVC build.
Benjamin Kramer [Sun, 8 Mar 2015 18:20:22 +0000 (18:20 +0000)]
Fix the MSVC build.

Type traits are hard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231604 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake Token a real POD type.
Benjamin Kramer [Sun, 8 Mar 2015 18:11:59 +0000 (18:11 +0000)]
Make Token a real POD type.

We copy them around a lot and skip construction in favor of startToken,
make the default construction trivial to reflect that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231603 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake constant static variables const so they can go into a read-only section
Benjamin Kramer [Sun, 8 Mar 2015 16:06:46 +0000 (16:06 +0000)]
Make constant static variables const so they can go into a read-only section

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231597 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Rewrite] Make RewriteBuffer accessible on its own, and add a unit test for it.
Argyrios Kyrtzidis [Sun, 8 Mar 2015 04:00:33 +0000 (04:00 +0000)]
[Rewrite] Make RewriteBuffer accessible on its own, and add a unit test for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231588 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Rewrite] Move RewriteBuffer into its own header.
Argyrios Kyrtzidis [Sun, 8 Mar 2015 04:00:28 +0000 (04:00 +0000)]
[Rewrite] Move RewriteBuffer into its own header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231587 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoASTMatchers: Make AST_POLYMORPHIC_SUPPORTED_TYPES a variadic macro
Benjamin Kramer [Sat, 7 Mar 2015 20:38:15 +0000 (20:38 +0000)]
ASTMatchers: Make AST_POLYMORPHIC_SUPPORTED_TYPES a variadic macro

C++11 finally allows us to use this C99 feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231575 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Sat, 7 Mar 2015 19:52:39 +0000 (19:52 +0000)]
Wrap to 80 columns. No behavior change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231573 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReapply r231508 "CodeGen: Emit constant temporaries into read-only globals."
Benjamin Kramer [Sat, 7 Mar 2015 13:37:13 +0000 (13:37 +0000)]
Reapply r231508 "CodeGen: Emit constant temporaries into read-only globals."

I disabled putting the new global into the same COMDAT as the function for now.
There's a fundamental problem when we inline references to the global but still
have the global in a COMDAT linked to the inlined function. Since this is only
an optimization there may be other versions of the COMDAT around that are
missing the new global and hell breaks loose at link time.

I hope the chromium build doesn't break this time :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231564 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMuch like we silence warnings about -flto in many cases to facilitate
Chandler Carruth [Sat, 7 Mar 2015 10:01:29 +0000 (10:01 +0000)]
Much like we silence warnings about -flto in many cases to facilitate
simplicity in build systems, silence '-stdlib=libc++' when linking. Even
if we're not linking C++ code per-se, we may be passing this flag so
that when we are linking C++ code we pick up the desired standard
library. While most build systems already provide separate C and C++
compile flags, many conflate link flags. Sadly, CMake is among them
causing this warning in a libc++ selfhost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231559 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[analyzer] RetainCountChecker: CF properties are always manually retain-counted.
Jordan Rose [Sat, 7 Mar 2015 05:47:24 +0000 (05:47 +0000)]
[analyzer] RetainCountChecker: CF properties are always manually retain-counted.

In theory we could assume a CF property is stored at +0 if there's not a custom
setter, but that's not really worth the complexity. What we do know is that a
CF property can't have ownership attributes, and so we shouldn't assume anything
about the ownership of the ivar.

rdar://problem/20076963

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231553 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[analyzer] Remove unused type (addition to r231540: "Revert changes from r229593")
Anton Yartsev [Sat, 7 Mar 2015 01:57:31 +0000 (01:57 +0000)]
[analyzer] Remove unused type (addition to r231540: "Revert changes from r229593")

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231548 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r231508 "CodeGen: Emit constant temporaries into read-only globals."
Hans Wennborg [Sat, 7 Mar 2015 00:46:19 +0000 (00:46 +0000)]
Revert r231508 "CodeGen: Emit constant temporaries into read-only globals."

This broke the Chromium build. Links were failing with messages like:

obj/dbus/libdbus_test_support.a(obj/dbus/dbus_test_support.mock_object_proxy.o):../../dbus/mock_object_proxy.cc:function dbus::MockObjectProxy::Detach(): warning: relocation refers to discarded section
/usr/local/google/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: treating warnings as errors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231541 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[analyzer] Revert changes from r229593; an enhancement is under discussion
Anton Yartsev [Sat, 7 Mar 2015 00:31:53 +0000 (00:31 +0000)]
[analyzer] Revert changes from r229593; an enhancement is under discussion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231540 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace Sema's map of locally-scoped extern "C" declarations with a DeclContext
Richard Smith [Sat, 7 Mar 2015 00:04:49 +0000 (00:04 +0000)]
Replace Sema's map of locally-scoped extern "C" declarations with a DeclContext
of extern "C" declarations. This is simpler and vastly more efficient for
modules builds (we no longer need to load *all* extern "C" declarations to
determine if we have a redeclaration).

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231538 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUnbreak build bots
David Majnemer [Fri, 6 Mar 2015 23:56:30 +0000 (23:56 +0000)]
Unbreak build bots

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231536 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMS ABI: Stick throw-related data into the .xdata section
David Majnemer [Fri, 6 Mar 2015 23:45:23 +0000 (23:45 +0000)]
MS ABI: Stick throw-related data into the .xdata section

This is a little nicer as it keeps the contents of .xdata away from
normal .rdata; we expect .xdata to be far colder than .rdata.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231534 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMS ABI: Correctly generate throw-info for pointer to const qual types
David Majnemer [Fri, 6 Mar 2015 23:45:20 +0000 (23:45 +0000)]
MS ABI: Correctly generate throw-info for pointer to const qual types

We didn't create type info based on the unqualified pointee type,
causing RTTI mismatches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231533 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Emit constant temporaries into read-only globals.
Benjamin Kramer [Fri, 6 Mar 2015 20:00:03 +0000 (20:00 +0000)]
CodeGen: Emit constant temporaries into read-only globals.

Instead of creating a copy on the stack just stash them in a private
constant global. This saves both the copying overhead and the stack
space, and gives the optimizer more room to constant fold.

This tries to make array temporaries more similar to regular arrays,
they can't use the same logic because a temporary has no VarDecl to be
bound to so we roll our own version here.

The original use case for this optimization was code like
  for (int i : {1, 2, 3, 4, 5, 6, 7, 8, 10})
    foo(i);
where without this patch (assuming that the loop is not unrolled) we
would alloca an array on the stack, copy the 10 values over and
iterate on that. With this patch we put the array in .text use it
directly. Apart from that case this helps on virtually any passing of
a constant std::initializer_list as a function argument.

Differential Revision: http://reviews.llvm.org/D8034

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231508 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMS ABI: Insert copy-constructors into the CatchableType
David Majnemer [Fri, 6 Mar 2015 18:53:55 +0000 (18:53 +0000)]
MS ABI: Insert copy-constructors into the CatchableType

Find all unambiguous public classes of the exception object's class type
and reference all of their copy constructors.  Yes, this is not
conforming but it is necessary in order to implement their ABI.  This is
because the copy constructor is actually referenced by the metadata
describing which catch handlers are eligible to handle the exception
object.

N.B.  This doesn't yet handle the copy constructor closure case yet,
that work is ongoing.

Differential Revision: http://reviews.llvm.org/D8101

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231499 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSema: The i8 suffix should yield a literal of type char
David Majnemer [Fri, 6 Mar 2015 18:04:22 +0000 (18:04 +0000)]
Sema: The i8 suffix should yield a literal of type char

We would make i8 literals turn into signed char instead of char.  This
is incompatible with MSVC.

This fixes PR22824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231494 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSema: We can use delegating ctors now. NFC.
Benjamin Kramer [Fri, 6 Mar 2015 16:36:50 +0000 (16:36 +0000)]
Sema: We can use delegating ctors now. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231488 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix isOverride() for the case of a dependent typed base class.
Samuel Benzaquen [Fri, 6 Mar 2015 16:24:47 +0000 (16:24 +0000)]
Fix isOverride() for the case of a dependent typed base class.

The method decl is not marked as overriding any other method decls
until the template is instantiated.
Use the override attribute as another signal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231487 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemoving code that is unused after r231424; NFC.
Aaron Ballman [Fri, 6 Mar 2015 14:24:53 +0000 (14:24 +0000)]
Removing code that is unused after r231424; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231477 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse delegating ctors to reduce code duplication. NFC.
Benjamin Kramer [Fri, 6 Mar 2015 14:15:57 +0000 (14:15 +0000)]
Use delegating ctors to reduce code duplication. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231476 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Slightly change indentation rules in for loops.
Daniel Jasper [Fri, 6 Mar 2015 10:57:12 +0000 (10:57 +0000)]
clang-format: Slightly change indentation rules in for loops.

There was already a TODO to double-check whether the extra indenation
makes sense. A slightly different case reveals that it is actively harmful:

  for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                      bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc;
       ++i) {
  }

Here (and it is probably not a totally infrequent case, it just works out that
"i < " is four spaces and so the four space extra indentation makes the
operator precedence confusing. So, this will now instead be formatted
as:

  for (int i = 0; i < aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                  bbbbbbbbbbbbbbbbbbbb < ccccccccccccccc;
       ++i) {
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231461 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSilence C4715 'not all control paths return a value' warnings.
Yaron Keren [Fri, 6 Mar 2015 07:49:14 +0000 (07:49 +0000)]
Silence C4715 'not all control paths return a value' warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231455 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't crash on non-public referenced dtors in toplevel classes.
Nico Weber [Fri, 6 Mar 2015 06:01:06 +0000 (06:01 +0000)]
Don't crash on non-public referenced dtors in toplevel classes.

Fixes PR22793, a bug that caused self-hosting to fail after the innocuous
r231254. See the bug for details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231451 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a download link to the web page (PR22764)
Hans Wennborg [Fri, 6 Mar 2015 00:13:55 +0000 (00:13 +0000)]
Add a download link to the web page (PR22764)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231431 91177308-0d34-0410-b5e6-96231b3b80d8