]> granicus.if.org Git - clang/log
clang
7 years ago[index] Index type source info for class specializations
Alex Lorenz [Tue, 25 Apr 2017 15:13:42 +0000 (15:13 +0000)]
[index] Index type source info for class specializations

rdar://31758344

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

7 years ago[index] Record the 'SpecializationOf' relation for function specializations
Alex Lorenz [Tue, 25 Apr 2017 14:22:29 +0000 (14:22 +0000)]
[index] Record the 'SpecializationOf' relation for function specializations

rdar://31603531

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

7 years agoFix fuzzer.c test on platforms where CLANG_DEFAULT_CXX_STDLIB is libc++
Ismail Donmez [Tue, 25 Apr 2017 11:24:14 +0000 (11:24 +0000)]
Fix fuzzer.c test on platforms where CLANG_DEFAULT_CXX_STDLIB is libc++

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

7 years agoPlacate MSVC's narrowing conversion unhappiness.
Richard Smith [Tue, 25 Apr 2017 00:40:40 +0000 (00:40 +0000)]
Placate MSVC's narrowing conversion unhappiness.

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

7 years ago[modules ts] Diagnose 'export' declarations outside of a module interface.
Richard Smith [Mon, 24 Apr 2017 23:12:30 +0000 (23:12 +0000)]
[modules ts] Diagnose 'export' declarations outside of a module interface.

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

7 years ago[Modules] Fix test to wipe out the cache before using it
Bruno Cardoso Lopes [Mon, 24 Apr 2017 21:58:13 +0000 (21:58 +0000)]
[Modules] Fix test to wipe out the cache before using it

This should appease bots:
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_check/35914

rdar://problem/31796737

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

7 years ago[analyzer] Improve subscripting null arrays for catching null dereferences.
Artem Dergachev [Mon, 24 Apr 2017 20:55:07 +0000 (20:55 +0000)]
[analyzer] Improve subscripting null arrays for catching null dereferences.

Array-to-pointer cast now works correctly when the pointer to the array
is concrete, eg. null, which allows further symbolic calculations involving
such values.

Inlined defensive checks are now detected correctly when the resulting null
symbol is being array-subscripted before dereference.

Differential Revision: https://reviews.llvm.org/D32291

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

7 years agoRemove a dead field. NFC.
Vedant Kumar [Mon, 24 Apr 2017 20:54:36 +0000 (20:54 +0000)]
Remove a dead field. NFC.

Suggested by Adam Folwarczny!

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

7 years ago[Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761)
Vedant Kumar [Mon, 24 Apr 2017 20:52:04 +0000 (20:52 +0000)]
[Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761)

Patch by Adam Folwarczny!

Differential Revision: https://reviews.llvm.org/D32406

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

7 years agoSpecify a target explicitly in libfuzzer driver flag test
George Karpenkov [Mon, 24 Apr 2017 20:38:56 +0000 (20:38 +0000)]
Specify a target explicitly in libfuzzer driver flag test

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

7 years agoRevert r301223
Carlo Bertolli [Mon, 24 Apr 2017 19:50:35 +0000 (19:50 +0000)]
Revert r301223

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

7 years ago[asan] Disable ASan global-GC depending on the target and compiler flags.
Evgeniy Stepanov [Mon, 24 Apr 2017 19:34:12 +0000 (19:34 +0000)]
[asan] Disable ASan global-GC depending on the target and compiler flags.

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

7 years ago[analyzer] Improve suppression for inlined defensive checks before operator &.
Artem Dergachev [Mon, 24 Apr 2017 19:30:33 +0000 (19:30 +0000)]
[analyzer] Improve suppression for inlined defensive checks before operator &.

Null dereferences are suppressed if the lvalue was constrained to 0 for the
first time inside a sub-function that was inlined during analysis, because
such constraint is a valid defensive check that does not, by itself,
indicate that null pointer case is anyhow special for the caller.

If further operations on the lvalue are performed, the symbolic lvalue is
collapsed to concrete null pointer, and we need to track where does the null
pointer come from.

Improve such tracking for lvalue operations involving operator &.

rdar://problem/27876009

Differential Revision: https://reviews.llvm.org/D31982

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

7 years ago[OpenMP] Initial implementation of code generation for pragma 'distribute parallel...
Carlo Bertolli [Mon, 24 Apr 2017 19:26:11 +0000 (19:26 +0000)]
[OpenMP] Initial implementation of code generation for pragma 'distribute parallel for' on host

https://reviews.llvm.org/D29508

This patch makes the following additions:

1. It abstracts away loop bound generation code from procedures associated with pragma 'for' and loops in general, in such a way that the same procedures can be used for 'distribute parallel for' without the need for a full re-implementation.
2. It implements code generation for 'distribute parallel for' and adds regression tests. It includes tests for clauses.

It is important to notice that most of the clauses are implemented as part of existing procedures. For instance, firstprivate is already implemented for 'distribute' and 'for' as separate pragmas. As the implementation of 'distribute parallel for' is based on the same procedures, then we automatically obtain implementation for such clauses without the need to add new code. However, this requires regression tests that verify correctness of produced code.

Looking forward to comments.

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

7 years agoPragma: Fix DebugOverflowStack() resulting in endless loop.
Matthias Braun [Mon, 24 Apr 2017 18:41:00 +0000 (18:41 +0000)]
Pragma: Fix DebugOverflowStack() resulting in endless loop.

