Commit Graph

60216 Commits

Author SHA1 Message Date
Chris Bieneman
cd53780cd4 [CMake] Refactoring and cleaning up clang symlink generation.
Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE.

This re-lands r248015, with fixes for clang symlinks to always be generated as part of the clang and install-clang targets.

llvm-svn: 248043
2015-09-18 21:15:54 +00:00
Gabor Horvath
dce40c518d [Static Analyzer] General type checker based on dynamic type information.
Differential Revision: http://reviews.llvm.org/D12973

llvm-svn: 248041
2015-09-18 21:15:37 +00:00
Adrian Prantl
201e10d007 Debug Info: Use the full module name as a key when caching DIModules.
The signature may not have been computed at the time the module reference
is generated (e.g.: in the future while emitting debug info for a clang
module). Using the full module name is safe because each clang module may
only have a single definition.

NFC.

llvm-svn: 248037
2015-09-18 21:06:14 +00:00
Rafael Espindola
12d2a39c88 Handle lld not being found in PATH.
llvm-svn: 248035
2015-09-18 20:55:58 +00:00
Nico Weber
4cc796a614 clang-cl: Don't warn on /bigobj flag
LLVM r217812 made it so that clang-cl implicitly creates bigobj files when
needed, independent of this flag. It looks like cl has this flag to produce obj
flags compatible with MSVS 2003's linker by default, something we don't care
about. Since clang-cl always has /bigobj behavior, don't warn that the flag is
unused, just ignore it silently.

llvm-svn: 248034
2015-09-18 20:49:33 +00:00
Rafael Espindola
4859773a95 Yet another try at fixing this at every bot.
This time handle " and - after clang and lld.

llvm-svn: 248033
2015-09-18 20:44:09 +00:00
Rafael Espindola
df1b494404 Relax this test further to pass in other bots.
The problem this time was the /clang matching the InstalledDir line.

Now we just use regular expressions which are more flexible, if a bit less
readable, than CHECK+CHECK-SAME.

llvm-svn: 248031
2015-09-18 20:35:53 +00:00
Rafael Espindola
9b3ee4bf2c Fix test to pass when the directory name has lld in it.
CHECK-LABEL assumes that there is only one occurrence of the match.

The output looks like:

clang version 3.8.0 (trunk 247999)
....
/path/to/build/dir/bin/clang-3.8 ....

If the path contains lld, the second CHECK-LABEL matches it and we fail since
there is no -cc1as between clang and lld.

llvm-svn: 248029
2015-09-18 20:22:36 +00:00
Chris Bieneman
f41fe8b6f8 Revert "[CMake] Refactoring and cleaning up clang symlink generation."
This reverts commit r248015, because it broke bots. I'll revise and recommit.

llvm-svn: 248025
2015-09-18 19:59:51 +00:00
Gabor Horvath
c4b28a8f74 [analyzer] A fix for substraction of an integer from a pointer.
Patch by Artem Dergachev!

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

llvm-svn: 248021
2015-09-18 19:13:22 +00:00
Chris Bieneman
bca3d933ce [CMake] Set CLANG_LINKS_TO_CREATE in Apple-stage2.cmake so that we create cc and c++ links.
llvm-svn: 248016
2015-09-18 18:11:18 +00:00
Chris Bieneman
8a1030db9f [CMake] Refactoring and cleaning up clang symlink generation.
Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE.

llvm-svn: 248015
2015-09-18 18:09:15 +00:00
Hans Wennborg
0f0e8d624c clang-cl: Use 'pc' for the vendor field in the default triple
Leaving it unset can make the triple look confusing, especially
when using -m32 or -m64.

llvm-svn: 248005
2015-09-18 17:11:50 +00:00
Gabor Horvath
6165d31a83 [Static Analyzer] Use generics related information to infer dynamic types.
Differential Revision: http://reviews.llvm.org/D12916

