Commit Graph

58813 Commits

Author SHA1 Message Date
Birunthan Mohanathas a0388a8af2 clang-format: Add option to break after definition return type for top-level functions only
Differential Revision: http://reviews.llvm.org/D10774

llvm-svn: 240959
2015-06-29 15:30:42 +00:00
Birunthan Mohanathas a081002bdd clang-format: Adjust Mozilla style defaults
Summary: This makes the Mozilla style defaults more compliant with the Mozilla style guide. A few options were removed in order to use the LLVM style defaults.

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

llvm-svn: 240957
2015-06-29 15:18:58 +00:00
Asaf Badouh a45b7cab7b [x86][AVX512CD] Add conflict and lzcnt intrinsics in their 512bit versions
include tests

review
http://reviews.llvm.org/D10795

llvm-svn: 240941
2015-06-29 12:51:53 +00:00
Asaf Badouh 4002ce4834 [X86][AVX512BW] Add more intrinsics support:
Blend, abs, packs, adds, subs, avg, max, min, permute.
 all the intrinsics are covered by tests

review:
http://reviews.llvm.org/D10799

llvm-svn: 240937
2015-06-29 12:16:40 +00:00
Daniel Jasper 739b85f2e7 clang-format: Don't indent relative to unary operators (some more).
Before:
  long aaaaaaaa = !aaaa( // break
                      aaaaaa);
  long aaaaaaaa = !aa.aa( // break
      aaaaaa);

After:
  long aaaaaaaa = !aaaa( // break
      aaaaaa);
  long aaaaaaaa = !aa.aa( // break
      aaaaaa);

llvm-svn: 240934
2015-06-29 10:42:59 +00:00
Igor Breger c2d7e033d7 This is a comment-only change to test commit access
llvm-svn: 240931
2015-06-29 09:48:56 +00:00
Javed Absar 8f16175b60 [ARM]: Extend -mfpu options for half-precision and vfpv3xd
Some of the the permissible ARM -mfpu options, which are supported in GCC,
are currently not present in llvm/clang.This patch adds the options:
'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16. 
These are related to half-precision floating-point and single precision.

Reviewers: rengolin, ranjeet.singh

Subscribers: llvm-commits

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

llvm-svn: 240929
2015-06-29 09:30:19 +00:00
Elena Demikhovsky c563c2c61a AVX-512: Implemented AVX-512 FMA intrinsics and tests.
by Igor Breger

http://reviews.llvm.org/D10797

llvm-svn: 240928
2015-06-29 09:20:57 +00:00
Frederic Riss 275a38688e Delete unused variables.
llvm-svn: 240923
2015-06-29 04:41:58 +00:00
David Majnemer 0d9ad687c7 [MS ABI] Unify constant and non-constant member pointer conversion
We had two separate paths for member pointer conversion: one which
takes a constant and another which takes an arbitrary value.  In the
latter case, we are permitted to construct arbitrary instructions.

It turns out that the bulk of the member pointer conversion is sharable
if we construct an artificial IRBuilder.

llvm-svn: 240921
2015-06-29 00:06:50 +00:00
NAKAMURA Takumi d94330440a Revert r240872, "Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. Will fix later."
This has been fixed since r240912.

llvm-svn: 240920
2015-06-28 23:14:35 +00:00
Jingyue Wu 5126186b32 [PPC] fixes typos in builtins-ppc-p8vector.c
The extra ] causes %{{[0-9]]*}} to match only %<single digit> such as %1.

llvm-svn: 240912
2015-06-28 18:30:36 +00:00
Birunthan Mohanathas 50a6f9157b clang-format: Stop old options from overriding new options
Summary: Depends on D10785.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 240909
2015-06-28 14:52:34 +00:00
Birunthan Mohanathas 5cff10fcf5 clang-format: Add missing members to FormatStyle::operator==
Summary: Depends on D10784.

Reviewers: djasper

Reviewed By: djasper

Subscribers: dblaikie, klimek, cfe-commits

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

llvm-svn: 240908
2015-06-28 14:52:01 +00:00
Birunthan Mohanathas 35cfbd7988 clang-format: Alphabetize FormatStyle members
Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 240907
2015-06-28 14:51:17 +00:00
David Majnemer 17f448b323 [Driver] x86-64 Windows is always PIC
This fixes PR23963.

