]> granicus.if.org Git - clang/log
clang
9 years ago[modules] Produce an error if -cc1 wants to implicitly build a module and no
Richard Smith [Tue, 21 Jul 2015 18:07:47 +0000 (18:07 +0000)]
[modules] Produce an error if -cc1 wants to implicitly build a module and no
module cache has been provided, rather than creating one in the current
directory.

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

9 years agoUpdate the documentation for "novtable" to match r242730.
Bob Wilson [Tue, 21 Jul 2015 16:40:03 +0000 (16:40 +0000)]
Update the documentation for "novtable" to match r242730.

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

9 years agoAdd missing parentheses to appease -Wlogical-op-parentheses.
Daniel Jasper [Tue, 21 Jul 2015 16:18:51 +0000 (16:18 +0000)]
Add missing parentheses to appease -Wlogical-op-parentheses.
Add missing case to appease -Wswitch.

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

9 years ago[X86][AVX512F] add FP arithmetic intrinsics
Asaf Badouh [Tue, 21 Jul 2015 15:27:28 +0000 (15:27 +0000)]
[X86][AVX512F] add FP arithmetic intrinsics
add/div/mul/sub include rounding versions

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

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

9 years agoCommit for http://reviews.llvm.org/D10765
Michael Wong [Tue, 21 Jul 2015 13:44:28 +0000 (13:44 +0000)]
Commit for http://reviews.llvm.org/D10765
for OpenMP 4 target data directive parsing and sema.
This commit is on behalf of Kelvin Li.

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

9 years agoRemoving attribute documentation headings that are not required and do not add clarit...
Aaron Ballman [Tue, 21 Jul 2015 12:20:53 +0000 (12:20 +0000)]
Removing attribute documentation headings that are not required and do not add clarity; NFC.

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

9 years agoFix mingw toolchain to honor sysroot on Linux and add tests.
Yaron Keren [Tue, 21 Jul 2015 11:01:00 +0000 (11:01 +0000)]
Fix mingw toolchain to honor sysroot on Linux and add tests.

It should now support three mingw distributions running on Windows
and three Linux distributions. The include directories for each are
listed in the comments.

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

9 years ago[ARM] Pass subtarget feature "+reserve-r9" instead of passing backend
Akira Hatanaka [Tue, 21 Jul 2015 01:41:08 +0000 (01:41 +0000)]
[ARM] Pass subtarget feature "+reserve-r9" instead of passing backend
option "-arm-reserve-r9".

This recommits r242736, which had to be reverted because the llvm-side
change that was committed in r242737 caused the number of subtarget
features to go over the limit of 64.

This change is needed since backend options do not make it to the backend
when doing LTO and are not capable of changing the behavior of code-gen
passes on a per-function basis.

rdar://problem/21529937

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

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

9 years agoFix crash-on-invalid: don't look ahead past an unknown token, it might be EOF.
Richard Smith [Tue, 21 Jul 2015 00:23:34 +0000 (00:23 +0000)]
Fix crash-on-invalid: don't look ahead past an unknown token, it might be EOF.

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

9 years agoRevert r242736.
Akira Hatanaka [Mon, 20 Jul 2015 23:53:02 +0000 (23:53 +0000)]
Revert r242736.

r242737 caused builds to fail with the following error message, so I'm
reverting the clang side change too:

error:Too many subtarget features! Bump MAX_SUBTARGET_FEATURES.

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

9 years agoclang-format: Fix crasher when a UTF8 character is found in an escape
Daniel Jasper [Mon, 20 Jul 2015 23:28:07 +0000 (23:28 +0000)]
clang-format: Fix crasher when a UTF8 character is found in an escape
sequence. Discovered by the fuzzer.

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

9 years ago[ARM] Pass subtarget feature "+reserve-r9" instead of passing backend
Akira Hatanaka [Mon, 20 Jul 2015 23:20:53 +0000 (23:20 +0000)]
[ARM] Pass subtarget feature "+reserve-r9" instead of passing backend
option "-arm-reserve-r9".

This change is needed since backend options do not make it to the backend
when doing LTO and are not capable of changing the behavior of code-gen
passes on a per-function basis.

rdar://problem/21529937

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

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

9 years agoRefactor TableGen backend for ClangAttrEmitter to avoid duplication.
Bob Wilson [Mon, 20 Jul 2015 22:57:36 +0000 (22:57 +0000)]
Refactor TableGen backend for ClangAttrEmitter to avoid duplication.

GenerateHasAttrSpellingStringSwitch and GenerateTargetRequirements had
duplicated code to check the conditions for target-specific attributes.
Refactor the duplicated code into a separate function. NFC.

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

