]> granicus.if.org Git - clang/log
clang
8 years agoHexagon: add dummy files to test dir so git keeps them.
Tim Northover [Mon, 17 Oct 2016 18:00:27 +0000 (18:00 +0000)]
Hexagon: add dummy files to test dir so git keeps them.

Should fix hexagon-elf-toolchain.c tests on Git.

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

8 years agoFix a typo.
Adrian Prantl [Mon, 17 Oct 2016 17:41:51 +0000 (17:41 +0000)]
Fix a typo.

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

8 years agoReapply r284383. The test failures were due to a missing dir in test/
Krzysztof Parzyszek [Mon, 17 Oct 2016 15:30:10 +0000 (15:30 +0000)]
Reapply r284383. The test failures were due to a missing dir in test/

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

8 years agoRevert r284383, while I figure out how to reproduce the failures locally
Krzysztof Parzyszek [Mon, 17 Oct 2016 14:47:29 +0000 (14:47 +0000)]
Revert r284383, while I figure out how to reproduce the failures locally

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

8 years agoReturn correct path from HexagonToolChain::getHexagonTargetDir
Krzysztof Parzyszek [Mon, 17 Oct 2016 13:23:41 +0000 (13:23 +0000)]
Return correct path from HexagonToolChain::getHexagonTargetDir

This problem was exposed by r284129, causing clang-hexagon-elf to fail
clang tests.

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

8 years agoRevert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of"
Benjamin Kramer [Mon, 17 Oct 2016 13:00:44 +0000 (13:00 +0000)]
Revert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of"

This reverts commit r284176. It still marks some modules as invisible
that should be visible. Will follow up with the author with a test case.

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

8 years agoDo not reset TUScope when we are in incremental processing mode.
Vassil Vassilev [Mon, 17 Oct 2016 10:15:25 +0000 (10:15 +0000)]
Do not reset TUScope when we are in incremental processing mode.

Patch by Axel Naumann!

Reviewed by Richard Smith and me.

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

8 years agoAST: Prefer LLVM_NODISCARD to LLVM_ATTRIBUTE_UNUSED_RESULT
Justin Bogner [Mon, 17 Oct 2016 06:46:35 +0000 (06:46 +0000)]
AST: Prefer LLVM_NODISCARD to LLVM_ATTRIBUTE_UNUSED_RESULT

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

8 years ago[CUDA] Fix false-positive in known-emitted handling.
Justin Lebar [Mon, 17 Oct 2016 02:25:55 +0000 (02:25 +0000)]
[CUDA] Fix false-positive in known-emitted handling.

Previously: When compiling for host, our constructed call graph went
*through* kernel calls.  This meant that if we had

  host calls kernel calls HD

we would incorrectly mark the HD function as known-emitted on the host
side, and thus perform host-side checks on it.

Fixing this exposed another issue, wherein when marking a function as
known-emitted, we also need to traverse the callgraph of its template,
because non-dependent calls are attached to a function's template, not
its instantiation.

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

8 years agoclang/test/CXX/conv/conv.fctptr/p1.cpp: Appease for targeting i686-win32.
NAKAMURA Takumi [Sun, 16 Oct 2016 23:00:18 +0000 (23:00 +0000)]
clang/test/CXX/conv/conv.fctptr/p1.cpp: Appease for targeting i686-win32.

  error: 'error' diagnostics seen but not expected:
    File clang\test\CXX\conv\conv.fctptr\p1.cpp Line 16: assigning to 'void (S::*)() __attribute__((thiscall)) noexcept' from incompatible type 'void (S::*)() __attribute__((thiscall))': different exception specifications

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

8 years agoRevert "Revert "[analyzer] Make MallocChecker more robust against custom redeclarations""
Devin Coughlin [Sun, 16 Oct 2016 22:19:03 +0000 (22:19 +0000)]
Revert "Revert "[analyzer] Make MallocChecker more robust against custom redeclarations""

This reverts commit r284340 to reapply r284335. The bot breakage was due to
an unrelated change in the polybench test suite.

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

8 years agoAST: Improve a couple of comments and cast unused values to void
Justin Bogner [Sun, 16 Oct 2016 20:12:42 +0000 (20:12 +0000)]
AST: Improve a couple of comments and cast unused values to void

Make these comments a bit more explicit that they're initializing the
RawText member, and explicitly cast the unused result of getRawText to
void for clarity.

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

8 years agoRevert "[analyzer] Make MallocChecker more robust against custom redeclarations"
Devin Coughlin [Sun, 16 Oct 2016 19:26:07 +0000 (19:26 +0000)]
Revert "[analyzer] Make MallocChecker more robust against custom redeclarations"

This reverts commit r284335.

It appears to be causing test-suite compile-time and execution-time
performance measurements to take longer than expected on several bots.
This is surprising, because r284335 is a static-analyzer-only change.

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