Drive-by fix (noticed while working on https://reviews.llvm.org/D32205):
DebugOverflowStack() is supposed to provoke a stack overflow, however
LLVM was smart enough to use the red-zone and fold the load into a tail
jump on x86_64 optimizing this to an endless loop instead of a stack
overflow.

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

7 years agoRemove erroneous driver test for -fsanitize=fuzzer flag
George Karpenkov [Mon, 24 Apr 2017 18:36:31 +0000 (18:36 +0000)]
Remove erroneous driver test for -fsanitize=fuzzer flag

libfuzzer is not available on all platforms, and hence we can not always
rely that it was compiled.

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

7 years agoFlag -fsanitize=fuzzer to enable libfuzzer
George Karpenkov [Mon, 24 Apr 2017 18:23:24 +0000 (18:23 +0000)]
Flag -fsanitize=fuzzer to enable libfuzzer

Previously, adding libfuzzer to a project was a multi-step procedure,
involving libfuzzer compilation, linking the library, and specifying
coverage flags.
With this change,libfuzzer can be enabled by adding a single
-fsanitize=fuzzer flag instead.

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

7 years ago[Docs] Correct the path to the clang-format-diff.py script to include the clang-forma...
Craig Topper [Mon, 24 Apr 2017 17:39:35 +0000 (17:39 +0000)]
[Docs] Correct the path to the clang-format-diff.py script to include the clang-format directory.

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

7 years ago[index] If the 'external_source_symbol' attribute indicates 'Swift' as the language...
Argyrios Kyrtzidis [Mon, 24 Apr 2017 14:52:00 +0000 (14:52 +0000)]
[index] If the 'external_source_symbol' attribute indicates 'Swift' as the language then report it accordingly

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

7 years agoclang-format: Fix bad corner case in formatting of function types.
Daniel Jasper [Mon, 24 Apr 2017 14:28:49 +0000 (14:28 +0000)]
clang-format: Fix bad corner case in formatting of function types.

Before:
  std::function<
      LoooooooooooongTemplatedType<SomeType>*(
          LooooooooooooooooooooongType
              type)>
      function;

After:
  std::function<
      LoooooooooooongTemplatedType<
          SomeType>*(
          LooooooooooooooooongType type)>
      function;

clang-format generally avoids having lines like "SomeType>*(" as they
lead to parameter lists that don't belong together to be aligned. However, in
case it is better than the alternative, which can even be violating the column
limit.

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

7 years ago[index] The relation between the declarations in template specializations
Alex Lorenz [Mon, 24 Apr 2017 14:04:58 +0000 (14:04 +0000)]
[index] The relation between the declarations in template specializations
that 'override' declarations in the base template should be recorded

This can be used for improved "go to definition" feature in Xcode.

rdar://31604739

Differential Revision: https://reviews.llvm.org/D32020

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

7 years ago[Devirtualization] Emit invariant.group loads with empty group md
Piotr Padlewski [Mon, 24 Apr 2017 12:58:43 +0000 (12:58 +0000)]
[Devirtualization] Emit invariant.group loads with empty group md

Summary:
As discussed here
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109332.html
having different groups doesn't solve the problem entirly.

Reviewers: rjmccall, rsmith

Subscribers: amharc, cfe-commits

Differential Revision: https://reviews.llvm.org/D32110

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

7 years agoFix typo in comment.
Nick Lewycky [Sun, 23 Apr 2017 20:46:58 +0000 (20:46 +0000)]
Fix typo in comment.

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

7 years agoRearrange some Modules TS testcases into test/CXX/modules-ts.
Richard Smith [Sat, 22 Apr 2017 00:47:53 +0000 (00:47 +0000)]
Rearrange some Modules TS testcases into test/CXX/modules-ts.

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

7 years agoMove Split DWARF handling to an MC option/command line argument rather than using...
David Blaikie [Fri, 21 Apr 2017 23:35:36 +0000 (23:35 +0000)]
Move Split DWARF handling to an MC option/command line argument rather than using metadata

Since Split DWARF needs to name the actual .dwo file that is generated,
it can't be known at the time the llvm::Module is produced as it may be
merged with other Modules before the object is generated and that object
may be generated with any name.

By passing the Split DWARF file name when LLVM is producing object code
the .dwo file name in the object file can match correctly.

The support for Split DWARF for implicit modules remains the same -
using metadata to store the dwo name and dwo id so that potentially
multiple skeleton CUs referring to different dwo files can be generated
from one llvm::Module.

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

7 years agoP0629R0: Switch to latest proposal for distinguishing module interface from implement...
Richard Smith [Fri, 21 Apr 2017 22:39:18 +0000 (22:39 +0000)]
P0629R0: Switch to latest proposal for distinguishing module interface from implementation.

This switches from the prototype syntax in P0273R0 ('module' and 'module
implementation') to the consensus syntax 'export module' and 'module'.

In passing, drop the "module declaration must be first" enforcement, since EWG
seems to have changed its mind on that.

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

7 years ago[index] Take into account the category's external_symbol attr for namespacing its...
Argyrios Kyrtzidis [Fri, 21 Apr 2017 22:27:06 +0000 (22:27 +0000)]
[index] Take into account the category's external_symbol attr for namespacing its methods

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

7 years agoAdd comments to the diagnostic kinds in Diagnostic.td.
Nico Weber [Fri, 21 Apr 2017 20:55:00 +0000 (20:55 +0000)]
Add comments to the diagnostic kinds in Diagnostic.td.

https://reviews.llvm.org/D32371

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

7 years ago[ms] Give -Wmicrosoft-enum-forward-reference a chance to fire in clang-cl, PR32736
Nico Weber [Fri, 21 Apr 2017 20:12:26 +0000 (20:12 +0000)]
[ms] Give -Wmicrosoft-enum-forward-reference a chance to fire in clang-cl, PR32736

clang-cl sets MicrosoftCompat. In that mode, we always give enums a fixed
underlying type, and for enums with fixed underlying type we never enter the
block that tries to emit ext_ms_forward_ref_enum. Fix this by requiring an
explicit underlying type when we're skipping this diagnostic.

We had a test for this warning, but it only ran in C++98 mode. clang-cl always
enables -std=c++14, so MicrosoftCompatibiliy-cxx98.cpp is a fairly useless
test. Fold it into MicrosoftCompatibility.cpp -- that way, the test checks if
-Wmicrosoft-enum-forward-reference can fire in clang-cl builds.

https://reviews.llvm.org/D32369

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

7 years ago[OpenCL] Fix semantic check of ndrange_t for device_side_enqueue.
Anastasia Stulova [Fri, 21 Apr 2017 15:13:24 +0000 (15:13 +0000)]
[OpenCL] Fix semantic check of ndrange_t for device_side_enqueue.

Check unqualified type for ndrange argument in device_side_enqueue so
device_side_enqueue accept const and volatile qualified ndranges.

Differential Revision: https://reviews.llvm.org/D31458

Patch by Dmitry Borisenkov!

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

7 years ago[clang-format] Replace IncompleteFormat by a struct with Line
Krasimir Georgiev [Fri, 21 Apr 2017 14:35:20 +0000 (14:35 +0000)]
[clang-format] Replace IncompleteFormat by a struct with Line

Summary: This patch replaces the boolean IncompleteFormat that is used to notify the client if an unrecoverable syntax error occurred by a struct that also contains a line number.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D32298

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

7 years ago[clang-format] Clang-tidy cleanup of NamespaceEndCommentFixerTest.cpp, NFC
Krasimir Georgiev [Fri, 21 Apr 2017 14:30:01 +0000 (14:30 +0000)]
[clang-format] Clang-tidy cleanup of NamespaceEndCommentFixerTest.cpp, NFC

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

7 years ago[clang-format] Clang-tidy cleanup of CleanupTest.cpp, NFC
Krasimir Georgiev [Fri, 21 Apr 2017 14:21:21 +0000 (14:21 +0000)]
[clang-format] Clang-tidy cleanup of CleanupTest.cpp, NFC

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

7 years ago[PR32667] -Wdocumentation should allow @param/@returns for fields/variables
Alex Lorenz [Fri, 21 Apr 2017 14:17:49 +0000 (14:17 +0000)]
[PR32667] -Wdocumentation should allow @param/@returns for fields/variables
that have a function/block pointer type

This commit improves the -Wdocumentation warning by making sure that @param and
@returns commands won't trigger warnings when used for fields, variables,
or properties whose type is a function/block pointer type. The
function/block pointer type must be specified directly with the declaration,
and when a typedef is used the warning is still emitted.

In the future we might also want to handle the std::function type as well.

rdar://24978538

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

7 years agoAdd support for openSUSE ARM Triples
Ismail Donmez [Fri, 21 Apr 2017 12:26:43 +0000 (12:26 +0000)]
Add support for openSUSE ARM Triples

Summary: Add support for armv6hl-suse-linux-gnueabi and armv7hl-suse-linux-gnueabi triples used by openSUSE/SUSE.

Reviewers: cfe-commits, rovka, compnerd, rengolin

Reviewed By: rengolin

Subscribers: aemerson, rengolin, bkramer, chandlerc

Differential Revision: https://reviews.llvm.org/D32347

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

7 years ago[index] Take advantage of 'external_source_symbol' attribute for indexing purposes
Argyrios Kyrtzidis [Fri, 21 Apr 2017 05:42:46 +0000 (05:42 +0000)]
[index] Take advantage of 'external_source_symbol' attribute for indexing purposes

- Ignore decls marked as 'generated_declaration'
- Include the 'defined_in' in the USR for additional namespacing

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

7 years ago[index] For 'transparent' tag typedefs, ignore their tag reference
Argyrios Kyrtzidis [Fri, 21 Apr 2017 05:42:40 +0000 (05:42 +0000)]
[index] For 'transparent' tag typedefs, ignore their tag reference

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

7 years ago[modules] Properly look up the owning module for an instantiation of a merged template.
Richard Smith [Fri, 21 Apr 2017 01:15:13 +0000 (01:15 +0000)]
[modules] Properly look up the owning module for an instantiation of a merged template.

When looking for the template instantiation pattern of a templated entity,
consistently select the definition of the pattern if there is one. This means
we'll pick the same owning module when we start instantiating a template that
we'll later pick when determining which modules are visible during that
instantiation.

This reinstates r300650, reverted in r300659, with a fix for a regression
reported by Chandler after commit.

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

7 years ago[analyzer] Fix assert in ExprEngine::processSwitch
Alexander Shaposhnikov [Fri, 21 Apr 2017 01:05:26 +0000 (01:05 +0000)]
[analyzer] Fix assert in ExprEngine::processSwitch

This diff replaces getTypeSize(CondE->getType()))
with getIntWidth(CondE->getType())) in ExprEngine::processSwitch.
These calls are not equivalent for bool, see ASTContext.cpp
Add a test case.