llvm-svn: 240902
2015-06-28 04:23:33 +00:00
Nico Weber 45c4812851 clang-format: Support @autoreleasepool.
Format @autoreleasepool properly for the Attach brace style
by recognizing @autoreleasepool as a block introducer.

Patch from Strager Neds!
http://reviews.llvm.org/D10372

llvm-svn: 240896
2015-06-28 01:06:16 +00:00
Davide Italiano 43899d44c2 [Sema] Unions cannot have virtual functions.
PR:		PR23931
Differential Revision:	http://reviews.llvm.org/D10752
Reviewed by:  rsmith

llvm-svn: 240889
2015-06-27 19:18:55 +00:00
Alex Denisov 21065ec50e Fix typo. NFC.
llvm-svn: 240888
2015-06-27 19:04:55 +00:00
Birunthan Mohanathas b744e7210b clang-format: Fix language of DisableFormat description
This is a comment-only change to test commit access.

llvm-svn: 240879
2015-06-27 09:25:28 +00:00
NAKAMURA Takumi 6075fa1273 Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. Will fix later.
llvm-svn: 240872
2015-06-27 03:33:47 +00:00
Adrian Prantl 9935f4f115 Add a testcase for bitfield debug info.
llvm-svn: 240833
2015-06-26 21:25:18 +00:00
Nemanja Ivanovic 2f1f926e34 Add missing builtins to altivec.h for ABI compliance (vol. 1)
This patch corresponds to review:
http://reviews.llvm.org/D10637

This is the first round of additions of missing builtins listed in the ABI document. More to come (this builds onto what seurer already addes). This patch adds:
vector signed long long vec_abs(vector signed long long)
vector double vec_abs(vector double)
vector signed long long vec_add(vector signed long long, vector signed long long)
vector unsigned long long vec_add(vector unsigned long long, vector unsigned long long)
vector double vec_add(vector double, vector double)
vector double vec_and(vector bool long long, vector double)
vector double vec_and(vector double, vector bool long long)
vector double vec_and(vector double, vector double)
vector signed long long vec_and(vector signed long long, vector signed long long)
vector double vec_andc(vector bool long long, vector double)
vector double vec_andc(vector double, vector bool long long)
vector double vec_andc(vector double, vector double)
vector signed long long vec_andc(vector signed long long, vector signed long long)
vector double vec_ceil(vector double)
vector bool long long vec_cmpeq(vector double, vector double)
vector bool long long vec_cmpge(vector double, vector double)
vector bool long long vec_cmpge(vector signed long long, vector signed long long)
vector bool long long vec_cmpge(vector unsigned long long, vector unsigned long long)
vector bool long long vec_cmpgt(vector double, vector double)
vector bool long long vec_cmple(vector double, vector double)
vector bool long long vec_cmple(vector signed long long, vector signed long long)
vector bool long long vec_cmple(vector unsigned long long, vector unsigned long long)
vector bool long long vec_cmplt(vector double, vector double)
vector bool long long vec_cmplt(vector signed long long, vector signed long long)
vector bool long long vec_cmplt(vector unsigned long long, vector unsigned long long)

llvm-svn: 240821
2015-06-26 19:27:20 +00:00
Douglas Katzman ecddb3a38a [PPC]: Fix bug in getMultiarchTriple.
And generally prefer not to restate TargetTriple.str() over and over.

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

llvm-svn: 240808
2015-06-26 18:37:15 +00:00
Chad Rosier b046a635a0 Avoid false positive/negative test results from line directive interference.NFC.
http://reviews.llvm.org/D10443
Patch by Geoff Berry.

llvm-svn: 240801
2015-06-26 17:49:10 +00:00
Anna Zaks 3849dea8c9 [static analyzer] Analyzer is skipping forward declared C/C++ functions
A patch by Karthik Bhat!

This patch fixes a regression introduced by r224398. Prior to r224398
we were able to analyze the following code in test-include.c and report
a null deref in this case. But post r224398 this analysis is being skipped.

E.g.
  // test-include.c
  #include "test-include.h"
  void test(int * data) {
    data = 0;
    *data = 1;
  }

   // test-include.h
  void test(int * data);

This patch uses the function body (instead of its declaration) as the location
of the function when deciding if the Decl should be analyzed with path-sensitive
analysis. (Prior to r224398, the call graph was guaranteed to have a definition
when available.)