8 years agoP0012R1: Make exception specifications be part of the type system. This
Richard Smith [Sun, 16 Oct 2016 17:54:23 +0000 (17:54 +0000)]
P0012R1: Make exception specifications be part of the type system. This
implements the bulk of the change (modifying the type system to include
exception specifications), but not all the details just yet.

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

8 years ago[analyzer] Make MallocChecker more robust against custom redeclarations
Devin Coughlin [Sun, 16 Oct 2016 17:26:06 +0000 (17:26 +0000)]
[analyzer] Make MallocChecker more robust against custom redeclarations

Add additional checking to MallocChecker to avoid crashing when memory
routines have unexpected numbers of arguments. You wouldn't expect to see much
of this in normal code (-Wincompatible-library-redeclaration warns on this),
but, for example, CMake tests can generate these.

This is PR30616.

rdar://problem/28631974

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

8 years agoExtend this test and make it a bit clearer which cases Clang is getting wrong.
Richard Smith [Sun, 16 Oct 2016 06:23:29 +0000 (06:23 +0000)]
Extend this test and make it a bit clearer which cases Clang is getting wrong.

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

8 years agoRevert "[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker""
Devin Coughlin [Sun, 16 Oct 2016 00:30:08 +0000 (00:30 +0000)]
Revert "[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker""

Revert:
r283662: [analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"
r283660: [analyzer] Fix build error after r283660 - remove constexpr strings.

It was causing an internal build bot to fail. It looks like in some cases
adding an extra note can cause scan-build plist output to drop a diagnostic
altogether.

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

8 years agoDisable a silly GCC diagnostic for combining a scanf length specifier with the
Richard Smith [Sat, 15 Oct 2016 01:59:52 +0000 (01:59 +0000)]
Disable a silly GCC diagnostic for combining a scanf length specifier with the
'*' specifier. Apparently the GNU folks want to discourage self-documenting
code.

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

8 years ago[Coverage] Support for C++17 if initializers
Vedant Kumar [Fri, 14 Oct 2016 23:38:16 +0000 (23:38 +0000)]
[Coverage] Support for C++17 if initializers

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

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

8 years ago[Coverage] Support for C++17 switch initializers
Vedant Kumar [Fri, 14 Oct 2016 23:38:13 +0000 (23:38 +0000)]
[Coverage] Support for C++17 switch initializers

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

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

8 years agoSema: honour dllexport in itanium more faithfully
Saleem Abdulrasool [Fri, 14 Oct 2016 22:25:46 +0000 (22:25 +0000)]
Sema: honour dllexport in itanium more faithfully

Although the itanium environment uses the itanium layout for C++, treat the
dllexport semantics more similarly to the MSVC specification.  This preserves
the existing behaviour for the use of the itanium ABI on non-windows-itanium
environments.  Export the inline definitions too.

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

8 years agoAdd more swift calling convention tests
Arnold Schwaighofer [Fri, 14 Oct 2016 21:55:56 +0000 (21:55 +0000)]
Add more swift calling convention tests

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

8 years agoReinstate r284008 reverted in r284081, with two fixes:
Richard Smith [Fri, 14 Oct 2016 21:41:24 +0000 (21:41 +0000)]
Reinstate r284008 reverted in r284081, with two fixes:

1) Merge and demote variable definitions when we find a redefinition in
MergeVarDecls, not only when we find one in AddInitializerToDecl (we only reach
the second case if it's the addition of the initializer itself that converts an
existing declaration into a definition).

2) When rebuilding a redeclaration chain for a variable, if we merge two
definitions together, mark the definitions as merged so the retained definition
is made visible whenever the demoted definition would have been.

Original commit message (from r283882):

[modules] PR28752: Do not instantiate variable declarations which are not visible.

Original patch by Vassil Vassilev! Changes listed above are mine.

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

8 years agoDefine Contiki OS toolchain
David L Kreitzer [Fri, 14 Oct 2016 20:44:33 +0000 (20:44 +0000)]
Define Contiki OS toolchain

Patch by Michael LeMay

Differential revision: http://reviews.llvm.org/D19854

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

8 years ago__builtin_fpclassify missing one int parameter
David Sheinkman [Fri, 14 Oct 2016 20:43:37 +0000 (20:43 +0000)]
__builtin_fpclassify missing one int parameter

Patch by Tania Albarghouthi.

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

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

8 years agoImplement no_sanitize_address for global vars
Douglas Katzman [Fri, 14 Oct 2016 19:55:09 +0000 (19:55 +0000)]
Implement no_sanitize_address for global vars

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

8 years ago[linux] When pre-reserving stack pages to work around broken address space
Richard Smith [Fri, 14 Oct 2016 19:51:36 +0000 (19:51 +0000)]
[linux] When pre-reserving stack pages to work around broken address space
layout for PIE binaries, ask the OS how much stack space is already in use to
avoid stack overflow if we are run with more than 512K of combined command line
arguments + environment variables.

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