9 years agoIgnore the "novtable" declspec when not using the Microsoft C++ ABI.
Bob Wilson [Mon, 20 Jul 2015 22:57:31 +0000 (22:57 +0000)]
Ignore the "novtable" declspec when not using the Microsoft C++ ABI.

Clang used to silently ignore __declspec(novtable). It is implemented
now, but leaving the vtable uninitialized does not work when using the
Itanium ABI, where the class layout for complex class hierarchies is
stored in the vtable. It might be possible to honor the novtable
attribute in some simple cases and either report an error or ignore
it in more complex situations, but it’s not clear if that would be
worthwhile. There is also value in having a simple and predictable
behavior, so this changes clang to simply ignore novtable when not using
the Microsoft C++ ABI.

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

9 years ago[MS Compat] Add support for __declspec(noalias)
David Majnemer [Mon, 20 Jul 2015 22:51:52 +0000 (22:51 +0000)]
[MS Compat] Add support for __declspec(noalias)

The attribute '__declspec(noalias)' communicates that the function only
accesses memory pointed to by its pointer-typed arguments.

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

9 years ago[CUDA] Moved device-side triple calculation to buildCudaActions().
Artem Belevich [Mon, 20 Jul 2015 21:59:31 +0000 (21:59 +0000)]
[CUDA] Moved device-side triple calculation to buildCudaActions().

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

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

9 years agoFix code completion tests to use an explicit modules cache path
Reid Kleckner [Mon, 20 Jul 2015 21:22:46 +0000 (21:22 +0000)]
Fix code completion tests to use an explicit modules cache path

Otherwise the stale module cache data may cause the test to fail.  These
two tests are new and are the only instances of c-index-test with
-fmodules that doesn't have an explicit module cache path.

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

9 years agoFix a case where we forgot to make a static local variable comdat
Reid Kleckner [Mon, 20 Jul 2015 20:35:30 +0000 (20:35 +0000)]
Fix a case where we forgot to make a static local variable comdat

Sometimes we can provide an initializer for static locals, in which case
we sometimes might need to change the type. Changing the type requires
making a new LLVM GlobalVariable, and in this codepath we were
forgetting to transfer the comdat.

Fixes PR23838.

Patch by Ivan Garramona.

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

9 years agoFixed style issues pointed out by Justin Bogner.
Artem Belevich [Mon, 20 Jul 2015 20:02:54 +0000 (20:02 +0000)]
Fixed style issues pointed out by Justin Bogner.

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

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

9 years agoFix quoting of #pragma comment for PS4.
Yunzhong Gao [Mon, 20 Jul 2015 17:46:56 +0000 (17:46 +0000)]
Fix quoting of #pragma comment for PS4.

This is the PS4 counterpart to r229376, which quotes the library name if the
name contains space. It was discovered that if a library name contains both
double-quote and space characters, quoting the name might produce unexpected
results, but we are mostly concerned with a Windows host environment, which
does not allow double-quote or slashes in file/folder names.

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

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

9 years ago[CodeGen] Flip lanes when lowering __builtin_palignr with one lane
Benjamin Kramer [Mon, 20 Jul 2015 15:31:17 +0000 (15:31 +0000)]
[CodeGen] Flip lanes when lowering __builtin_palignr with one lane

Otherwise we'd pick the wrong lane for the resulting shuffle and
miscompile code. PR24187.

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

9 years agoAdd some missing 'F' flags to libm/libc builtins.
Charlie Turner [Mon, 20 Jul 2015 14:36:59 +0000 (14:36 +0000)]
Add some missing 'F' flags to libm/libc builtins.

More discussion available in http://reviews.llvm.org/D9913

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

9 years agoSilence a -Wtype-limits warning; NFC.
Aaron Ballman [Mon, 20 Jul 2015 13:36:07 +0000 (13:36 +0000)]
Silence a -Wtype-limits warning; NFC.

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

9 years agoRemove erroneous space in "lib64" string constant.
Yaron Keren [Mon, 20 Jul 2015 12:40:25 +0000 (12:40 +0000)]
Remove erroneous space in "lib64" string constant.

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