llvm-svn: 240800
2015-06-26 17:42:58 +00:00
Douglas Katzman a67e50c301 clang-format some of the files in lib/Driver. NFC
Nothing was hand edited afterward except a few literal strings
and comments that were poorly broken.

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

llvm-svn: 240791
2015-06-26 15:47:46 +00:00
Alex Denisov fde64956f9 [ObjC] Add NSValue support for objc_boxed_expressions
Patch extends ObjCBoxedExpr to accept records (structs and unions):

typedef struct __attribute__((objc_boxable)) _Color {
  int r, g, b;
} Color;

Color color;
NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)];

llvm-svn: 240761
2015-06-26 05:28:36 +00:00
Manuel Klimek 5eb6039f16 Fix crash-on-invalid bug in template instantiation.
Get rid of code-path that (according to Richard Smith) is not needed but
leads to a crasher bug when assuming a template has been fully
instantiated and thus has a definition.

llvm-svn: 240752
2015-06-26 02:15:04 +00:00
Paul Robinson 889d722e87 FileCheck-ize test and make sure more things don't happen.
Attribute 'nodebug' means no llvm.dbg.* intrinsics, no !dbg
annotations, and no DISubprogram for the function.

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

llvm-svn: 240747
2015-06-26 00:36:50 +00:00
Nico Weber ac64b97771 Add new file from r240741 to CMakeLists.txt.
llvm-svn: 240743
2015-06-26 00:19:32 +00:00
Davide Italiano 982bbf404e [Sema] Commit a better fix for r240242
Skip calls to HasTrivialDestructorBody() in the case where the
destructor is never invoked. Alternatively, Richard proposed to change
Sema to declare a trivial destructor for anonymous union member, which
seems too wasteful.

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

llvm-svn: 240742
2015-06-26 00:18:35 +00:00
Nico Weber 2ca46867e1 Add an inttypes.h wrapper that fixes up some macros in Microsoft mode.
Before MSVS2015, MSVS's headers disagree about int32_t and PRIx32 and so on.
Provide a wrapper header to fix this, so that -Wformat can still be used.
Fixes PR23412.

llvm-svn: 240741
2015-06-26 00:13:18 +00:00
Meador Inge 4f9dee7511 [Sema] Maintain ellipsis location when transforming lambda captures
This patch fixes a crash caused by the following case:

  template<typename T>
  auto f(T x) {
    auto g = [](auto ... args) {
      auto h = [args...]() -> int {
        return 0;
      };
      return h;
    };
    return g;
  }

  auto x = f(0)();

When the templated function 'f' is instantiated and the inner-most
lambda is transformed the ellipsis location on the captured variable
is lost.  Then the lambda returned by 'f' is instantiated and the
tree transformer chokes on the invalid ellipsis location.  The
problem is fixed by making a minor change to properly track the
ellipsis location.

This fixes PR23716.

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

llvm-svn: 240740
2015-06-26 00:09:55 +00:00
David Majnemer 41011f6706 [CodeGen] Restrict isTriviallyRecursive to predefined lib functions forwarding to lib functions
isTriviallyRecursive is only supposed to guard functions part of the
implementation.

This fixes PR23953.

llvm-svn: 240735
2015-06-25 23:50:40 +00:00
Kaelyn Takata 26ffc5f7fb Fix a typo correction crash when resolving ambiguous corrections.
In certain cases, the tree transform would introduce new TypoExprs while
trying one of the corrections, invalidating the unique_ptr in the state
reference, and also causing a TypoExpr to exist that will never be
corrected since it doesn't exist in the final corrected expression. The
simple solution to both problems is to temporarily disable typo
correction while handling potentially ambiguous typo corrections.

llvm-svn: 240734
2015-06-25 23:47:39 +00:00
Anna Zaks 8264a8cdbc [docs] Several updates to the Address Sanitizer webpage.
- Added the description of the interceptor suppression.
 - Re-organized a bit: grouped a few things under the Issue Suppression
   section, grouped IOC and leaks under a section, placed symbolication
   info into Symbolizing the Reports section..
 - In supported platforms: "MacOS" -> "OS X"; added "iOS Simulator"
 - Added a paragraph to the Usage section describing when DYLD_INSERT_LIBRARIES
   might need to be used.
 - "attribute((no_sanitize_address))" -> "__attribute__((no_sanitize("address")))"
 - Updated Leak Sanitizer page with most up to date info.
....

http://reviews.llvm.org/D10559