Test plan:
make check-clang-analysis
make check-clang

Differential revision: https://reviews.llvm.org/D32328

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

7 years agoUse __CLANG_ATOMIC_TYPE_LOCK_FREE macros in `stdatomic.h`
Eric Fiselier [Thu, 20 Apr 2017 23:07:38 +0000 (23:07 +0000)]
Use __CLANG_ATOMIC_TYPE_LOCK_FREE macros in `stdatomic.h`

Summary: This patch makes the header `stdatomic.h` work when `-fms-compatibility` is specified.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D32322

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

7 years ago[CMake] Enable ARM target in Fuchsia toolchain
Petr Hosek [Thu, 20 Apr 2017 23:06:53 +0000 (23:06 +0000)]
[CMake] Enable ARM target in Fuchsia toolchain

This is still used by some users of Fuchsia toolchain. Also include
llc and opt which is useful for development and testing.

Differential Revision: https://reviews.llvm.org/D32231

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

7 years agoAdd __CLANG_ATOMIC_<TYPE>_LOCK_FREE macros for use in MSVC compatibility mode.
Eric Fiselier [Thu, 20 Apr 2017 22:53:57 +0000 (22:53 +0000)]
Add __CLANG_ATOMIC_<TYPE>_LOCK_FREE macros for use in MSVC compatibility mode.