9 years ago[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch...
Alexey Bataev [Mon, 20 Jul 2015 12:08:00 +0000 (12:08 +0000)]
[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)

Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536

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

9 years agoAllow case-insensitive values for -mtune for AArch64 target in line with GCC.
Gabor Ballabas [Mon, 20 Jul 2015 11:28:20 +0000 (11:28 +0000)]
Allow case-insensitive values for -mtune for AArch64 target in line with GCC.

GCC allows case-insensitive values for -mcpu, -march and -mtune options.
This patch implements the same behaviour for the -mtune option for the AArch64 target.

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

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

9 years agoFix typo found by Joerg Sonnenberger.
Yaron Keren [Mon, 20 Jul 2015 10:20:57 +0000 (10:20 +0000)]
Fix typo found by Joerg Sonnenberger.

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

9 years agoAttempt to fix greendragon buildbot failures; apparently wc sometimes inserts a leadi...
Richard Smith [Mon, 20 Jul 2015 08:40:51 +0000 (08:40 +0000)]
Attempt to fix greendragon buildbot failures; apparently wc sometimes inserts a leading space into its output. Just check for a matching number anywhere in the output.

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

9 years agoSupport mingw toolchain include and lib directories on Arch Linux.
Yaron Keren [Mon, 20 Jul 2015 06:38:39 +0000 (06:38 +0000)]
Support mingw toolchain include and lib directories on Arch Linux.
Thanks to Thomas Pochtrager for testing this!

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

9 years ago[modules] Add (already passing) test for template default argument merging when the...
Richard Smith [Sun, 19 Jul 2015 23:44:27 +0000 (23:44 +0000)]
[modules] Add (already passing) test for template default argument merging when the template is declared in a namespace.

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

9 years ago[Sema] Make an assertion stricter.
Davide Italiano [Sun, 19 Jul 2015 22:07:14 +0000 (22:07 +0000)]
[Sema] Make an assertion stricter.

We now check for the exact range of IdealIndex.

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

9 years ago[modules] Don't save uninteresting identifiers, and don't consider identifiers
Richard Smith [Sun, 19 Jul 2015 21:41:12 +0000 (21:41 +0000)]
[modules] Don't save uninteresting identifiers, and don't consider identifiers
to be interesting just because they are the name of a builtin. Reduces the size
of an empty module by over 80% (~100KB).

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

9 years agoRemove two unused includes, part 2...
Nico Weber [Sun, 19 Jul 2015 20:44:11 +0000 (20:44 +0000)]
Remove two unused includes, part 2...

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

9 years agoRemove two unused includes.
Nico Weber [Sun, 19 Jul 2015 20:42:48 +0000 (20:42 +0000)]
Remove two unused includes.

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

9 years ago[X86][AVX512BW] add clang intrinsics for pmulhrsw / pmulhuw / pmulhw
Asaf Badouh [Sun, 19 Jul 2015 08:47:31 +0000 (08:47 +0000)]
[X86][AVX512BW] add clang intrinsics for pmulhrsw / pmulhuw / pmulhw

also made minor fix in "test_mm512_maskz_permutex2var_epi16"

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

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

9 years ago[CodeGen] Don't dereference vector::end if the vector can be empty
Benjamin Kramer [Sat, 18 Jul 2015 20:30:11 +0000 (20:30 +0000)]
[CodeGen] Don't dereference vector::end if the vector can be empty

MSVC complains about this in debug mode. NFC.

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

9 years ago[AST] Remove StmtRange in favor of an iterator_range.
Benjamin Kramer [Sat, 18 Jul 2015 17:09:36 +0000 (17:09 +0000)]
[AST] Remove StmtRange in favor of an iterator_range.

StmtRange was just a convenient wrapper for two StmtIterators before
we had real range support. This removes some of the implicit conversions
StmtRange had leading to slightly more verbose code but also should make
more obvious what's going on. No functional change intended.

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

9 years agoclang-format: Take nested lines into account when detection C++03
Daniel Jasper [Sat, 18 Jul 2015 16:35:30 +0000 (16:35 +0000)]
clang-format: Take nested lines into account when detection C++03
compatibility and variable alignment.

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

9 years ago[AST] Cleanup ExprIterator.
Benjamin Kramer [Sat, 18 Jul 2015 14:35:53 +0000 (14:35 +0000)]
[AST] Cleanup ExprIterator.

- Make it a proper random access iterator with a little help from iterator_adaptor_base
- Clean up users of magic dereferencing. The iterator should behave like an Expr **.
- Make it an implementation detail of Stmt. This allows inlining of the assertions.

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

9 years agoSilence the driver warnings, if we see "-w" on the Driver.
Filipe Cabecinhas [Sat, 18 Jul 2015 06:35:24 +0000 (06:35 +0000)]
Silence the driver warnings, if we see "-w" on the Driver.

Summary:
We can enable warnings after that -w, so the patch might not be 100%
correct.

The problem that triggered this is: we have some amount of tests that
expect 0 warnings (including unit tests for -w), but -w ends up not fully
silencing everything.

Reviewers: echristo, chandlerc

Subscribers: cfe-commits

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

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

9 years agoDriver/ToolChain/AMDGPU: Attempt to fix buildbots after r242601
Tom Stellard [Sat, 18 Jul 2015 02:11:07 +0000 (02:11 +0000)]
Driver/ToolChain/AMDGPU: Attempt to fix buildbots after r242601

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

9 years agoDriver: Add AMDGPU toolchain
Tom Stellard [Sat, 18 Jul 2015 01:49:05 +0000 (01:49 +0000)]
Driver: Add AMDGPU toolchain

Summary:
This is a minimal toolchain, which sets the integrated assembler as default,
and uses lld for linking.

Reviewers: arsenm, mcrosier

Subscribers: cfe-commits

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

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

9 years ago[Sema] Emit correct warning when copy-elision is not possible.
Davide Italiano [Sat, 18 Jul 2015 01:15:19 +0000 (01:15 +0000)]
[Sema] Emit correct warning when copy-elision is not possible.

If we're returning a function parameter, copy elision isn't possible,
so we now warn for redundant move.

PR: 23819
Differential Revision:  http://reviews.llvm.org/D11305

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

9 years ago[MS ABI] Explicit specialization of static data members are weak
David Majnemer [Fri, 17 Jul 2015 23:36:49 +0000 (23:36 +0000)]
[MS ABI] Explicit specialization of static data members are weak

Normally, explicit specializations are treated like strong external
definitions.  However, MSVC treats explicit specializations of static
data members as weak.  MSVC 2013's <regex> implementation has such an
explicit specialization which leads to clang emitting a strong
definition in each translation unit which includes it.  Tweak clang's
linkage calculation to give such entities GVA_StrongODR linkage instead.

This fixes PR24165.

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

9 years agoInstrProf: Promote this assert to a report_fatal_error
Justin Bogner [Fri, 17 Jul 2015 23:31:21 +0000 (23:31 +0000)]
InstrProf: Promote this assert to a report_fatal_error

If this assert does fire, the no-asserts behaviour is an infinite
loop. It's better to crash in this case so we get a crash report and
stop wasting the user's cpu cycles.

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

9 years agoHopefully fix android i386 build after r242554.
James Y Knight [Fri, 17 Jul 2015 21:58:11 +0000 (21:58 +0000)]
Hopefully fix android i386 build after r242554.

That platform has alignof(uint64_t) == 4, but, since LLVM_ALIGNAS(...)
cannot take anything but literal integers due to MSVC limitations, the
literal '8' used there didn't match. Switch ScopeStackAlignment to
just use 8, as well.

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

9 years agobasic: default to MSVC on Windows
Saleem Abdulrasool [Fri, 17 Jul 2015 21:26:41 +0000 (21:26 +0000)]
basic: default to MSVC on Windows

The "armv7-windows", "i686-windows", and "x86_64-windows" targets should be
equivalent to the MSVC environment.  This was previously discussed when the
triples for Windows werw canonicalised.  Im not sure how this was overlooked.
This fixes the emission of non-COFF formats on Windows.

Thanks to ki9a for reporting this issue over IRC!

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

9 years agoFix test case in r242565
Steven Wu [Fri, 17 Jul 2015 20:49:01 +0000 (20:49 +0000)]
Fix test case in r242565

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

9 years agoStop treating extension keywords as 'interesting'; we don't allow the extension
Richard Smith [Fri, 17 Jul 2015 20:19:56 +0000 (20:19 +0000)]
Stop treating extension keywords as 'interesting'; we don't allow the extension
flag to change between serialization and deserialization, so it does not
require the identifier to be serialized.

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

9 years agoFix -save-temp when using objc-arc, sanitizer and profiling
Steven Wu [Fri, 17 Jul 2015 20:09:56 +0000 (20:09 +0000)]
Fix -save-temp when using objc-arc, sanitizer and profiling

Currently, -save-temp will cause ObjCARC optimization to be dropped,
sanitizer pass to run early in the pipeline, and profiling
instrumentation to run twice.
Fix the issue by properly disable all passes in the optimization
pipeline when generating bitcode output and parse some of the Language
Options even when the input is bitcode so the passes can be setup
correctly.

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

9 years agoRefactor to remove repetition, no functionality change.
Richard Smith [Fri, 17 Jul 2015 20:09:43 +0000 (20:09 +0000)]
Refactor to remove repetition, no functionality change.

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

9 years agoRemove redundant bouncing between StringRef and a pair of 'const char *'.
Richard Smith [Fri, 17 Jul 2015 19:51:03 +0000 (19:51 +0000)]
Remove redundant bouncing between StringRef and a pair of 'const char *'.

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

9 years agoFix alignment issues in Clang.
James Y Knight [Fri, 17 Jul 2015 18:21:37 +0000 (18:21 +0000)]
Fix alignment issues in Clang.

Some const-correctness changes snuck in here too, since they were in the
area of code I was modifying.

This seems to make Clang actually work without Bus Error on
32bit-sparc.

Follow-up patches will factor out a trailing-object helper class, to
make classes using the idiom of appending objects to other objects
easier to understand, and to ensure (with static_assert) that required
alignment guarantees continue to hold.

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

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

9 years ago[ASTMatchers] Use provided target NodeKind instead of inferring it from the matchers.
Samuel Benzaquen [Fri, 17 Jul 2015 16:05:27 +0000 (16:05 +0000)]
[ASTMatchers] Use provided target NodeKind instead of inferring it from the matchers.

Individual matchers might not be convertible to each other's kind, but
they might still all be convertible to the target kind.
All the callers already know the target kind, so just pass it down.

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

9 years agoR600: Add macro defs for all supported OpenCL extensions
Tom Stellard [Fri, 17 Jul 2015 13:16:52 +0000 (13:16 +0000)]
R600: Add macro defs for all supported OpenCL extensions

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

9 years ago[Mips] Set mips64r6 as default CPU for MIPS64 Android
Petar Jovanovic [Fri, 17 Jul 2015 12:57:30 +0000 (12:57 +0000)]
[Mips] Set mips64r6 as default CPU for MIPS64 Android

Change default CPU for MIPS64 Android. Now it is mips64r6.

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

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

9 years agoChanged "pragma" -> "#pragma" in a comment, NFC.
Andrey Bokhanko [Fri, 17 Jul 2015 12:25:21 +0000 (12:25 +0000)]
Changed "pragma" -> "#pragma" in a comment, NFC.

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

9 years agoFix android build after r242514
Tamas Berghammer [Fri, 17 Jul 2015 10:16:11 +0000 (10:16 +0000)]
Fix android build after r242514

On android std::to_string isn't supported. Replace it with
llvm::utostr.

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

9 years ago-Refactored ARMTargetInfo in order to use the API of TargetParser
Alexandros Lamprineas [Fri, 17 Jul 2015 09:08:37 +0000 (09:08 +0000)]
-Refactored ARMTargetInfo in order to use the API of TargetParser
 for extracting target specific information.
-Patches commit r241343: case 'armv7l' was unhandled in
 ARMTargetInfo::getCPUAttr(), and thus it was returning invalid
 characters for macro definition.

Change-Id: I1a0972e5ff5529cd17376c6562047bab8b4da32c
Phabricator: http://reviews.llvm.org/D10839

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

9 years ago[CodeGen, X86] Classify vectors <= 32 bits as INTEGER
David Majnemer [Fri, 17 Jul 2015 05:49:13 +0000 (05:49 +0000)]
[CodeGen, X86] Classify vectors <= 32 bits as INTEGER

We shouldn't crash despite the AMD64 ABI not giving clear guidance as to
how to pass around vector types <= 32 bits.  Instead, classify such
vectors as INTEGER to be compatible with GCC.

This fixes PR24162.

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

9 years agoTests for "Disabling of "redefine_extname" pragma for C++ code"
Alexey Bataev [Fri, 17 Jul 2015 04:21:51 +0000 (04:21 +0000)]
Tests for "Disabling of "redefine_extname" pragma for C++ code"

In response to Richard Smith's comment (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150622/131782.html), this patch disables "redefine_extname" pragma for C++ code. Also, I added a test that this pragma doesn't apply to static declarations.
Differential Revision: http://reviews.llvm.org/D10805

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

9 years agoclang: s/PCHContainerOps/PCHContainerRdr/ in \param(s), introduced in r242499. [...
NAKAMURA Takumi [Fri, 17 Jul 2015 04:16:02 +0000 (04:16 +0000)]
clang: s/PCHContainerOps/PCHContainerRdr/ in \param(s), introduced in r242499. [-Wdocumentation]

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

9 years agoFix clang-fuzzer build after r242499.
Adrian Prantl [Fri, 17 Jul 2015 04:07:47 +0000 (04:07 +0000)]
Fix clang-fuzzer build after r242499.

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

9 years agoDriver: Determine file names for crash reports more reliably
Justin Bogner [Fri, 17 Jul 2015 03:35:54 +0000 (03:35 +0000)]
Driver: Determine file names for crash reports more reliably

Guessing which file name to replace based on the -main-file-name
argument to -cc1 is flawed. Instead, keep track of which arguments are
inputs to each command.

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

9 years agoMake the clang module container format selectable from the command line.
Adrian Prantl [Fri, 17 Jul 2015 01:19:54 +0000 (01:19 +0000)]
Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj]
  with 'raw' being the default
- supports arbitrary module container formats that libclang is agnostic to
- adds the format to the module hash to avoid collisions
- splits the old PCHContainerOperations into PCHContainerWriter and
  a PCHContainerReader.

Thanks to Richard Smith for reviewing this patch!

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

9 years ago__builtin_setjmp/__builtin_longjmp is support on ARM now
Matthias Braun [Fri, 17 Jul 2015 00:46:27 +0000 (00:46 +0000)]
__builtin_setjmp/__builtin_longjmp is support on ARM now

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

9 years agoAllow __builtin_setjmp/__builtin_longjmp on ARM
Matthias Braun [Fri, 17 Jul 2015 00:15:22 +0000 (00:15 +0000)]
Allow __builtin_setjmp/__builtin_longjmp on ARM

The problems in the llvm target got fixed in r242481 and r242482.

Related to rdar://20544153, rdar://20660786

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

9 years agoDoxygen: Enable autobrief feature, matching llvm config/coding standards.
James Dennett [Thu, 16 Jul 2015 23:17:43 +0000 (23:17 +0000)]
Doxygen: Enable autobrief feature, matching llvm config/coding standards.

Summary: This corresponds to the change made in r237417 - "Doxygen: Enable autobrief feature and update coding standards."

Reviewers: eliben

Subscribers: eliben, cfe-commits

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

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

9 years agoclang-format: Respect IndentWrappedFunctionNames when aligning colons
Daniel Jasper [Thu, 16 Jul 2015 22:58:24 +0000 (22:58 +0000)]
clang-format: Respect IndentWrappedFunctionNames when aligning colons

Before:
  - (void)shortf:(GTMFoo *)theFoo
  dontAlignNamef:(NSRect)theRect {
  }

After:
  - (void)shortf:(GTMFoo *)theFoo
      dontAlignNamef:(NSRect)theRect {
  }

Patch by Kwasi Mensah, thank you!

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

9 years ago[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl
Davide Italiano [Thu, 16 Jul 2015 22:37:54 +0000 (22:37 +0000)]
[Sema] Refactor Sema::ImplicitExceptionSpecification::CalledDecl

This (hopefully) brings more clarity. No functional changes (intended).

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

9 years agoAdd __has_feature(attribute_availability_with_version_underscores).
Jordan Rose [Thu, 16 Jul 2015 22:30:10 +0000 (22:30 +0000)]
Add __has_feature(attribute_availability_with_version_underscores).

This goes with r218884 from, um, last autumn.

rdar://problem/21754114

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

9 years agoDocumentation cleanup. No functional change intended.
James Dennett [Thu, 16 Jul 2015 22:06:34 +0000 (22:06 +0000)]
Documentation cleanup.  No functional change intended.

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

9 years ago[SemaType] Use a range loop.
Davide Italiano [Thu, 16 Jul 2015 19:31:40 +0000 (19:31 +0000)]
[SemaType] Use a range loop.

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

9 years agoFixed an error in cuda-options.cu test:
Artem Belevich [Thu, 16 Jul 2015 17:24:18 +0000 (17:24 +0000)]
Fixed an error in cuda-options.cu test:
  -target option must be used without '='.

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

9 years agoDisable #pragma redefine_extname for C++ code as it does not make sense in such a...
Aaron Ballman [Thu, 16 Jul 2015 17:06:53 +0000 (17:06 +0000)]
Disable #pragma redefine_extname for C++ code as it does not make sense in such a context.

Patch by Andrey Bokhanko!

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

9 years agoclang-format: [Proto] Handle enum bodies differently.
Daniel Jasper [Thu, 16 Jul 2015 14:25:43 +0000 (14:25 +0000)]
clang-format: [Proto] Handle enum bodies differently.

In proto, enum constants can contain complex options and should be
handled more like individual declarations.

Before:
  enum Type {
    UNKNOWN = 0 [(some_options) =
                     {
                       a: aa,
                       b: bb
                     }];
  };

After:
  enum Type {
    UNKNOWN = 0 [(some_options) = {
      a: aa,
      b: bb
    }];
  };

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

9 years agoActually "RUN:" the tests...
Filipe Cabecinhas [Thu, 16 Jul 2015 05:22:17 +0000 (05:22 +0000)]
Actually "RUN:" the tests...

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

9 years ago[OPENMP] Fixed detection of canonical loops with random access iterators.
Alexey Bataev [Thu, 16 Jul 2015 04:19:43 +0000 (04:19 +0000)]
[OPENMP] Fixed detection of canonical loops with random access iterators.

Add handling of iterators with copy/move constructors with default arguments + converting template constructors.

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

9 years ago[Intrin.h] Use compiler builtins to model memory barriers
David Majnemer [Thu, 16 Jul 2015 03:13:02 +0000 (03:13 +0000)]
[Intrin.h] Use compiler builtins to model memory barriers

_ReadBarrier, _WriteBarrier, and _ReadWriteBarrier are essentially
memory barriers of one form or another.  Model these as
atomic_signal_fence(ATOMIC_SEQ_CST).

__faststorefence is a curious intrinsic.  It's single purpose seems to
an alternative to mfence when that instruction is slow.  However, mfence
is not always slow and is, in general, preferable to a 'lock or'
sequence on certain CPUs.  Give the compiler freedom to select the best
sequence to get a fence.

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

9 years agoPR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appear...
Nikola Smiljanic [Thu, 16 Jul 2015 01:06:17 +0000 (01:06 +0000)]
PR10405 - Desugar FunctionType and TemplateSpecializationType if any type that appears inside needs to be desugared.

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

9 years ago[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
Akira Hatanaka [Thu, 16 Jul 2015 00:43:00 +0000 (00:43 +0000)]
[ARM] Pass subtarget feature "+no-movt" instead of passing backend option
"-arm-use-movt=0".

This change is needed since backend options do not make it to the backend
when doing LTO and are not capable of changing the behavior of code-gen
passes on a per-function basis.

rdar://problem/21529937

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

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

9 years agoRevert r242365.
Evgeniy Stepanov [Thu, 16 Jul 2015 00:32:26 +0000 (00:32 +0000)]
Revert r242365.

r242365 removed two unrelated files by accident.

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

9 years agoupdated tests for correct commit, concerning D11198
Naomi Musgrave [Thu, 16 Jul 2015 00:25:46 +0000 (00:25 +0000)]
updated tests for correct commit, concerning D11198

Summary: Updating missed changes in revision D11198

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

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

9 years agoupdated tests for correct commit
Naomi Musgrave [Thu, 16 Jul 2015 00:25:45 +0000 (00:25 +0000)]
updated tests for correct commit

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

9 years agoadding tests for various dtor decl types
Naomi Musgrave [Wed, 15 Jul 2015 22:57:10 +0000 (22:57 +0000)]
adding tests for various dtor decl types

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

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

9 years ago[clang-cl] Use the Windows response file tokenizer
Reid Kleckner [Wed, 15 Jul 2015 22:42:37 +0000 (22:42 +0000)]
[clang-cl] Use the Windows response file tokenizer

We were still using the Unix response file tokenizer for all driver
modes. This was difficult to get right in the beginning because there is
a circular dependency. The Driver class also can't officially determine
its mode until it can see all possible --driver-mode= flags, and those
flags could come from the response file.

Now we use the Windows parsing algorithm if the program name looks like
clang-cl, or if the --driver-mode=cl flag is present on the main command
line.

Fixes PR23709.

Reviewers: hans

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

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

9 years agoFinally, with no users for shell-preserves-root, remove it from lit.cfg.
Yaron Keren [Wed, 15 Jul 2015 20:41:28 +0000 (20:41 +0000)]
Finally, with no users for shell-preserves-root, remove it from lit.cfg.

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

9 years ago[Static Analyzer] Do not fail silently, when the analyzer is invoked from tooling...
Gabor Horvath [Wed, 15 Jul 2015 20:32:07 +0000 (20:32 +0000)]
[Static Analyzer] Do not fail silently, when the analyzer is invoked from tooling lib, an analyzer plugin is loaded, but the runtime linker fails to link.

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

9 years agoErase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ
Yaron Keren [Wed, 15 Jul 2015 20:04:18 +0000 (20:04 +0000)]
Erase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ

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

9 years agoErase REQUIRES: shell-preserves-root from more tests, see r242312.
Yaron Keren [Wed, 15 Jul 2015 19:42:18 +0000 (19:42 +0000)]
Erase REQUIRES: shell-preserves-root from more tests, see r242312.

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

9 years agoAllow any comment to be a trailing comment when -fparse-all-comments is on.
James Dennett [Wed, 15 Jul 2015 19:13:39 +0000 (19:13 +0000)]
Allow any comment to be a trailing comment when -fparse-all-comments is on.

This helps with freeform documentation styles, where otherwise code like
  enum class E {
    E1,  // D1
    E2   // D2
  };
would result in D1 being associated with E2. To properly associate E1
with D1 and E2 with D2, this patch allows all raw comments C such that
C.isParseAllComments() to participate in trailing comment checks inside
getRawCommentForDeclNoCache. This takes care of linking the intended
documentation with the intended decls. There remains an issue with code
like:
  foo();  // DN
  int x;
To prevent DN from being associated with x, this patch adds a new test
on preceding-line comments C (where C.isParseAllComments() and also
C's kind is RCK_OrdinaryBCPL or RCK_OrdinaryC) that checks whether C
is the first non-whitespace thing on C's starting line.

Patch from Luke Zarko <zarko@google.com>, D11069 reviewed by rsmith.

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

9 years agoclang-format: Fix return type breaking with overloaded operator functions
Birunthan Mohanathas [Wed, 15 Jul 2015 19:11:58 +0000 (19:11 +0000)]
clang-format: Fix return type breaking with overloaded operator functions

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

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

9 years ago-disable-llvm-optzns in one clang test.
Evgeniy Stepanov [Wed, 15 Jul 2015 18:57:57 +0000 (18:57 +0000)]
-disable-llvm-optzns in one clang test.

The intent is to test Clang codegen at -O1, and not the LLVM
optimization pipeline.

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

9 years agoActually requiring shell disables the test on Windows whereas
Yaron Keren [Wed, 15 Jul 2015 18:55:39 +0000 (18:55 +0000)]
Actually requiring shell disables the test on Windows whereas
previously requiring shell-preserves-root did not, so do not
require anything.

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

9 years ago[PPC64] Update tests for vec_sld
Bill Schmidt [Wed, 15 Jul 2015 18:55:02 +0000 (18:55 +0000)]
[PPC64] Update tests for vec_sld

Revision 224297 modified the behavior of vec_sld for little endian so
that LLVM will generate the correct corresponding vsldoi instruction.
I neglected to update the existing tests, which continued to pass
because they were not specific enough.  This patch adds enough
specificity to the tests to make them useful for BE and LE testing of
vec_sld.

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

9 years agoSince r179283, internal shell is default on windows and so shell-preserves-root
Yaron Keren [Wed, 15 Jul 2015 18:40:05 +0000 (18:40 +0000)]
Since r179283, internal shell is default on windows and so shell-preserves-root
is true on MSYS bash although this requires: used to disable tests on MSYS bash.

Nevertheless, all tests requiring shell-preserves-root do pass except for
Driver/darwin-sdkroot.c. It will require a patch, either by disabling it on
Windows or by fixing shell-preserves-root to really be true only on MSYS
and making darwin-sdkroot.c its only user.

In any case, all other tests requiring shell-preserves-root do not really require
it so I'm replacing REQUIRES: shell-preserves-root with REQUIRES: shell in two
tests first.

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

9 years agoRun clang-format on Tools.h, the indentation is inconsistent
Reid Kleckner [Wed, 15 Jul 2015 17:58:55 +0000 (17:58 +0000)]
Run clang-format on Tools.h, the indentation is inconsistent

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

9 years ago[Targets] Define __BOOL_DEFINED for Windows targets in C++ mode
David Majnemer [Wed, 15 Jul 2015 17:32:34 +0000 (17:32 +0000)]
[Targets] Define __BOOL_DEFINED for Windows targets in C++ mode

MSVC 4.2 didn't have bool as a builtin type but MSVC 5.0 does.  When
they added it, they added a macro (__BOOL_DEFINED) which allows build
scripts and the like to know if they should provide their own bool.

Clang always supports bool as a builtin type in C++ mode.

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

9 years agoAdd the ability to AST match a variable declaration that is an exception variable.
Aaron Ballman [Wed, 15 Jul 2015 17:11:21 +0000 (17:11 +0000)]
Add the ability to AST match a variable declaration that is an exception variable.

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

9 years agoclang-format: Fix column layout with a comment in the last line.
Daniel Jasper [Wed, 15 Jul 2015 16:26:47 +0000 (16:26 +0000)]
clang-format: Fix column layout with a comment in the last line.

Before:
  int aaaaa[] = {
      1, 2,
      3, // comment
      4, 5,
      6  // comment
  };

After:
  int aaaaa[] = {
      1, 2, 3, // comment
      4, 5, 6  // comment
  };

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