llvm-svn: 240725
2015-06-25 23:36:44 +00:00
Sean Silva d0de76a3da Remove `requires` for x86 CPU features.
Ever since the target attributes change, we don't need to guard these
headers with `requires`. Actually it's a bit worse, because if we do
then they are included textually under the covers, causing declarations
to appear in submodules they aren't supposed to be in.

llvm-svn: 240720
2015-06-25 23:22:11 +00:00
Jonathan Roelofs 1026b65622 Fix the test added in r240710.
llvm-svn: 240718
2015-06-25 23:21:11 +00:00
Alexey Samsonov 9b87309a91 [CFI] Diagnose when we CFI in diagnostic mode is unavailable on a toolchain.
Summary:
Namely, we must have proper C++ABI support in UBSan runtime. We don't
have a good way to check for that, so just assume that C++ABI support is
there whenever -fsanitize=vptr is supported (i.e. only on handful of
platforms).

Exact diagnostic is also tricky. It's not "cfi" that is unsupported,
just the diagnostic mode. So, I suggest to report that
"-fno-sanitize-trap=cfi-foobar" is incompatible with a given target
toolchain.

Test Plan: regression test suite

Reviewers: pcc

Subscribers: cfe-commits

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

llvm-svn: 240716
2015-06-25 23:14:32 +00:00
Diego Novillo 5aecacb275 Display profile file name when emitting a file not found diagnostic.
When a profile file cannot be opened, we used to display just the error
message but not the name of the profile the compiler was trying to open.
This will become useful in the next set of patches that introduce
GCC-compatible flags to specify profiles.

llvm-svn: 240715
2015-06-25 22:56:00 +00:00
Chris Bieneman 2dad98c69b This should actually fix the broken bots.
llvm-svn: 240710
2015-06-25 22:15:39 +00:00
Meador Inge f0af05c4a5 [Parse] Allow 'constexpr' in condition declarations
This patch implements the functionality specified by DR948.
The changes are two fold.  First, the parser was modified
to allow 'constexpr's to appear in condition declarations
(which was a hard error before).  Second, Sema was modified
to cleanup maybe odr-used declarations by way of a call to
'ActOnFinishFullExpr'.  As 'constexpr's were not allowed in
condition declarations before the cleanup wasn't necessary
(such declarations were always odr-used).

This fixes PR22491.

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

llvm-svn: 240707
2015-06-25 22:06:40 +00:00
Richard Smith 1e02a5aac8 [modules] Properly merge visibility of class definitions that got merged while
parsing then merged again when the module was loaded.

llvm-svn: 240700
2015-06-25 21:42:33 +00:00
Peter Collingbourne 5b74593e16 docs: Fix bad link in SafeStack.rst.
llvm-svn: 240696
2015-06-25 21:02:17 +00:00
Chris Bieneman 58163dadc5 Speculative fix for the broken bots.
llvm-svn: 240693
2015-06-25 20:50:46 +00:00
Richard Smith 396f18f302 [modules] Fix findDirectiveAtLoc to not call a member function on a null pointer.
This is exercised by existing tests, and fixes a failure with -fsanitize=null.
No observable change otherwise; the code happened to do the right thing in
practice under recent versions of Clang and GCC because
MacroDirective::getDefinition happens to check whether this == null.

llvm-svn: 240691
2015-06-25 20:48:44 +00:00
Chris Bieneman 79e8210e82 Add -miphonesimulator-version-min as alias to -ios-simulator-version-min.
Summary:
For better or worse the OS X command line tools refer to the iOS simulator as iphonesimucator. We should provide an alias flag -miphonesimulator-version-min that matches a consistent pattern with the other tools.

This is in the interest of making it easier for people to write platform-agnostic darwin build scripts.

Reviewers: bob.wilson, bogner

Subscribers: cfe-commits

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

llvm-svn: 240686
2015-06-25 20:25:43 +00:00
Alexey Samsonov 2f640d9a0f [clang-fuzzer] Update clang-fuzzer to API change in r240225.
llvm-svn: 240685
2015-06-25 20:21:59 +00:00
Douglas Katzman b7e8ef005f Rename local variable CCCPrintActions -> CCCPrintPhases.
To match the '-ccc-print-phases' command-line flag.
Also make two more 'for' loops range-based. NFC

llvm-svn: 240680
2015-06-25 19:37:41 +00:00