Summary:
Libc++ currently implements the `ATOMIC_<TYPE>_LOCK_FREE` macros using the `__GCC_ATOMIC_<TYPE>_LOCK_FREE` macros. However these are not available when MSVC compatibility is enabled even though C11 `_Atomic` is.  This prevents libc++ from correctly implementing `ATOMIC_<TYPE>_LOCK_FREE`.

This patch adds an alternative spelling `__CLANG_ATOMIC_<TYPE>_LOCK_FREE` that is enabled with `-fms-compatibility`.

Reviewers: rsmith, aaron.ballman, majnemer, zturner, compnerd, jfb, rnk

Reviewed By: rsmith

Subscribers: BillyONeal, smeenai, jfb, cfe-commits, dschuff

Differential Revision: https://reviews.llvm.org/D32265

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

7 years agoSema: protect against ObjC++ typo-correction failure
Saleem Abdulrasool [Thu, 20 Apr 2017 22:23:10 +0000 (22:23 +0000)]
Sema: protect against ObjC++ typo-correction failure

ObjC++ has two different types of "pointer" types (ObjCClassPointerType
and PointerType).  Both can be indirected through.  However, the former
is not a member expression.  Ensure that we do not try to rebuild the
MRE in that case.

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

7 years agoParse: cleanup some bleeding whitespace
Saleem Abdulrasool [Thu, 20 Apr 2017 22:23:07 +0000 (22:23 +0000)]
Parse: cleanup some bleeding whitespace

Clean up some bleeding whitespace that I noticed.  NFC

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

7 years agoFix Python 2 vs 3 incompatability with dict.items() vs iteritems()
Eric Fiselier [Thu, 20 Apr 2017 21:23:58 +0000 (21:23 +0000)]
Fix Python 2 vs 3 incompatability with dict.items() vs iteritems()

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

7 years agoEnable leak sanitizer builds for darwin
Francis Ricci [Thu, 20 Apr 2017 21:11:51 +0000 (21:11 +0000)]
Enable leak sanitizer builds for darwin

Summary:
Support for leak sanitizer on darwin has been added to
compiler-rt, this patch adds compiler support.

Reviewers: dexonsmith, compnerd

Subscribers: alekseyshl, kubamracek, cfe-commits

Differential Revision: https://reviews.llvm.org/D32192

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

7 years agoBegin making git-clang-format python3 compatible.
Eric Fiselier [Thu, 20 Apr 2017 21:05:58 +0000 (21:05 +0000)]
Begin making git-clang-format python3 compatible.

This patch fixes most of the python3 incompatabilities
within git-clang-format while keeping the script python2 compatible.
There is still one remaining incompatability that prevents using Python3
which is the `str` vs `byte` type change. I plan to put those fixes
up for review separately.

This patch contains fixes for the following incompatabilities:

1) Use the new style Python3 `print` function. This requires importing
   __future__.print_function.

2) Fix incompatability between the Python3 octal prefix and the
   octal prefix Git uses.

3) Replace use of dict.iteritems() with dict.viewitems() because iteritems()
   has been removed in Python3. viewitems() reviews python 2.7 but that is
   also what the script is documented as requiring.

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

7 years ago[Driver] Add a missing -no-canonical-prefixes to test.
Benjamin Kramer [Thu, 20 Apr 2017 19:06:24 +0000 (19:06 +0000)]
[Driver] Add a missing -no-canonical-prefixes to test.

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

7 years agoDon't pass FPOpFusion::Strict to the backend
Adam Nemet [Thu, 20 Apr 2017 17:09:35 +0000 (17:09 +0000)]
Don't pass FPOpFusion::Strict to the backend

This restores the behavior prior to D31167 where the code-gen default was
FPC_On which mapped to FPOpFusion::Standard.  After merging the FE
state (on/off) and the code-gen state (on/fast/off), the default became off to
match the front-end.

In other words, the front-end controls when to fuse along the language
standards and the backend shouldn't override this by splitting fused
intrinsics as FPOpFusion::Strict would imply.