8 years ago[Sema] Refactor context checking for availability diagnostics
Erik Pilkington [Fri, 14 Oct 2016 19:08:01 +0000 (19:08 +0000)]
[Sema] Refactor context checking for availability diagnostics

This commit combines a couple of redundant functions that do availability
attribute context checking into a more correct/simpler one.

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

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

8 years agoModule: emit initializers in submodules when importing the parent module.
Manman Ren [Fri, 14 Oct 2016 18:55:44 +0000 (18:55 +0000)]
Module: emit initializers in submodules when importing the parent module.

When importing the parent module, module initializers in submodules should
be emitted.

rdar://28740482

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

8 years agoRevert r284256 due to test failure
Ed Maste [Fri, 14 Oct 2016 18:20:12 +0000 (18:20 +0000)]
Revert r284256 due to test failure

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

8 years agoLink static PIE programs against rcrt0.o on OpenBSD
Ed Maste [Fri, 14 Oct 2016 17:59:53 +0000 (17:59 +0000)]
Link static PIE programs against rcrt0.o on OpenBSD

Patch by Stefan Kempf.

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

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

8 years agoImplement __stosb intrinsic as a volatile memset
Albert Gutowski [Fri, 14 Oct 2016 17:33:05 +0000 (17:33 +0000)]
Implement __stosb intrinsic as a volatile memset

Summary: We need `__stosb` to be an intrinsic, because SecureZeroMemory function uses it without including intrin.h. Implementing it as a volatile memset is not consistent with MSDN specification, but it gives us target-independent IR while keeping the most important properties of `__stosb`.

Reviewers: rnk, hans, thakis, majnemer

Subscribers: cfe-commits

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

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

8 years agoFix for PR30632: Name mangling issue.
Alexey Bataev [Fri, 14 Oct 2016 12:43:59 +0000 (12:43 +0000)]
Fix for PR30632: Name mangling issue.

There was a bug in the implementation of captured statements. If it has
a lambda expression in it and the same lambda expression is used outside
the captured region, clang produced an error:
```
error: definition with same mangled name as another definition
```
Here is an example:
```
struct A {
 template <typename L>
 void g(const L&) { }
};

template<typename T>
void f() {
  {
    A().g([](){});
  }
  A().g([](){});
}

int main() {
  f<void>();
}
```

Error report:
```
main.cpp:3:10: error: definition with same mangled name as another
definition
    void g(const L&) { }
             ^
main.cpp:3:10: note: previous definition is here
```
Patch fixes this bug.

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

8 years agoRemoved duplicate header include
Eric Liu [Fri, 14 Oct 2016 11:48:10 +0000 (11:48 +0000)]
Removed duplicate header include

Reviewers: ioeric

Subscribers: klimek

Patch by Krasimir Georgiev!

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

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

8 years agoTry to fix windows bot file path style failure caused by r284219.
Eric Liu [Fri, 14 Oct 2016 10:10:26 +0000 (10:10 +0000)]
Try to fix windows bot file path style failure caused by r284219.

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

8 years agoDeduplicate sets of replacements by file names.
Eric Liu [Fri, 14 Oct 2016 09:32:06 +0000 (09:32 +0000)]
Deduplicate sets of replacements by file names.

Summary:
If there are multiple <File, Replacements> pairs with the same file
path after removing dots, we only keep one pair (with path after dots being
removed) and discard the rest.

Reviewers: djasper

Subscribers: klimek, hokein, bkramer, cfe-commits

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

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

8 years ago[x86][ms-inline-asm] use of "jmp short" in asm is not supported
Michael Zuckerman [Fri, 14 Oct 2016 08:13:27 +0000 (08:13 +0000)]
[x86][ms-inline-asm] use of "jmp short" in asm is not supported

Test linked to: https://reviews.llvm.org/D24957

Committing in the name of Ziv Izhar: After check-all and LGTM .

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

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

8 years agoFix bogus assert breaking modules self-host.
Richard Smith [Fri, 14 Oct 2016 02:35:11 +0000 (02:35 +0000)]
Fix bogus assert breaking modules self-host.

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

8 years agoUse SubstInitializer instead of SubstExpr when instantiating a default
Richard Smith [Fri, 14 Oct 2016 01:12:20 +0000 (01:12 +0000)]
Use SubstInitializer instead of SubstExpr when instantiating a default
argument, in order to correctly instantiate the initializer.

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

8 years agoReinstate r281429, reverted in r281452, with a fix for its mishandling of
Richard Smith [Thu, 13 Oct 2016 23:04:14 +0000 (23:04 +0000)]
Reinstate r281429, reverted in r281452, with a fix for its mishandling of
compiles without -fmodules-local-submodule-visibility. Original commit message:

[modules] When merging one definition into another, propagate the list of
re-exporting modules from the discarded definition to the retained definition.

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