llvm-svn: 248002
2015-09-18 16:43:27 +00:00
NAKAMURA Takumi
e7229f4921 Suppress amdgpu-toolchain.c for targeting ps4, for now. Investigating.
llvm-svn: 248000
2015-09-18 16:21:27 +00:00
Jordan Rose
76a74c5617 [analyzer] Update links to developer.apple.com.
The content at the new links is /also/ a little dated, but that's our
(Apple's) problem.

llvm-svn: 247999
2015-09-18 16:12:16 +00:00
NAKAMURA Takumi
a528f34b43 amdgpu-toolchain.c: Add a probe line temporally. Will revert later.
llvm-svn: 247997
2015-09-18 15:56:16 +00:00
Douglas Katzman
8c39e6aee8 Use None instead of an explicit constructor.
And remove a needless 'const' since ArrayRef is immutable.
Both as suggested by dblaikie on cfe-commits.

llvm-svn: 247995
2015-09-18 15:23:16 +00:00
Joerg Sonnenberger
924f6ad63d Pass the relocation model to LLVM for assembler files.
llvm-svn: 247981
2015-09-18 11:13:43 +00:00
NAKAMURA Takumi
36b6c39d48 clang/test/lit.cfg: *-ps4 doesn't have appropriate driver yet. Mark it as "non-clang-driver".
llvm-svn: 247977
2015-09-18 08:11:36 +00:00
Alexey Bataev
87933c7ced [OPENMP 4.0] Add 'if' clause for 'cancel' directive.
Add parsing, sema analysis and codegen for 'if' clause in 'cancel' directive.

llvm-svn: 247976
2015-09-18 08:07:34 +00:00
Alexander Musman
fbbc0b8cec Fix for assertion fail for pragma weak on typedef.
Example:
typedef int __td3;
#pragma weak td3 = __td3

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

llvm-svn: 247975
2015-09-18 07:40:22 +00:00
Saleem Abdulrasool
eee54b4d7c Driver: avoid unnecessary string based operations
Use an enumeration and change the use of the FloatABI from a string to the
enumeration.  This avoids the use of string values to represent an enumeration.
NFC.

llvm-svn: 247967
2015-09-18 05:32:23 +00:00
Nathan Wilson
a46106b358 [Concepts] Moving tests to match the corresponding section of the TS
llvm-svn: 247966
2015-09-18 02:50:53 +00:00
NAKAMURA Takumi
097ce205b0 clang/test/Driver/myriad-toolchain.c: Tweak for DOSish path.
llvm-svn: 247959
2015-09-18 01:02:50 +00:00
Douglas Katzman
b1278f3349 [Myriad]: add "<sysroot>/include" to standard search path
llvm-svn: 247948
2015-09-17 21:20:16 +00:00
Charles Davis
c7d5c94f78 Support __builtin_ms_va_list.
Summary:
This change adds support for `__builtin_ms_va_list`, a GCC extension for
variadic `ms_abi` functions. The existing `__builtin_va_list` support is
inadequate for this because `va_list` is defined differently in the Win64
ABI vs. the System V/AMD64 ABI.

Depends on D1622.

Reviewers: rsmith, rnk, rjmccall

CC: cfe-commits

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

llvm-svn: 247941
2015-09-17 20:55:33 +00:00
Piotr Padlewski
b83278687d Using MD_invariant_group
http://reviews.llvm.org/D12927

llvm-svn: 247933
2015-09-17 20:25:46 +00:00
Douglas Katzman
e793f19831 Try to unbreak windows compiler after r247926.
It might not like {} implicitly cast to an Arrayref.
That's the theory, since I can't test it.

llvm-svn: 247932
2015-09-17 20:25:09 +00:00
Artem Belevich
4ea96421d1 Fixed the comment to match reality.
llvm-svn: 247930
2015-09-17 20:19:33 +00:00
Douglas Katzman
cbd00723b4 [Shave]: Rename test file from 'shave-' to 'myriad-'
llvm-svn: 247926
2015-09-17 20:00:09 +00:00
Douglas Katzman
d6e597c2be [Shave]: Drive sparc-myriad-elf-ld directly rather than via gcc.
Differential Revision: http://reviews.llvm.org/D12541

llvm-svn: 247924
2015-09-17 19:56:40 +00:00
Chris Bieneman
0792636eec [CMake] Add install-clang target to install just the clang executable
For the llvm-tools we're generating install-${tool} targets which are very useful. We should have one for clang too.

llvm-svn: 247912
2015-09-17 18:30:20 +00:00
Reid Kleckner
01485654db Use the MSVC SEH personalities on Mingw
Mingw generally wraps an old copy of msvcrt.dll which has these
personalities, so things should work out, or so I hear. I haven't tested
it.

llvm-svn: 247902
2015-09-17 17:04:13 +00:00
Douglas Katzman
8bfac2c553 createOutputFile should set Error to something if it returns null.
This is not portably unit-testable because the only visible
effect is a change from one random message string to another.

llvm-svn: 247900
2015-09-17 16:45:12 +00:00
Adrian Prantl
b20f1d0a3c Fix a typo.
llvm-svn: 247895
2015-09-17 15:58:54 +00:00
Asaf Badouh
2718051dd7 re-apply r.247881
fixed the tests.

llvm-svn: 247892
2015-09-17 14:53:37 +00:00
Aaron Ballman
cdc43afa20 Update the 3.8 release notes with the breaking change information regarding AST matchers.
llvm-svn: 247887
2015-09-17 13:47:22 +00:00
Aaron Ballman
512fb64765 Rename AST node matchers to match the AST node names directly. Part of this rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects.
llvm-svn: 247885
2015-09-17 13:30:52 +00:00
Asaf Badouh
8a61250709 revert r.247881 due to tests failures
llvm-svn: 247883
2015-09-17 13:09:33 +00:00
NAKAMURA Takumi
007f75dab7 Appease clang/test/CodeGen/avx512dq-builtins.c for -Asserts, for now.
llvm-svn: 247882
2015-09-17 12:33:34 +00:00
Asaf Badouh
a0e5e71ef1 [X86][AVX512DQ] add new intrinsics
convert i64 to FP and vice versa
reduceps & reducepd
rangeps & rangepd
all in their 512bit versions


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

llvm-svn: 247881
2015-09-17 11:56:04 +00:00
Naomi Musgrave
bf8f00586a Updating docs for MSan to describe poison-in-dtor.
Summary:
Describe the compile and runtime flags to enable MemorySanitizer
detection of use-after-destroy.

Reviewers: eugenis

Subscribers: llvm-commits

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

Revise doc description of use-after-dtor.

Change wording to specify memory no longer readable.

llvm-svn: 247871
2015-09-17 00:10:59 +00:00
NAKAMURA Takumi
d1aa0681d7 analyzer-plugin/MainCallChecker.cpp: s/generateSink/generateErrorNode/, corresponding to r247859.
llvm-svn: 247862
2015-09-16 22:57:23 +00:00
Gabor Horvath
3ef9ef2227 [Static Analyzer] Generics Checker: When an ObjC method returns a specialized object, track it properly.
Differential Revision: http://reviews.llvm.org/D12889

llvm-svn: 247861
2015-09-16 22:44:36 +00:00
Devin Coughlin
e39bd407ba [analyzer] Add generateErrorNode() APIs to CheckerContext.
The analyzer trims unnecessary nodes from the exploded graph before reporting
path diagnostics. However, in some cases it can trim all nodes (including the
error node), leading to an assertion failure (see
https://llvm.org/bugs/show_bug.cgi?id=24184).

This commit addresses the issue by adding two new APIs to CheckerContext to
explicitly create error nodes. Unless the client provides a custom tag, these
APIs tag the node with the checker's tag -- preventing it from being trimmed.
The generateErrorNode() method creates a sink error node, while
generateNonFatalErrorNode() creates an error node for a path that should
continue being explored.

The intent is that one of these two methods should be used whenever a checker
creates an error node.

This commit updates the checkers to use these APIs. These APIs
(unlike addTransition() and generateSink()) do not take an explicit Pred node.
This is because there are not any error nodes in the checkers that were created
with an explicit different than the default (the CheckerContext's Pred node).

It also changes generateSink() to require state and pred nodes (previously
these were optional) to reduce confusion.

Additionally, there were several cases where checkers did check whether a
generated node could be null; we now explicitly check for null in these places.

This commit also includes a test case written by Ying Yi as part of
http://reviews.llvm.org/D12163 (that patch originally addressed this issue but
was reverted because it introduced false positive regressions).

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

llvm-svn: 247859
2015-09-16 22:03:05 +00:00
Reid Kleckner
8be1847b09 [WinEH] Fix a build issue in CGException.cpp
I was constructing an object without filling in all the fields.

llvm-svn: 247851
2015-09-16 21:06:09 +00:00
Reid Kleckner
10aa77032d [WinEH] Pass the catch adjectives to catchpad directly
This avoids building a fake LLVM IR global variable just to ferry an i32
down into LLVM codegen. It also puts a nail in the coffin of using MS
ABI C++ EH with landingpads, since now we'll assert in the lpad code
when flags are present.

llvm-svn: 247843
2015-09-16 20:15:55 +00:00
Argyrios Kyrtzidis
6d0a767685 [tooling] Add unit tests for change in r247468.
llvm-svn: 247832
2015-09-16 18:28:42 +00:00
Anton Yartsev
c647a6df72 [analyzer] Improved behavior if Clang was not found, part II
- scan-build help: display 'Could not query Clang for the list of available checkers.' + the reason why it happened so if clang was not found.
- display requested/forced help in case of --use-analyzer=Xcode.

llvm-svn: 247828
2015-09-16 18:12:15 +00:00