Differential Revision: https://reviews.llvm.org/D32301

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

7 years agoDelete unused IncompleteFormat variable, NFCi.
Krasimir Georgiev [Thu, 20 Apr 2017 13:37:27 +0000 (13:37 +0000)]
Delete unused IncompleteFormat variable, NFCi.

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

7 years ago[index] Record class template specializations using a new 'SpecializationOf'
Alex Lorenz [Thu, 20 Apr 2017 10:43:22 +0000 (10:43 +0000)]
[index] Record class template specializations using a new 'SpecializationOf'
relationship

rdar://31603531

Differential Revision: https://reviews.llvm.org/D32010

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

7 years agoAdd Python 3 support to clang.cindex
Jonathan Coe [Thu, 20 Apr 2017 10:11:01 +0000 (10:11 +0000)]
Add Python 3 support to clang.cindex

Summary:
Introduce an interop string to convert from unicode to c-strings where needed.
Add missing conversions from _CXString to strings in function registrations.
Explicitly evaluate lists where Python 3's lazy iterators would not otherwise do so.

This is an improvement upon the reverted change proposed in https://reviews.llvm.org/D26082

Reviewers: compnerd, skalinichev, modocache, MathieuDuponchelle

Reviewed By: compnerd

Subscribers: cfe-commits

Tags: #clang-c

Differential Revision: https://reviews.llvm.org/D31568

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

7 years agoAdd #pragma clang attribute support to the availability attribute
Alex Lorenz [Thu, 20 Apr 2017 09:35:02 +0000 (09:35 +0000)]
Add #pragma clang attribute support to the availability attribute

rdar://31707804

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

7 years agoPR19260: Teach doxygen to spell correctly the include paths.
Vassil Vassilev [Thu, 20 Apr 2017 08:57:41 +0000 (08:57 +0000)]
PR19260: Teach doxygen to spell correctly the include paths.

Currently we have #include <Sema.h> in the doxygen page documenting Sema. The
patch changes it ot #include "clang/Sema/Sema.h" which is what we would spell if
we need to include it in a real codebase.

Patch by Yuka Takahashi (D32113)!

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

7 years ago[AVR] Add -mmcu option to the driver
Leslie Zhai [Thu, 20 Apr 2017 04:23:24 +0000 (04:23 +0000)]
[AVR] Add -mmcu option to the driver

A patch by Peter Wu!

Reviewers: jroelofs, xiangzhai

Reviewed By: jroelofs, dylanmckay, xiangzhai

Subscribers: dlj, dylanmckay, cfe-commits

Differential Revision: https://reviews.llvm.org/D29827

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

7 years ago[ODRHash] clean up test and add new examples. NFC
Richard Trieu [Thu, 20 Apr 2017 02:53:53 +0000 (02:53 +0000)]
[ODRHash] clean up test and add new examples.  NFC

Use a macro to generate the struct with all decls.  Previously, four identical
changes would be needed to update this test.  This macro reduces that to one
location.  Added two other tests for issues that triggered false positives
during testing.

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

7 years agoPR32673: Don't wrap parameter packs in SubstTemplateTypeParmPackType nodes when formi...
Richard Smith [Thu, 20 Apr 2017 01:15:31 +0000 (01:15 +0000)]
PR32673: Don't wrap parameter packs in SubstTemplateTypeParmPackType nodes when forming implicit deduction guides.

Doing so thwarts template type deduction. Instead, substitute the pack directly
by picking "slice 0" of the resulting expansion.

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

7 years ago[Sema] Use MSVC inner class behavior on Itanium
Shoaib Meenai [Thu, 20 Apr 2017 01:11:42 +0000 (01:11 +0000)]
[Sema] Use MSVC inner class behavior on Itanium

Windows Itanium aims to use MSVC export and import semantics. Inner
class members shouldn't be exported on a dllexport explicit
instantiation definition of the outer class, and they shouldn't be
imported on a dllimport explicit instantiation declaration of the outer
class (instead a local copy should be emitted). We were doing the first
but not the second, and this mismatch can lead to link errors. Fix the
behavior and add tests for both.

Differential Revision: https://reviews.llvm.org/D32213

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

7 years agoAdd a triple to codegen test.
Richard Smith [Thu, 20 Apr 2017 01:02:29 +0000 (01:02 +0000)]
Add a triple to codegen test.

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

7 years ago[OpenMP] Prepare sema to support combined constructs with omp distribute and omp for
Carlo Bertolli [Thu, 20 Apr 2017 00:39:39 +0000 (00:39 +0000)]
[OpenMP] Prepare sema to support combined constructs with omp distribute and omp for

https://reviews.llvm.org/D32237

This patch prepares sema with additional fields to support all those composite and combined constructs of OpenMP that include pragma 'distribute' and 'for', such as 'distribute parallel for'. It also extends the regression tests for 'distribute parallel for' and adds a new one.

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

7 years ago[sanitizer-coverage] trim down the docs
Kostya Serebryany [Wed, 19 Apr 2017 22:25:30 +0000 (22:25 +0000)]
[sanitizer-coverage] trim down the docs

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

7 years ago[sanitizer-coverage] deprecate -fsanitize-coverage=trace-bb
Kostya Serebryany [Wed, 19 Apr 2017 21:31:11 +0000 (21:31 +0000)]
[sanitizer-coverage] deprecate -fsanitize-coverage=trace-bb

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