8 years agoDisable swiftcall test on windows: More brutal way to appease windows bots
Arnold Schwaighofer [Thu, 13 Oct 2016 22:47:03 +0000 (22:47 +0000)]
Disable swiftcall test on windows: More brutal way to appease windows bots

The backtrace on the bot does not give me any indication what is wrong.
The test case interestingly passes in stage2 of the build.
I don't have a way of debugging this.

Disable the test on windows and hope if there is truly a bug in the code that
was causing we will eventually run into this on other platforms.

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

8 years agoAdd 64-bit MS _Interlocked functions as builtins again
Albert Gutowski [Thu, 13 Oct 2016 22:35:07 +0000 (22:35 +0000)]
Add 64-bit MS _Interlocked functions as builtins again

Summary: Previously global 64-bit versions of _Interlocked functions broke buildbots on i386, so now I'm adding them as builtins for x86-64 and ARM only (should they be also on AArch64? I had problems with testing it for AArch64, so I left it)

Reviewers: hans, majnemer, mstorsjo, rnk

Subscribers: cfe-commits, aemerson

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

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

8 years agofix _BitScan intrinsics missing header warnings; fix some line endings
Albert Gutowski [Thu, 13 Oct 2016 21:55:16 +0000 (21:55 +0000)]
fix _BitScan intrinsics missing header warnings; fix some line endings

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

8 years ago[analyzer] Remove superquadratic behaviour from DataflowWorklist
Alexander Shaposhnikov [Thu, 13 Oct 2016 21:31:46 +0000 (21:31 +0000)]
[analyzer] Remove superquadratic behaviour from DataflowWorklist

The class DataflowWorklist internally maintains a sorted list of pointers to CFGBlock
and the method enqueuePredecessors has to call sortWorklist to maintain the invariant.
The implementation based on vector + sort works well for small sizes
but gets infeasible for relatively large sizes. In particular the issue takes place
for some cryptographic libraries which use code generation.
The diff replaces vector + sort with priority queue.
For one of the implementations of AES this patch reduces
the time for analysis from 204 seconds to 8 seconds.

Test plan: make -j8 check-clang

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

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

8 years agoAdd required targets to tests to (hopefully) appease bots
Arnold Schwaighofer [Thu, 13 Oct 2016 20:59:23 +0000 (20:59 +0000)]
Add required targets to tests to (hopefully) appease bots

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

8 years agoAdd and use isDiscardableGVALinkage function.
Justin Lebar [Thu, 13 Oct 2016 20:52:17 +0000 (20:52 +0000)]
Add and use isDiscardableGVALinkage function.

Reviewers: rnk

Subscribers: cfe-commits

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

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

8 years ago[CUDA] Emit deferred diagnostics during Sema rather than during codegen.
Justin Lebar [Thu, 13 Oct 2016 20:52:12 +0000 (20:52 +0000)]
[CUDA] Emit deferred diagnostics during Sema rather than during codegen.

Summary:
Emitting deferred diagnostics during codegen was a hack.  It did work,
but usability was poor, both for us as compiler devs and for users.  We
don't codegen if there are any sema errors, so for users this meant that
they wouldn't see deferred errors if there were any non-deferred errors.
For devs, this meant that we had to carefully split up our tests so that
when we tested deferred errors, we didn't emit any non-deferred errors.

This change moves checking for deferred errors into Sema.  See the big
comment in SemaCUDA.cpp for an overview of the idea.

This checking adds overhead to compilation, because we have to maintain
a partial call graph.  As a result, this change makes deferred errors a
CUDA-only concept (whereas before they were a general concept).  If
anyone else wants to use this framework for something other than CUDA,
we can generalize at that time.

This patch makes the minimal set of test changes -- after this lands,
I'll go back through and do a cleanup of the tests that we no longer
have to split up.

Reviewers: rnk

Subscribers: cfe-commits, rsmith, tra

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

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

8 years agotest: attempt to repair SCEI buildbots
Saleem Abdulrasool [Thu, 13 Oct 2016 20:10:22 +0000 (20:10 +0000)]
test: attempt to repair SCEI buildbots

The tests target ARM, ensure that the ARM target is registered.

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

8 years agoCodeGen: ensure that the runtime calling convention matches
Saleem Abdulrasool [Thu, 13 Oct 2016 19:45:08 +0000 (19:45 +0000)]
CodeGen: ensure that the runtime calling convention matches

Incorrect specification of the calling convention results in UB which can cause
the code path to be eliminated.  Simplify the existing code by using the
RuntimeCall constructor in `CodeGenFunction`.

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

8 years agoSwift Calling Convention: Fix out of bounds access
Arnold Schwaighofer [Thu, 13 Oct 2016 19:19:37 +0000 (19:19 +0000)]
Swift Calling Convention: Fix out of bounds access

Use iterator instead of address of element in vector

It is not valid to access one after the last element.

rdar://28759508

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