7 years agoCorrrect warn_unused_result attribute
Erich Keane [Wed, 19 Apr 2017 21:24:55 +0000 (21:24 +0000)]
Corrrect warn_unused_result attribute

The original idea was that if the attribute on an operator,
that the return-value unused-ness wouldn't matter. However,
all of the operators except postfix inc/dec return
references! References don't result in this warning
anyway, so those are already excluded.

Differential Revision: https://reviews.llvm.org/D32207

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

7 years agoFix assertion failure in codegen on non-template deduction guide.
Richard Smith [Wed, 19 Apr 2017 21:15:45 +0000 (21:15 +0000)]
Fix assertion failure in codegen on non-template deduction guide.

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

7 years ago[CodeGen] Use preincrement version of APInt::operator++ instead of postincrement...
Craig Topper [Wed, 19 Apr 2017 21:02:45 +0000 (21:02 +0000)]
[CodeGen] Use preincrement version of APInt::operator++ instead of postincrement to avoid creating and immediately discarding a temporary APInt.

This is preparation for a clang change to improve the [[nodiscard]] warning to not be ignored on methods that return a class marked [[nodiscard]] that are defined in the class itself. See D32207.

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

7 years agoFix a leak in tools/driver/cc1as_main.cpp
Kostya Serebryany [Wed, 19 Apr 2017 20:57:13 +0000 (20:57 +0000)]
Fix a leak in tools/driver/cc1as_main.cpp

Summary: For some reason, the asan bot has recently started reporting this leak even though it existed for ages.

Reviewers: pcc

Reviewed By: pcc

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D32243

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

7 years ago[sanitizer-coverage] deprecate -fsanitize-coverage=8bit-counters
Kostya Serebryany [Wed, 19 Apr 2017 20:15:58 +0000 (20:15 +0000)]
[sanitizer-coverage] deprecate -fsanitize-coverage=8bit-counters

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

7 years agoParse backend options during thinlto backend compile actions
David Blaikie [Wed, 19 Apr 2017 20:08:21 +0000 (20:08 +0000)]
Parse backend options during thinlto backend compile actions

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

7 years ago[sanitizer-coverage] deprecate some of the stale coverage variants
Kostya Serebryany [Wed, 19 Apr 2017 19:57:16 +0000 (19:57 +0000)]
[sanitizer-coverage] deprecate some of the stale coverage variants

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

7 years ago[Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679)
Vedant Kumar [Wed, 19 Apr 2017 17:58:30 +0000 (17:58 +0000)]
[Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679)

The coverage implementation marks functions which won't be emitted as
'deferred', so that it can emit empty coverage regions for them later
(once their linkages are known).

Functions in dependent contexts are an exception: if there isn't a full
instantiation of a function, it shouldn't be marked 'deferred'. We've
been breaking that rule without much consequence because we just ended
up with useless, extra, empty coverage mappings. With PR32679, this
behavior finally caused a crash, because clang marked a partial template
specialization as 'deferred', causing the MS mangler to choke in its
delayed-template-parsing mode:

  error: cannot mangle this template type parameter type yet
  (http://bugs.llvm.org/show_bug.cgi?id=32679)

Fix this by checking if a decl's context is a dependent context before
marking it 'deferred'.

Based on a patch by Adam Folwarczny!

Differential Revision: https://reviews.llvm.org/D32144

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

7 years ago[Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.
Akira Hatanaka [Wed, 19 Apr 2017 17:54:08 +0000 (17:54 +0000)]
[Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.

rdar://problem/31635406

Differential Revision: https://reviews.llvm.org/D32187

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

7 years agoPrefer addAttr(Attribute::AttrKind) over the AttributeList overload
Reid Kleckner [Wed, 19 Apr 2017 17:28:52 +0000 (17:28 +0000)]
Prefer addAttr(Attribute::AttrKind) over the AttributeList overload

This should simplify the call sites, which typically want to tweak one
attribute at a time. It should also avoid creating ephemeral
AttributeLists that live forever.

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

7 years agoAdd #pragma clang attribute support to the external_source_symbol attribute
Alex Lorenz [Wed, 19 Apr 2017 15:52:11 +0000 (15:52 +0000)]
Add #pragma clang attribute support to the external_source_symbol attribute

Prior to this commit the external_source_symbol attribute wasn't supported by
#pragma clang attribute for the following two reasons:

- The Named attribute subject hasn't been supported by TableGen.
- There was no way to specify a subject match rule for #pragma clang attribute
 that could operate on a set of attribute subjects (e.g. the ones that derive
 from NamedDecl).

This commit fixes the two issues and thus adds external_source_symbol support to
#pragma clang attribute.

rdar://31169028

Differential Revision: https://reviews.llvm.org/D32176

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

7 years agoRemove unnecessary condition as suggested by clang-tidy. NFC
Gabor Horvath [Wed, 19 Apr 2017 15:11:10 +0000 (15:11 +0000)]
Remove unnecessary condition as suggested by clang-tidy. NFC

Patch by: Gergely Angeli!

Differential Revision: https://reviews.llvm.org/D31938

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

7 years ago[Driver] Unify linking of OpenMP runtime. NFCI.
Jonas Hahnfeld [Wed, 19 Apr 2017 13:55:39 +0000 (13:55 +0000)]
[Driver] Unify linking of OpenMP runtime. NFCI.

While at it, extend test for FreeBSD and check for -lrt iff on Linux.

Differential Revision: https://reviews.llvm.org/D30087

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

7 years agoAvoid assert when a non-static member function is qualified with __unaligned
Roger Ferrer Ibanez [Wed, 19 Apr 2017 12:23:28 +0000 (12:23 +0000)]
Avoid assert when a non-static member function is qualified with __unaligned

Under -fms-extensions __unaligned is a type-qualifier that can be applied to a
non-static member function declaration.

This causes an assertion when mangling the name under Itanium, where that
qualifier is not mangled.

This patch justs makes the minimal change to avoid the crash and avoid mangling
__unaligned, as it currently happens with non-member functions.

Differential Revision: https://reviews.llvm.org/D31976

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

7 years agoAdd support for editor placeholders to Clang
Alex Lorenz [Wed, 19 Apr 2017 08:58:56 +0000 (08:58 +0000)]
Add support for editor placeholders to Clang

This commit teaches Clang to recognize editor placeholders that are produced
when an IDE like Xcode inserts a code-completion result that includes a
placeholder. Now when the lexer sees a placeholder token, it emits an
'editor placeholder in source file' error and creates an identifier token
that represents the placeholder. The parser/sema can now recognize the
placeholders and can suppress the diagnostics related to the placeholders. This
ensures that live issues in an IDE like Xcode won't get spurious diagnostics
related to placeholders.

This commit also adds a new compiler option named '-fallow-editor-placeholders'
that silences the 'editor placeholder in source file' error. This is useful
for an IDE like Xcode as we don't want to display those errors in live issues.

rdar://31581400

Differential Revision: https://reviews.llvm.org/D32081

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

7 years agoclang-format: Properly match parens of macro parameter lists.
Daniel Jasper [Wed, 19 Apr 2017 06:06:38 +0000 (06:06 +0000)]
clang-format: Properly match parens of macro parameter lists.

No tests yet, but this will be tested by the upcoming:
https://reviews.llvm.org/D28462

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

7 years agoRevert r300653 and r300650. The underlying commit fixes one issue with
Chandler Carruth [Wed, 19 Apr 2017 05:25:13 +0000 (05:25 +0000)]
Revert r300653 and r300650. The underlying commit fixes one issue with
modules but exposes much more widespread issues. Example and more
information is on the review thread for r300650.

Original commit summary:
[modules] Properly look up the owning module for an instantiation of a merged template.

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

7 years ago[CodeGen] Use APInt::lshrInPlace instead of APInt::lshr. NFC
Craig Topper [Wed, 19 Apr 2017 05:17:33 +0000 (05:17 +0000)]
[CodeGen] Use APInt::lshrInPlace instead of APInt::lshr. NFC

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

7 years agoFix member function call with null 'this' pointer.
Richard Smith [Wed, 19 Apr 2017 02:19:21 +0000 (02:19 +0000)]
Fix member function call with null 'this' pointer.

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

7 years ago[modules] Properly look up the owning module for an instantiation of a merged template.
Richard Smith [Wed, 19 Apr 2017 01:36:43 +0000 (01:36 +0000)]
[modules] Properly look up the owning module for an instantiation of a merged template.

When looking for the template instantiation pattern of a templated entity,
consistently select the definition of the pattern if there is one. This means
we'll pick the same owning module when we start instantiating a template that
we'll later pick when determining which modules are visible during that
instantiation.

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

7 years agoUse less temporary AttributeLists NFC
Reid Kleckner [Tue, 18 Apr 2017 23:50:03 +0000 (23:50 +0000)]
Use less temporary AttributeLists NFC

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

7 years ago[modules-ts] Fold together -x c++ and -x c++-module at -cc1 level.
Richard Smith [Tue, 18 Apr 2017 21:55:37 +0000 (21:55 +0000)]
[modules-ts] Fold together -x c++ and -x c++-module at -cc1 level.

The driver needs to know whether it's building a module interface or
implementation unit because it affects which outputs it produces and how it
builds the command pipeline. But the frontend doesn't need to know and should
not care: all it needs to know is what action it is being asked to perform on
the input.

(This is in preparation for permitting -emit-obj to be used on a module
interface unit to produce object code without going via a "full" PCM file.)

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

7 years agoDo not warn about whitespace between ??/ trigraph and newline in line comments if...
Richard Smith [Tue, 18 Apr 2017 21:45:04 +0000 (21:45 +0000)]
Do not warn about whitespace between ??/ trigraph and newline in line comments if trigraphs are disabled in the current language.

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

7 years agoPR30508: Downgrade error to warning if the umbrella folder doesn't exist.
Vassil Vassilev [Tue, 18 Apr 2017 20:57:29 +0000 (20:57 +0000)]
PR30508: Downgrade error to warning if the umbrella folder doesn't exist.

Patch by Yuka Takahashi (D32119)!

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

7 years agoThe SubjectMatchRule enum should not be used as a DenseMap key to avoid
Alex Lorenz [Tue, 18 Apr 2017 20:54:23 +0000 (20:54 +0000)]
The SubjectMatchRule enum should not be used as a DenseMap key to avoid
UBSAN 'invalid value' failures

The commit r300556 introduced a UBSAN issue that was caught by
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap. The DenseMap
failed to create an empty/tombstone value as the empty/tombstone values for the
SubjectMatchRule enum were not valid enum constants.

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

7 years ago[DOXYGEN] Minor improvements in doxygen comments.
Ekaterina Romanova [Tue, 18 Apr 2017 19:44:07 +0000 (19:44 +0000)]
[DOXYGEN] Minor improvements in doxygen comments.

- To be consistent with the rest of the intrinsics headers, I removed the tags <i> .. </i> for marking instruction names in italics in in smmintrin.h.

- Formatting changes to fit into 80 characters.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.

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

7 years agoRemove unused varible
Reid Kleckner [Tue, 18 Apr 2017 17:44:41 +0000 (17:44 +0000)]
Remove unused varible

The Result variable is unused both in Sema::CheckARMBuiltinFunctionCall
and Sema::CheckAArch64BuiltinFunctionCall, remove it.

Patch by Wei-Ren Chen!

Reviewers: craig.topper, rnk

Reviewed By: rnk

Subscribers: aemerson, cfe-commits, rengolin

Differential Revision: https://reviews.llvm.org/D32014

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

7 years ago[AArch64][clang] Pass cpu/arch information to assembler for AArch64.
Manoj Gupta [Tue, 18 Apr 2017 17:36:10 +0000 (17:36 +0000)]
[AArch64][clang] Pass cpu/arch information to assembler for AArch64.

Summary:
Pass Cpu/Arch options to assembler for AArch64 with no-integrated-as.
This fixes PR20019.

Reviewers: richard.barton.arm, kristof.beyls, rengolin

Reviewed By: rengolin

Subscribers: srhines, pirama, aemerson, rengolin, cfe-commits

Differential Revision: https://reviews.llvm.org/D32132

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

7 years agoTesting commit access.
Manoj Gupta [Tue, 18 Apr 2017 17:34:46 +0000 (17:34 +0000)]
Testing commit access.

Summary: Test commit access.

Reviewers: gbiv, george.burgess.iv

Reviewed By: george.burgess.iv

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D32161

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

7 years agomingw-w64: enable support for __declspec(selectany)
Martell Malone [Tue, 18 Apr 2017 15:56:24 +0000 (15:56 +0000)]
mingw-w64: enable support for __declspec(selectany)

Add selectany as a GCC spelling for mingw-w64

Reviewers: rnk

Differential revision: https://reviews.llvm.org/D32083

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

7 years ago[ASTPrinter] Print template parameter lists for out-of-line functions
Alex Lorenz [Tue, 18 Apr 2017 15:12:34 +0000 (15:12 +0000)]
[ASTPrinter] Print template parameter lists for out-of-line functions

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

7 years agoAdd #pragma clang attribute
Alex Lorenz [Tue, 18 Apr 2017 14:33:39 +0000 (14:33 +0000)]
Add #pragma clang attribute

This is a recommit of r300539 that was reverted in r300543 due to test failures.
The original commit message is displayed below:

The new '#pragma clang attribute' directive can be used to apply attributes to
multiple declarations. An attribute must satisfy the following conditions to
be supported by the pragma:
- It must have a subject list that's defined in the TableGen file.
- It must be documented.
- It must not be late parsed.
- It must have a GNU/C++11 spelling.

Differential Revision: https://reviews.llvm.org/D30009

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

7 years agoDriver: Better detection of mingw-gcc
Martell Malone [Tue, 18 Apr 2017 14:27:36 +0000 (14:27 +0000)]
Driver: Better detection of mingw-gcc

Stop blindly searching for "gcc.exe" on windows.
Stop assuming "/usr" on unix, fixes cross compiling.

Reviewers: mati865, yaron.keren

Subscribers: ismail, rnk

Differential revision: https://reviews.llvm.org/D15005

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

7 years ago[ARM] Add hardware build attributes in assembler
Oliver Stannard [Tue, 18 Apr 2017 13:21:05 +0000 (13:21 +0000)]
[ARM] Add hardware build attributes in assembler

This passes an option to the ARM assembly parser to emit build
attributes for the hardware selected by command line options, when
assembling an assembly file.

This is not enabled for C/C++, as this would result in duplicate build
attribute directives being emitted in each inline assembly block, when
emitting assembly.

This also adds an option to allow disabling this behaviour for assembly
files, for users who were relying on the old behaviour.

Differential revision: https://reviews.llvm.org/D31813

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

7 years ago[ARM,AArch64] Define __ELF__ for arm-none-eabihf and AArch64
Oliver Stannard [Tue, 18 Apr 2017 13:12:36 +0000 (13:12 +0000)]
[ARM,AArch64] Define __ELF__ for arm-none-eabihf and AArch64

This macro is defined for arm-none-eabi as of r266625, but it should also be
defined for eabihf and aarch64.

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

7 years agoRevert r300539 - Add #pragma clang attribute
Alex Lorenz [Tue, 18 Apr 2017 10:46:41 +0000 (10:46 +0000)]
Revert r300539 - Add #pragma clang attribute

Some tests fail on the Windows buildbots. I will have to investigate more.
This commit reverts r300539, r300540 and r300542.

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

7 years agoFix one more 'not all control paths return a value' MSVC warning
Alex Lorenz [Tue, 18 Apr 2017 10:17:41 +0000 (10:17 +0000)]
Fix one more 'not all control paths return a value' MSVC warning

The warning was caused by r300539.

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

7 years ago[TableGen] Fix MSVC warning that occurs in TableGen generated function
Alex Lorenz [Tue, 18 Apr 2017 09:59:27 +0000 (09:59 +0000)]
[TableGen] Fix MSVC warning that occurs in TableGen generated function

This should fix the Windows buildbot failure that happened after r300539.

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