8 years ago[CUDA] Allow static variables in __host__ __device__ functions, so long as they're...
Justin Lebar [Thu, 13 Oct 2016 18:45:17 +0000 (18:45 +0000)]
[CUDA] Allow static variables in __host__ __device__ functions, so long as they're never codegen'ed for device.

Reviewers: tra, rnk

Subscribers: cfe-commits

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

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

8 years ago[CUDA] Disallow __shared__ variables in host functions.
Justin Lebar [Thu, 13 Oct 2016 18:45:13 +0000 (18:45 +0000)]
[CUDA] Disallow __shared__ variables in host functions.

Reviewers: tra, rnk

Subscribers: cfe-commits

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

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

8 years ago[CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIf{Device,Host}Code().
Justin Lebar [Thu, 13 Oct 2016 18:45:08 +0000 (18:45 +0000)]
[CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIf{Device,Host}Code().

Summary:
Together these let you easily create diagnostics that

 - are never emitted for host code
 - are always emitted for __device__ and __global__ functions, and
 - are emitted for __host__ __device__ functions iff these functions are
   codegen'ed.

At the moment there are only three diagnostics that need this treatment,
but I have more to add, and it's not sustainable to write code for emitting
every such diagnostic twice, and from a special wrapper in SemaCUDA.cpp.

While we're at it, don't emit the function name in
err_cuda_device_exceptions: It's not necessary to print it, and making
this work in the new framework in the face of a null value for
dyn_cast<FunctionDecl>(CurContext) isn't worth the effort.

Reviewers: rnk

Subscribers: cfe-commits, tra

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

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

8 years agoModule: emit initializers for C/ObjC after r276159.
Manman Ren [Thu, 13 Oct 2016 18:42:14 +0000 (18:42 +0000)]
Module: emit initializers for C/ObjC after r276159.

In r276159, we started to defer emitting initializers for VarDecls, but
forgot to add the initializers for non-C++ language.

rdar://28740482

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

8 years agoPass -ffunction-sections/-fdata-sections along to gold-plugin
Teresa Johnson [Thu, 13 Oct 2016 18:05:53 +0000 (18:05 +0000)]
Pass -ffunction-sections/-fdata-sections along to gold-plugin

Summary:
These options need to be passed to the plugin in order to have
an effect on LTO/ThinLTO compiles.

Reviewers: mehdi_amini, pcc

Subscribers: jfb, dschuff, mehdi_amini, cfe-commits

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

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

8 years ago[ThinLTO] Update doc to include lld (now supported).
Davide Italiano [Thu, 13 Oct 2016 17:42:38 +0000 (17:42 +0000)]
[ThinLTO] Update doc to include lld (now supported).

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

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

8 years agoAdd more 64bit swiftcall convention tests
Arnold Schwaighofer [Thu, 13 Oct 2016 17:17:36 +0000 (17:17 +0000)]
Add more 64bit swiftcall convention tests

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

8 years agoImplement MS _ReturnAddress and _AddressOfReturnAddress intrinsics
Albert Gutowski [Thu, 13 Oct 2016 16:03:42 +0000 (16:03 +0000)]
Implement MS _ReturnAddress and _AddressOfReturnAddress intrinsics

Reviewers: rnk, thakis, majnemer, hans

Subscribers: cfe-commits

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

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

8 years agoGuard flag –fdenormal-fp-math with –fno-fast-math.
Sjoerd Meijer [Thu, 13 Oct 2016 13:22:01 +0000 (13:22 +0000)]
Guard flag â€“fdenormal-fp-math with â€“fno-fast-math.
This allows disabling the FP options with just one flag (-fno-fast-math).

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

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

8 years ago[analyzer] Link libStaticAnalyzerCheckers to libASTMatchers.
Artem Dergachev [Thu, 13 Oct 2016 11:41:12 +0000 (11:41 +0000)]
[analyzer] Link libStaticAnalyzerCheckers to libASTMatchers.

AST matchers are useful for the analyzer's checkers.
More patches on particular checkers shall follow.

This is the first time clang binary gets linked to ASTMatchers.
The binary size increase for the clang executable would be
+0.5% in release mode, +2% in debug mode.

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

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

8 years agoFix for PR30639: CGDebugInfo Null dereference with OpenMP array
Alexey Bataev [Thu, 13 Oct 2016 09:52:46 +0000 (09:52 +0000)]
Fix for PR30639: CGDebugInfo Null dereference with OpenMP array
access, by Erich Keane

OpenMP creates a variable array type with a a null size-expr. The Debug
generation failed to due to this. This patch corrects the openmp
implementation, updates the tests, and adds a new one for this
condition.

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

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

8 years ago[analyzer] DeallocChecker: Don't warn about directly-set IBOutlet ivars on macOS
Devin Coughlin [Wed, 12 Oct 2016 23:57:05 +0000 (23:57 +0000)]
[analyzer] DeallocChecker: Don't warn about directly-set IBOutlet ivars on macOS

On macOS (but not iOS), if an ObjC property has no setter, the nib-loading code
for an IBOutlet is documented as directly setting the backing ivar without
retaining the value -- even if the property is 'retain'.

This resulted in false positives from the DeallocChecker for code that did not
release such ivars in -dealloc.

To avoid these false positives, treat IBOutlet ivars that back a property
without a setter as having an unknown release requirement in macOS.

rdar://problem/28507353

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

8 years agofix ms-intrinsics labels code to work with builds with assertions
Albert Gutowski [Wed, 12 Oct 2016 23:52:38 +0000 (23:52 +0000)]
fix ms-intrinsics labels code to work with builds with assertions

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

8 years agoRevert r284008. This is us to fail to instantiate static data members in some
Richard Smith [Wed, 12 Oct 2016 23:29:02 +0000 (23:29 +0000)]
Revert r284008. This is us to fail to instantiate static data members in some
cases. I'm working on reducing a testcase.

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

8 years ago[NFC] Fixing the description for _mm_store_ps and _mm_store_ps1.
Yunzhong Gao [Wed, 12 Oct 2016 23:27:27 +0000 (23:27 +0000)]
[NFC] Fixing the description for _mm_store_ps and _mm_store_ps1.

It seems that the doxygen description of these two intrinsics were swapped by
mistake.

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

8 years agofix regexes for label names in ms-intrinsics test
Albert Gutowski [Wed, 12 Oct 2016 22:22:34 +0000 (22:22 +0000)]
fix regexes for label names in ms-intrinsics test

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

8 years agoImplement MS _BitScan intrinsics
Albert Gutowski [Wed, 12 Oct 2016 22:01:05 +0000 (22:01 +0000)]
Implement MS _BitScan intrinsics

Summary: _BitScan intrinsics (and some others, for example _Interlocked and _bittest) are supposed to work on both ARM and x86. This is an attempt to isolate them, avoiding repeating their code or writing separate function for each builtin.

Reviewers: hans, thakis, rnk, majnemer

Subscribers: RKSimon, cfe-commits, aemerson

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

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

8 years agoRemove basic block label in test case
Arnold Schwaighofer [Wed, 12 Oct 2016 21:36:15 +0000 (21:36 +0000)]
Remove basic block label in test case

Another attempt to make a bot happy

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

8 years agoSpecify a target cpu in test case
Arnold Schwaighofer [Wed, 12 Oct 2016 20:30:24 +0000 (20:30 +0000)]
Specify a target cpu in test case

Hopefully, this makes the bots happy

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

8 years ago[NFC] Trial change to remove a redundant blank line.
Yunzhong Gao [Wed, 12 Oct 2016 19:33:33 +0000 (19:33 +0000)]
[NFC] Trial change to remove a redundant blank line.

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

8 years agoDeclare WinX86_64ABIInfo to satisfy SwiftABI info
Arnold Schwaighofer [Wed, 12 Oct 2016 18:59:24 +0000 (18:59 +0000)]
Declare WinX86_64ABIInfo to satisfy SwiftABI info

This is minimal support that allows swift's test cases on non windows platforms
to pass.

rdar://28738985

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

8 years agoDocument potential implementation of CFI in hardware.
Kostya Serebryany [Wed, 12 Oct 2016 18:33:54 +0000 (18:33 +0000)]
Document potential implementation of CFI in hardware.

Summary: Document potential implementation of CFI in hardware.

Reviewers: eugenis, pcc

Subscribers: llvm-commits

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

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

8 years agoMove x86-64 builtins from SemaChecking.cpp to BuiltinsX86_64.def
Albert Gutowski [Wed, 12 Oct 2016 17:28:44 +0000 (17:28 +0000)]
Move x86-64 builtins from SemaChecking.cpp to BuiltinsX86_64.def

Summary: Follow-up to https://reviews.llvm.org/D24598 (separating builtins for x84-64 and i386).

Reviewers: hans, thakis, rnk

Subscribers: cfe-commits

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

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

8 years agoNFC: CodeCompletionResult's constructor should take const NamedDecl
Alex Lorenz [Wed, 12 Oct 2016 15:33:35 +0000 (15:33 +0000)]
NFC: CodeCompletionResult's constructor should take const NamedDecl

CodeCompletionResult's Declaration field is a const pointer to the
NamedDecl, and thus the constructor should take a const pointer as well.

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

8 years ago[ARM] Fix - missing target-cpu in test
Javed Absar [Wed, 12 Oct 2016 12:13:55 +0000 (12:13 +0000)]
[ARM] Fix - missing target-cpu in test

Fixes an incomplete test, wherein the target-cpu name (cortex-r52) was missing.

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

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

8 years agoReinstate r283887 and r283882.
Vassil Vassilev [Wed, 12 Oct 2016 11:57:08 +0000 (11:57 +0000)]
Reinstate r283887 and r283882.

Original message:
"[modules] PR28752: Do not instantiate variable declarations which are not visible.

https://reviews.llvm.org/D24508

Patch developed in collaboration with Richard Smith!"

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

8 years ago[CodeCompletion] Show protocol properties that are accessed through qualified id
Alex Lorenz [Wed, 12 Oct 2016 11:40:15 +0000 (11:40 +0000)]
[CodeCompletion] Show protocol properties that are accessed through qualified id

This commit improves code completion for properties that are declared in
Objective-C protocols by making sure that properties show up in completions
when they are accessed through a qualified id.

rdar://24426041

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

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

8 years ago[Sema] Handle transparent_union attributes in C mode only
Alex Lorenz [Wed, 12 Oct 2016 09:36:35 +0000 (09:36 +0000)]
[Sema] Handle transparent_union attributes in C mode only

This commit marks the transparent_union attributes as C only because clang
doesn't support them in C++ mode. Prior to this commit, clang still tried to
verify these attributes in C++, leading to crashes when analyzing templated
transparent_union unions that have dependent field types. This commit ensures
that such crashes won't happen again.

As a result of this commit clang now displays a warning every time it encounters
a transparent_union attribute in C++ mode.

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

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

8 years agoAdded REQUIRED triples to the test that fails on some ARM buildbots.
Artem Belevich [Wed, 12 Oct 2016 02:08:08 +0000 (02:08 +0000)]
Added REQUIRED triples to the test that fails on some ARM buildbots.

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

8 years ago[CUDA] Make touching a kernel from a __host__ __device__ function a deferred error.
Justin Lebar [Wed, 12 Oct 2016 01:30:08 +0000 (01:30 +0000)]
[CUDA] Make touching a kernel from a __host__ __device__ function a deferred error.

Previously, this was an immediate, don't pass go, don't collect $200
error.  But this precludes us from writing code like

  __host__ __device__ void launch_kernel() {
    kernel<<<...>>>();
  }

Such code isn't wrong, following our notions of right and wrong in CUDA,
unless it's codegen'ed.

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

8 years agoRevert - When optimizing for size, enable loop rerolling by default
Mike Edwards [Tue, 11 Oct 2016 22:09:13 +0000 (22:09 +0000)]
Revert - When optimizing for size, enable loop rerolling by default

This reverts r283685 as it is causing test failures on Green Dragon.

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

8 years ago[Profile] Update testcase for r283948 (NFC)
Vedant Kumar [Tue, 11 Oct 2016 21:56:05 +0000 (21:56 +0000)]
[Profile] Update testcase for r283948 (NFC)

Old: "__DATA,__llvm_prf_data"
New: "__DATA,__llvm_prf_data,regular,live_support"

This should fix the following bot failure:

  http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55158

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

8 years agoModule: for ObjectiveC, be consistent when checking hidden decls.
Manman Ren [Tue, 11 Oct 2016 21:18:20 +0000 (21:18 +0000)]
Module: for ObjectiveC, be consistent when checking hidden decls.

In MatchAllMethodDeclarations, when checking a hidden decl, be sure
to allow hidden when searching for methods.

rdar://28699972

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

8 years agoSwift Calling Convention: Parameters are allowed after the
Arnold Schwaighofer [Tue, 11 Oct 2016 20:34:06 +0000 (20:34 +0000)]
Swift Calling Convention: Parameters are allowed after the
swift_error/swift_context parameter

We need to be able to decelare witness functions which append the self type and
the self witness tables at the end of the parameter list.

rdar://28720996

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

8 years agoPass the end of a component to SwiftAggLowering's enumerateComponents callback
Arnold Schwaighofer [Tue, 11 Oct 2016 20:34:03 +0000 (20:34 +0000)]
Pass the end of a component to SwiftAggLowering's enumerateComponents callback

This is usefull for determining whether components overlap.

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

8 years agoRevert "Change Builtins name to be stored as StringRef instead of raw pointers (NFC)"
Mehdi Amini [Tue, 11 Oct 2016 19:04:24 +0000 (19:04 +0000)]
Revert "Change Builtins name to be stored as StringRef instead of raw pointers (NFC)"

This reverts commit r283802. It introduces temporarily static
initializers, because StringRef ctor isn't (yet) constexpr for
string literals.
I plan to get there this week, but apparently GCC is so terrible
with these static initializer right now (10 min+ extra codegen
time was reported) that I'll hold on to this patch till the
constexpr one is ready, and land these at the same time.

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

8 years ago[Driver] Use -fsyntax-only in test/Driver/show-option-names.c
Bruno Cardoso Lopes [Tue, 11 Oct 2016 18:38:33 +0000 (18:38 +0000)]
[Driver] Use -fsyntax-only in test/Driver/show-option-names.c

Make the test less expensive, follow up from r283915.

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

8 years ago[Driver] Fix test from r283913 to unbreak bots
Bruno Cardoso Lopes [Tue, 11 Oct 2016 18:31:45 +0000 (18:31 +0000)]
[Driver] Fix test from r283913 to unbreak bots

Followup from r283913 & r283827

http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55135

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

8 years agoReapply [Driver][Diagnostics] Make 'show option names' default for driver warnings
Bruno Cardoso Lopes [Tue, 11 Oct 2016 18:21:26 +0000 (18:21 +0000)]
Reapply [Driver][Diagnostics] Make 'show option names' default for driver warnings

Reapply r283827 by fixing the tests to not be target specific

Currently, driver level warnings do not show option names (e.g. warning:
complain about foo [-Woption-name]) in a diagnostic unless
-fdiagnostics-show-option is explictly specified. OTOH, the driver by
default turn this option on for CC1. Change the logic to show option
names by default in the driver as well.

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

rdar://problem/27300909

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

8 years ago[CUDA] Re-land support for <complex> (r283683 and r283680).
Justin Lebar [Tue, 11 Oct 2016 17:36:03 +0000 (17:36 +0000)]
[CUDA] Re-land support for <complex> (r283683 and r283680).

These were reverted in r283753 and r283747.

The first patch added a header to the root 'Headers' install directory,
instead of into 'Headers/cuda_wrappers'.  This was fixed in the second
patch, but by then the damage was done: The bad header stayed in the
'Headers' directory, continuing to break the build.

We reverted both patches in an attempt to fix things, but that still
didn't get rid of the header, so the Windows boostrap build remained
broken.

It's probably worth fixing up our cmake logic to remove things from the
install dirs, but in the meantime, re-land these patches, since we
believe they no longer have this bug.

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

8 years agoFix the build with MSVC 2013 after r283856
Reid Kleckner [Tue, 11 Oct 2016 17:24:09 +0000 (17:24 +0000)]
Fix the build with MSVC 2013 after r283856

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

8 years agoFix clang-offload-bundler test.
Zachary Turner [Tue, 11 Oct 2016 16:06:32 +0000 (16:06 +0000)]
Fix clang-offload-bundler test.

A recent change to llvm::cl slightly changed the format of
the help output, and it broke this test.  NFC

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

8 years ago[OpenCL] Allow partial initializer for array and struct
Yaxun Liu [Tue, 11 Oct 2016 15:53:28 +0000 (15:53 +0000)]
[OpenCL] Allow partial initializer for array and struct

Currently Clang allows partial initializer for C99 but not for OpenCL, e.g.

float a[16][16] = {1.0f, 2.0f};

is allowed in C99 but not allowed in OpenCL.

This patch fixes that.

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

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

8 years agoRevert r283887 and r283882, until the issue is understood and fixed.
Vassil Vassilev [Tue, 11 Oct 2016 15:51:06 +0000 (15:51 +0000)]
Revert r283887 and r283882, until the issue is understood and fixed.

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

8 years agoUse StringRef instead of raw pointer in SourceManagerInternals LineTableInfo API...
Mehdi Amini [Tue, 11 Oct 2016 15:15:32 +0000 (15:15 +0000)]
Use StringRef instead of raw pointer in SourceManagerInternals LineTableInfo API (NFC)

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

8 years agor283882 followup. Don't demote ParmVarDecls. This should fix our module builds.
Vassil Vassilev [Tue, 11 Oct 2016 15:09:26 +0000 (15:09 +0000)]
r283882 followup. Don't demote ParmVarDecls. This should fix our module builds.

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

8 years ago[modules] PR28752: Do not instantiate variable declarations which are not visible.
Vassil Vassilev [Tue, 11 Oct 2016 13:57:36 +0000 (13:57 +0000)]
[modules] PR28752: Do not instantiate variable declarations which are not visible.

https://reviews.llvm.org/D24508

Patch developed in collaboration with Richard Smith!

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

8 years agoRevert "[Driver][Diagnostics] Make 'show option names' default for driver warnings"
Renato Golin [Tue, 11 Oct 2016 10:26:33 +0000 (10:26 +0000)]
Revert "[Driver][Diagnostics] Make 'show option names' default for driver warnings"

This reverts commit r283827, as it's breaking all ARM/AARch64 bots.

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

8 years agoDelete clang-completion-mode.el.
Manuel Klimek [Tue, 11 Oct 2016 09:25:34 +0000 (09:25 +0000)]
Delete clang-completion-mode.el.

It has been unmaintained for a while (last change was more than four
years ago), and it appears not widely used.
By now there are multiple well-maintained alternatives (emacs-ycmd,
atuo-complete-clang), and if users try to make this work they'll likely
have a bad user experience.

Reasoning and problems pointed out by Philipp Stephani.

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

8 years agoTurn FileManager DirectoryEntry::Name from raw pointer to StringRef (NFC)
Mehdi Amini [Tue, 11 Oct 2016 07:31:29 +0000 (07:31 +0000)]
Turn FileManager DirectoryEntry::Name from raw pointer to StringRef (NFC)

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