]> granicus.if.org Git - clang/log
clang
8 years agoSerialize `#pragma comment`.
Nico Weber [Wed, 2 Mar 2016 17:28:48 +0000 (17:28 +0000)]
Serialize `#pragma comment`.

`#pragma comment` was handled by Sema calling a function on ASTConsumer, and
CodeGen then implementing this function and writing things to its output.

Instead, introduce a PragmaCommentDecl AST node and hang one off the
TranslationUnitDecl for every `#pragma comment` line, and then use the regular
serialization machinery. (Since PragmaCommentDecl has codegen relevance, it's
eagerly deserialized.)

http://reviews.llvm.org/D17799

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

8 years agotest/Driver/cl-pch-errorhandling.cpp: Copy input file to a temporary
Daniel Jasper [Wed, 2 Mar 2016 14:26:59 +0000 (14:26 +0000)]
test/Driver/cl-pch-errorhandling.cpp: Copy input file to a temporary
location as we cannot assume the location of the input file to be
writable.

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSRA{W|WI}{128|256|512}.
Michael Zuckerman [Wed, 2 Mar 2016 12:06:06 +0000 (12:06 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSRA{W|WI}{128|256|512}.

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

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSRAV
Michael Zuckerman [Wed, 2 Mar 2016 09:05:46 +0000 (09:05 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSRAV

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

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

8 years ago[Sema] PR26444 fix crash when alignment value is >= 2**16
David Majnemer [Wed, 2 Mar 2016 06:48:47 +0000 (06:48 +0000)]
[Sema] PR26444 fix crash when alignment value is >= 2**16

Sema allows max values up to 2**28, use unsigned instead of unsiged
short to hold values that large.

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

Patch by Don Hinton!

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

8 years ago[modules] addHeaderInclude() can't fail.
Davide Italiano [Wed, 2 Mar 2016 06:09:18 +0000 (06:09 +0000)]
[modules] addHeaderInclude() can't fail.

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

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

8 years ago[OPENMP 4.5] Codegen for data members in 'reduction' clause.
Alexey Bataev [Wed, 2 Mar 2016 04:57:40 +0000 (04:57 +0000)]
[OPENMP 4.5] Codegen for data members in 'reduction' clause.

OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch supports codegen for non-static
data members in 'reduction' clauses.

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

8 years agoAdd a few dllimport/dllexport tests. NFC
Reid Kleckner [Wed, 2 Mar 2016 01:21:48 +0000 (01:21 +0000)]
Add a few dllimport/dllexport tests.  NFC

Summary:
This change just adds tests for some corner cases of dllimport/dllexport,
primarily for some static methods.

We plan to enable dllimport/dllexport support for the PS4, and these
additional tests are for points we previously were testing internally.

-Warren Ristow
SN Systems - Sony Computer Entertainment Group

Reviewers: rnk

Subscribers: silvas

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

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

8 years ago[CMake] Add convenience target clang-test-depends to build test dependencies.
Chris Bieneman [Wed, 2 Mar 2016 00:27:15 +0000 (00:27 +0000)]
[CMake] Add convenience target clang-test-depends to build test dependencies.

This is useful when paired with the distribution targets to build prerequisites for running tests.

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

8 years agoclang-cl: Implement initial limited support for precompiled headers.
Nico Weber [Tue, 1 Mar 2016 23:16:44 +0000 (23:16 +0000)]
clang-cl: Implement initial limited support for precompiled headers.

In the gcc precompiled header model, one explicitly runs clang with `-x
c++-header` on a .h file to produce a gch file, and then includes the header
with `-include foo.h` and if a .gch file exists for that header it gets used.
This is documented at
http://clang.llvm.org/docs/UsersManual.html#precompiled-headers

cl.exe's model is fairly different, and controlled by the two flags /Yc and
/Yu. A pch file is generated as a side effect of a regular compilation when
/Ycheader.h is passed. While the compilation is running, the compiler keeps
track of #include lines in the main translation unit and writes everything up
to an `#include "header.h"` line into a pch file. Conversely, /Yuheader.h tells
the compiler to skip all code in the main TU up to and including `#include
"header.h"` and instead load header.pch. (It's also possible to use /Yc and /Yu
without an argument, in that case a `#pragma hrdstop` takes the role of
controlling the point where pch ends and real code begins.)

This patch implements limited support for this in that it requires the pch
header to be passed as a /FI force include flag – with this restriction,
it can be implemented almost completely in the driver with fairly small amounts
of code. For /Yu, this is trivial, and for /Yc a separate pch action is added
that runs before the actual compilation. After r261774, the first failing
command makes a compilation stop – this means if the pch fails to build the
main compilation won't run, which is what we want. However, in /fallback builds
we need to run the main compilation even if the pch build fails so that the
main compilation's fallback can run. To achieve this, add a ForceSuccessCommand
that pretends that the pch build always succeeded in /fallback builds (the main
compilation will then fail to open the pch and run the fallback cl.exe
invocation).

If /Yc /Yu are used in a setup that clang-cl doesn't implement yet, clang-cl
will now emit a "not implemented yet; flag ignored" warning that can be
disabled using -Wno-clang-cl-pch.

Since clang-cl doesn't yet serialize some important things (most notably
`pragma comment(lib, ...)`, this feature is disabled by default and only
enabled by an internal driver flag. Once it's more stable, this internal flag
will disappear.

(The default stdafx.h setup passes stdafx.h as explicit argument to /Yc but not
as /FI – instead every single TU has to `#include <stdafx.h>` as first thing it
does. Implementing support for this should be possible with the approach in
this patch with minimal frontend changes by passing a --stop-at / --start-at
flag from the driver to the frontend. This is left for a follow-up. I don't
think we ever want to support `#pragma hdrstop`, and supporting it with this
approach isn't easy: This approach relies on the driver knowing the pch
filename in advance, and `#pragma hdrstop(out.pch)` can set the output
filename, so the driver can't know about it in advance.)

clang-cl now also honors /Fp and puts pch files in the same spot that cl.exe
would put them, but the pch file format is of course incompatible. This has
ramifications on /fallback, so /Yc /Yu aren't passed through to cl.exe in
/fallback builds.

http://reviews.llvm.org/D17695

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

8 years agoUpdated SSE41 builtin tests to more closely match the llvm fast-isel equivalent tests
Simon Pilgrim [Tue, 1 Mar 2016 22:38:33 +0000 (22:38 +0000)]
Updated SSE41 builtin tests to more closely match the llvm fast-isel equivalent tests

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

8 years agoMangle extended qualifiers in the proper order and mangle the
John McCall [Tue, 1 Mar 2016 22:18:03 +0000 (22:18 +0000)]
Mangle extended qualifiers in the proper order and mangle the
ARC ownership-convention function type modifications.

According to the Itanium ABI, vendor extended qualifiers are
supposed to be mangled in reverse-alphabetical order before
any CVR qualifiers.  The ARC function type conventions are
plausibly order-significant (they are associated with the
function type), which permits us to ignore the need to correctly
inter-order them with any other vendor qualifiers on the parameter
and return types.

Implementing these rules correctly is technically an ABI break.
Apple is comfortable with the risk of incompatibility here for
the ARC features, and I believe that address-space qualification
is still uncommon enough to allow us to adopt the conforming
rule without serious risk.  Still, targets which make heavy
use of address space qualification may want to revert to the
non-conforming order.

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

8 years agoExplicitly select IAS on one more RUN line in new embed-bitcode.c test.
Daniel Sanders [Tue, 1 Mar 2016 21:57:22 +0000 (21:57 +0000)]
Explicitly select IAS on one more RUN line in new embed-bitcode.c test.

This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).

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

8 years ago[clang-format] Detect constructor initializers preceded by `noexcept`.
Daniel Jasper [Tue, 1 Mar 2016 21:41:58 +0000 (21:41 +0000)]
[clang-format] Detect constructor initializers preceded by `noexcept`.

Patch by Erik Kessler, thank you.

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

8 years agoThis patch adds doxygen comments for the intrinsincs in the header file popcntintrin.h.
Ekaterina Romanova [Tue, 1 Mar 2016 20:04:57 +0000 (20:04 +0000)]
This patch adds doxygen comments for the intrinsincs in the header file popcntintrin.h.

The doxygen comments are automatically generated based on Sony's intrinsics documentation.

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

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

8 years agoReword a misleading comment discussing landingpads and SEH
Reid Kleckner [Tue, 1 Mar 2016 19:51:48 +0000 (19:51 +0000)]
Reword a misleading comment discussing landingpads and SEH

SEH doesn't use landingpads anymore.

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

8 years ago[MSVC Compat] Correctly handle finallys nested within finallys
David Majnemer [Tue, 1 Mar 2016 19:42:53 +0000 (19:42 +0000)]
[MSVC Compat] Correctly handle finallys nested within finallys

We'd lose track of the parent CodeGenFunction, leading us to get
confused with regard to which function a nested finally belonged to.

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

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

8 years ago[PPC64][VSX] Add short, char, and bool data type for vec_vsx_ld and vec_vsx_st intrinsics
Kit Barton [Tue, 1 Mar 2016 18:11:28 +0000 (18:11 +0000)]
[PPC64][VSX] Add short, char, and bool data type for vec_vsx_ld and vec_vsx_st intrinsics

Issue: https://llvm.org/bugs/show_bug.cgi?id=26720

Fix compile error when building ffmpeg for PowerPC64LE because of some
vec_vsx_ld/vec_vsx_st intrinsics are not supported by current clang.

New added intrinsics:

(vector) {signed|unsigned} {short|char} vec_vsx_ld: (total: 8)
bool vec_vsx_ld: (total: 1)
(vector) {signed|unsigned} {short|char} vec_vsx_st: (total: 8)
bool vec_vsx_st: (total: 1)
Total: 18 intrinsics

Phabricator: http://reviews.llvm.org/D17637

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

8 years ago[CLANG][AVX512][BUILTIN] Adding PSRL{DI|QI}{128|256|512} builtin
Michael Zuckerman [Tue, 1 Mar 2016 17:49:03 +0000 (17:49 +0000)]
[CLANG][AVX512][BUILTIN] Adding PSRL{DI|QI}{128|256|512} builtin

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

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

8 years agoExplicitly select IAS in new embed-bitcode.c test.
Daniel Sanders [Tue, 1 Mar 2016 17:15:11 +0000 (17:15 +0000)]
Explicitly select IAS in new embed-bitcode.c test.

This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).

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

8 years ago[cmake] Add a few more compiler-rt check-* targets for EXTERNAL_COMPILER_RT
Filipe Cabecinhas [Tue, 1 Mar 2016 15:33:52 +0000 (15:33 +0000)]
[cmake] Add a few more compiler-rt check-* targets for EXTERNAL_COMPILER_RT

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

8 years ago[cmake] Try to appease the buildbots.
Filipe Cabecinhas [Tue, 1 Mar 2016 15:07:19 +0000 (15:07 +0000)]
[cmake] Try to appease the buildbots.

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

8 years ago[cmake] Pass through the cmake_3_2_USES_TERMINAL variable so we get progress bars...
Filipe Cabecinhas [Tue, 1 Mar 2016 14:10:38 +0000 (14:10 +0000)]
[cmake] Pass through the cmake_3_2_USES_TERMINAL variable so we get progress bars on an external compiler-rt build

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

8 years ago[cmake] Use CMake's USES_TERMINAL for the test targets.
Filipe Cabecinhas [Tue, 1 Mar 2016 14:08:18 +0000 (14:08 +0000)]
[cmake] Use CMake's USES_TERMINAL for the test targets.

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

8 years ago[cmake] Fallback to LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR if COMPILER_RT_SRC_ROOT...
Filipe Cabecinhas [Tue, 1 Mar 2016 14:08:13 +0000 (14:08 +0000)]
[cmake] Fallback to LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR if COMPILER_RT_SRC_ROOT doesn't exist.

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

8 years agoFormatTests: Update libdeps corresponding to r262323.
NAKAMURA Takumi [Tue, 1 Mar 2016 13:11:36 +0000 (13:11 +0000)]
FormatTests: Update libdeps corresponding to r262323.

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

8 years ago[CLANG][AVX512][BUILTIN] Adding PSRLV builtin
Michael Zuckerman [Tue, 1 Mar 2016 13:03:45 +0000 (13:03 +0000)]
[CLANG][AVX512][BUILTIN] Adding PSRLV builtin

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

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

8 years agoFix test breakage on windows where the default std is c++11 by forcing c++03 in the...
Manuel Klimek [Tue, 1 Mar 2016 12:53:18 +0000 (12:53 +0000)]
Fix test breakage on windows where the default std is c++11 by forcing c++03 in the test.

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

8 years agoFix DLL build by adding required dependency.
Manuel Klimek [Tue, 1 Mar 2016 12:47:30 +0000 (12:47 +0000)]
Fix DLL build by adding required dependency.

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

8 years agoAdd functions to apply replacements and reformat them.
Manuel Klimek [Tue, 1 Mar 2016 12:37:30 +0000 (12:37 +0000)]
Add functions to apply replacements and reformat them.

This is a commonly useful feature to have, and we have implemented it
multiple times with different kinds of bugs. This implementation
centralizes the idea in a set of functions that we can then use from the various
tools.

Reverts r262234, which is a revert of r262232, and puts the functions
into FOrmat.h, as they are closely coupled to clang-format, and we
otherwise introduce a cyclic dependency between libFormat and
libTooling.

Patch by Eric Liu.

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtin
Michael Zuckerman [Tue, 1 Mar 2016 11:38:16 +0000 (11:38 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSRA{Q|D|QI|DI}{128|256|512} builtin

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

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

8 years agoOptionally demote fatal errors to non-fatal errors.
Manuel Klimek [Tue, 1 Mar 2016 10:56:19 +0000 (10:56 +0000)]
Optionally demote fatal errors to non-fatal errors.

This behavior is enabled when the new CXTranslationUnit_KeepGoing
option is passed to clang_parseTranslationUnit{,2}. It is geared
towards use by IDEs and similar consumers of the clang-c API where
fatal errors may arise when parsing incomplete code mid-edit, or
when include paths are not properly configured yet. In such situations
one still wants to get as much information as possible about a TU.
Previously, the semantic analysis would not instantiate templates
or report additional fatal errors after the first fatal error was
encountered.

Fixes PR24268.

Patch by Milian Wolff.

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

8 years agoTest template instantiation of ns_consumed and ns_returns_retained.
John McCall [Tue, 1 Mar 2016 06:54:30 +0000 (06:54 +0000)]
Test template instantiation of ns_consumed and ns_returns_retained.

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

8 years agoBetter comments for ExtParameterInfo.
John McCall [Tue, 1 Mar 2016 06:27:40 +0000 (06:27 +0000)]
Better comments for ExtParameterInfo.

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

8 years ago[test] After r262290 reducing stack usage, try re-enabling asan on the related test.
Argyrios Kyrtzidis [Tue, 1 Mar 2016 04:40:20 +0000 (04:40 +0000)]
[test] After r262290 reducing stack usage, try re-enabling asan on the related test.

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

8 years agoclang-format: Correctly apply wrap before multi-line RHS rule to
Daniel Jasper [Tue, 1 Mar 2016 04:19:59 +0000 (04:19 +0000)]
clang-format: Correctly apply wrap before multi-line RHS rule to
ternary expressions.

Before:
  return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? aaaaa : bbbbbbbbbbbbbbb +
     cccccccccccccccc;

After:
  return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?
     aaaaa :
     bbbbbbbbbbbbbbb + cccccccccccccccc;

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

8 years agoclang-format: Increase the penalty for breaking between array subscripts.
Daniel Jasper [Tue, 1 Mar 2016 04:19:55 +0000 (04:19 +0000)]
clang-format: Increase the penalty for breaking between array subscripts.

Before:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaa]
                                    [a].aaaaaaaaaaaaaaaaaaaaaa();

After:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaa][a]
      .aaaaaaaaaaaaaaaaaaaaaa();

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

8 years agoclang-format: [JS] Support quoted object literal keys.
Daniel Jasper [Tue, 1 Mar 2016 04:19:47 +0000 (04:19 +0000)]
clang-format: [JS] Support quoted object literal keys.

Before:
  var x = {
    a: a,
    b: b, 'c': c,
  };

After:
  var x = {
    a: a,
    b: b,
    'c': c,
  };

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

8 years ago[index] Fix issue where data visitation was disabled with C++ operator call expressio...
Argyrios Kyrtzidis [Tue, 1 Mar 2016 02:46:32 +0000 (02:46 +0000)]
[index] Fix issue where data visitation was disabled with C++ operator call expressions, during indexing.

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

8 years agoFix the template instantiation of ExtParameterInfos; tests to follow.
John McCall [Tue, 1 Mar 2016 02:09:25 +0000 (02:09 +0000)]
Fix the template instantiation of ExtParameterInfos; tests to follow.

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

8 years agoAdd an llvm_unreachable back to the autogeneration of this covered switch.
John McCall [Tue, 1 Mar 2016 02:09:20 +0000 (02:09 +0000)]
Add an llvm_unreachable back to the autogeneration of this covered switch.

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

8 years agoFix the testcase in r262282
Steven Wu [Tue, 1 Mar 2016 01:24:54 +0000 (01:24 +0000)]
Fix the testcase in r262282

-bitcode_bundle is only passed to the darwin ld64 linker and it is only
implemented there. Remove the check on the linker flag.

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

8 years agoMake test more robust.
Sean Silva [Tue, 1 Mar 2016 01:20:15 +0000 (01:20 +0000)]
Make test more robust.

Really all these tests are checking is that we find a file path. The
behavior when we don't find one will have `"ps4-ld"` in it. We just need
a path separator to know that a path has been found.

The root cause of the flakiness of these tests is the same on Windows
and non-Windows: setting the PATH environment variable is not sufficient
to guarantee that a particular path is looked up first.
Driver::GetProgramPath checks some paths before deferring to PATH
(in particular, the directory containing the clang binary itself).

I initally ran into this on Windows when putting a PS4 linker in
build-dir/bin/ps4-ld for testing.
After digging for a while thinking that it was some windows path search
oddity (the Windows SearchPathW documentation indicates that its
behavior varies depending on a registry setting...).
I eventually tried reproducing the issue on Mac and to my surprise found
the same issue.
Ultimately I traced it down to the extra lookups in
Driver::GetProgramPath.

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

8 years agoIntroduce -fembed-bitcode driver option
Steven Wu [Tue, 1 Mar 2016 01:07:58 +0000 (01:07 +0000)]
Introduce -fembed-bitcode driver option

Summary:
This is the clang driver part of the change to embedded bitcode. This
includes:
1. -fembed-bitcode option which breaks down the compilation into two
stages. The first stage emits optimized bitcode and the second stage
compiles bitcode into object file.
2. -fembed-bitcode-marker option which doesn't really break down to
two stages to speedup the compilation flow.
3. pass the correct linker flag to darwin linker if tool chains supports
embedded bitcode.

Reviewers: rsmith, thakis

Subscribers: thakis, cfe-commits

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

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

8 years agoGeneralize the consumed-parameter array on FunctionProtoType
John McCall [Tue, 1 Mar 2016 00:49:02 +0000 (00:49 +0000)]
Generalize the consumed-parameter array on FunctionProtoType
to allow arbitrary data to be associated with a parameter.

Also, fix a bug where we apparently haven't been serializing
this information for the last N years.

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

8 years ago[analyzer] Update CheckObjCDealloc diagnostic for missing -dealloc.
Devin Coughlin [Tue, 1 Mar 2016 00:39:04 +0000 (00:39 +0000)]
[analyzer] Update CheckObjCDealloc diagnostic for missing -dealloc.

Update the diagnostic for classes missing -dealloc to mention an instance
variable that needs to be released.

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

8 years agoInfrastructure improvements to Clang attribute TableGen.
John McCall [Tue, 1 Mar 2016 00:18:05 +0000 (00:18 +0000)]
Infrastructure improvements to Clang attribute TableGen.

This should make it easier to add new Attr subclasses.

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

8 years ago[analyzer] Teach CheckObjCDealloc about Block_release().
Devin Coughlin [Mon, 29 Feb 2016 23:57:10 +0000 (23:57 +0000)]
[analyzer] Teach CheckObjCDealloc about Block_release().

It now treats Block_release(b) as a release in addition to [b release].

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

8 years ago[analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc.
Devin Coughlin [Mon, 29 Feb 2016 21:44:08 +0000 (21:44 +0000)]
[analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc.

This prevents false negatives when a -dealloc method, for example, removes itself as
as an observer with [[NSNotificationCenter defaultCenter] removeObserver:self]. It is
unlikely that passing 'self' to a system header method will release 'self''s instance
variables, so this is unlikely to produce false positives.

A challenge here is that while CheckObjCDealloc no longer treats these calls as
escaping, the rest of the analyzer still does. In particular, this means that loads
from the same instance variable before and after a call to a system header will
result in different symbols being loaded by the region store. To account for this,
the checker now treats different ivar symbols with the same instance and ivar decl as
the same for the purpose of release checking and more eagerly removes a release
requirement when an instance variable is assumed to be nil. This was not needed before
because when an ivar escaped its release requirement was always removed -- now the
requirement is not removed for calls to system headers.

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

8 years ago[PGO] clang cc1 option change to enable IR level instrumentation
Rong Xu [Mon, 29 Feb 2016 18:54:59 +0000 (18:54 +0000)]
[PGO] clang cc1 option change to enable IR level instrumentation

This patch expands cc1 option -fprofile-instrument= with a new value: -fprofile-instrument=llvm
which enables IR level PGO instrumentation.

Reviewers: davidxl, silvas

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

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

8 years agoRevert "Implement new interfaces for code-formatting when applying replacements."
Manuel Klimek [Mon, 29 Feb 2016 16:44:16 +0000 (16:44 +0000)]
Revert "Implement new interfaces for code-formatting when applying replacements."

This reverts commit r262232.

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

8 years agoImplement new interfaces for code-formatting when applying replacements.
Manuel Klimek [Mon, 29 Feb 2016 16:27:41 +0000 (16:27 +0000)]
Implement new interfaces for code-formatting when applying replacements.

Patch by Eric Liu.

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

8 years agoAMDGPU: Add missing Volcanic Islands targets
Tom Stellard [Mon, 29 Feb 2016 15:08:56 +0000 (15:08 +0000)]
AMDGPU: Add missing Volcanic Islands targets

Reviewers: arsenm

Subscribers: cfe-commits

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

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

8 years agoclang-format: Don't format unrelated nested blocks.
Daniel Jasper [Mon, 29 Feb 2016 12:26:20 +0000 (12:26 +0000)]
clang-format: Don't format unrelated nested blocks.

With this change:

  SomeFunction(
      [] {
int i;
 return i;  // Format this line.
      },
      [] {
 return 2;  // Don't "fix" this.
      });

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

8 years ago[index] Print and test module import references.
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:56:07 +0000 (07:56 +0000)]
[index] Print and test module import references.

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

8 years ago[index] Add a caller relation for a call reference.
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:56:00 +0000 (07:56 +0000)]
[index] Add a caller relation for a call reference.

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

8 years ago[AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get called...
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:55:55 +0000 (07:55 +0000)]
[AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get called after the statement has been visited.

Fixes the indexing client of this.

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

8 years ago[index] Use ',' to separate symbol roles when printing.
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:55:51 +0000 (07:55 +0000)]
[index] Use ',' to separate symbol roles when printing.

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

8 years ago[X86] Disabling avx512f should also disable avx512vbmi and avx512ifma. Enabling avx51...
Craig Topper [Mon, 29 Feb 2016 06:51:38 +0000 (06:51 +0000)]
[X86] Disabling avx512f should also disable avx512vbmi and avx512ifma. Enabling avx512vbmi or avx512ifma should enable avx512f. Add command line switches and header defines for avx512ifma and avx512vbmi.

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

8 years ago[X86] Enabling xsave should not enable AVX. I seem to have done this, but I don't...
Craig Topper [Mon, 29 Feb 2016 06:51:34 +0000 (06:51 +0000)]
[X86] Enabling xsave should not enable AVX. I seem to have done this, but I don't know why.

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

8 years ago[OPENMP 4.5] Initial support for data members in 'reduction' clauses.
Alexey Bataev [Mon, 29 Feb 2016 05:54:20 +0000 (05:54 +0000)]
[OPENMP 4.5] Initial support for data members in 'reduction' clauses.

OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch adds initial parsing/semantic
analysis for data members support in 'reduction' clauses.

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

8 years ago[clang-cl] /EHc should not effect functions with explicit exception specifications
David Majnemer [Mon, 29 Feb 2016 01:40:36 +0000 (01:40 +0000)]
[clang-cl] /EHc should not effect functions with explicit exception specifications

Functions with an explicit exception specification have their behavior
dictated by the specification.  The additional /EHc behavior only comes
into play if no exception specification is given.

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

8 years ago[clang-cl] /EHc should not have an effect on /EHa
David Majnemer [Mon, 29 Feb 2016 01:40:30 +0000 (01:40 +0000)]
[clang-cl] /EHc should not have an effect on /EHa

This matches behavior with MSVC.

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

8 years ago[modules] Prefer more complete array types.
Vassil Vassilev [Sun, 28 Feb 2016 19:08:24 +0000 (19:08 +0000)]
[modules] Prefer more complete array types.

If we import a module that has a complete array type and one that has an
incomplete array type, the declaration found by name lookup might be the one with
the incomplete type, possibly resulting in rejects-valid.

Now, the name lookup prefers decls with a complete array types. Also,
diagnose cases when the redecl chain has array bound, different from the merge
candidate.

Reviewed by Richard Smith.

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

8 years agoAdd ARM EHABI-related constants to unwind.h.
Logan Chien [Sun, 28 Feb 2016 15:01:42 +0000 (15:01 +0000)]
Add ARM EHABI-related constants to unwind.h.

Adds a number of constants, defined in the ARM EHABI spec, to the Clang
lib/Headers/unwind.h header. This is prerequisite for landing
http://reviews.llvm.org/D15781, as previously discussed there.

Patch by Timon Van Overveldt.

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSLL{V|W|Wi}{128|256|512} builtin
Michael Zuckerman [Sun, 28 Feb 2016 07:39:34 +0000 (07:39 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSLL{V|W|Wi}{128|256|512} builtin

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

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

8 years agoWorkaround doxygen bug https://bugzilla.gnome.org/show_bug.cgi?id=506243
Alexander Kornienko [Sat, 27 Feb 2016 14:02:08 +0000 (14:02 +0000)]
Workaround doxygen bug https://bugzilla.gnome.org/show_bug.cgi?id=506243

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

8 years agoCorrecting indentation for an RST code block.
Aaron Ballman [Sat, 27 Feb 2016 13:13:16 +0000 (13:13 +0000)]
Correcting indentation for an RST code block.

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

8 years agoAMDGPU: Add builtins for recently added intrinsics
Matt Arsenault [Sat, 27 Feb 2016 09:54:43 +0000 (09:54 +0000)]
AMDGPU: Add builtins for recently added intrinsics

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

8 years agoAMDGPU: Fix broken/confusing predefined macro
Matt Arsenault [Sat, 27 Feb 2016 09:06:26 +0000 (09:06 +0000)]
AMDGPU: Fix broken/confusing predefined macro

amdgcn should not be defining __R600__

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

8 years agoAMDGPU: Fix inconsistent register name for flat_scratch
Matt Arsenault [Sat, 27 Feb 2016 09:06:22 +0000 (09:06 +0000)]
AMDGPU: Fix inconsistent register name for flat_scratch

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

8 years agoAdd __builtin_canonicalize
Matt Arsenault [Sat, 27 Feb 2016 09:06:18 +0000 (09:06 +0000)]
Add __builtin_canonicalize

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

8 years agoFix bug in using shadow decl checking: a using shadow decl should not conflict
Richard Smith [Sat, 27 Feb 2016 02:36:43 +0000 (02:36 +0000)]
Fix bug in using shadow decl checking: a using shadow decl should not conflict
with a prior UsingDecl -- those should not even really be found by the lookup
here, except that we use the same lookup results for two different checks, and
the other check needs them.

This happens to work in *almost all* cases, because either the lookup results
list the UsingDecl first (and the NonTag result gets replaced by something
else) or because the problematic declaration is a function (which causes us to
use different logic to detect conflicts). This can also be triggered from a
state only reachable through modules (where the name lookup results can contain
multiple UsingDecls in the same scope).

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

8 years ago[OpenMP] Fix parsing of delete map clause modifier in C++ mode.
Samuel Antao [Sat, 27 Feb 2016 00:01:58 +0000 (00:01 +0000)]
[OpenMP] Fix parsing of delete map clause modifier in C++ mode.

Summary: The map modifier 'delete' is parser in c++ mode as a delete keyword, which requires special handling in the map clause parsing.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: cfe-commits, fraggamuffin, caomhin

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

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

8 years ago[CMake] Only configure Native target in stage 1, configure all in other stages
Chris Bieneman [Fri, 26 Feb 2016 21:23:59 +0000 (21:23 +0000)]
[CMake] Only configure Native target in stage 1, configure all in other stages

This patch causes the 3-stage build pipeline to only build a host compiler in the first stage, and to build all targets for subsequent stages. The host target is determined via the Native target specifier added in r262070.

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

8 years ago[CMake] Add BINUTILS_INCDIR to the default passthrough list for multi-stage builds
Chris Bieneman [Fri, 26 Feb 2016 21:04:41 +0000 (21:04 +0000)]
[CMake] Add BINUTILS_INCDIR to the default passthrough list for multi-stage builds

This is needed to build the gold plugin in multi-stage builds.

Patch by Mike Edwards

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

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

8 years ago[dllexport] Sort out emission order of delayed exported classes
Reid Kleckner [Fri, 26 Feb 2016 19:51:02 +0000 (19:51 +0000)]
[dllexport] Sort out emission order of delayed exported classes

Relands r260194 with a fix. If we have a template that transitions from
an extern template to an explicitly instantiated dllexport template, we
would add that class to the delayed exported class list without flushing
it.

For explicit instantiations, we can just flush the list of delayed
classes immediately. We don't have to worry about the bug fixed in
r260194 in this case because explicit instantiations can only occur at
file and namespace scope.

Fixes PR26490.

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

8 years agoFix Clang tests that used CHECK-NEXT-NOT and CHECK-DAG-NOT.
Paul Robinson [Fri, 26 Feb 2016 19:34:01 +0000 (19:34 +0000)]
Fix Clang tests that used CHECK-NEXT-NOT and CHECK-DAG-NOT.
FileCheck actually doesn't support combo suffixes.

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

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

8 years agoSemaCXX: Support templates in availability attributes
Duncan P. N. Exon Smith [Fri, 26 Feb 2016 19:27:00 +0000 (19:27 +0000)]
SemaCXX: Support templates in availability attributes

If the availability context is `FunctionTemplateDecl`, we should look
through it to the `FunctionDecl`.  This prevents a diagnostic in the
following case:

    class C __attribute__((unavailable));
    template <class T> void foo(C&) __attribute__((unavailable));

This adds tests for availability in templates in many other cases, but
that was the only case that failed before this patch.

I added a feature `__has_feature(attribute_availability_in_templates)`
so users can test for this.

rdar://problem/24561029

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

8 years agoMinor tweak to match the overall style.
Sunil Srivastava [Fri, 26 Feb 2016 18:01:12 +0000 (18:01 +0000)]
Minor tweak to match the overall style.

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

8 years agoBasic: fix __USER_LABEL_PREFIX__ on Cygwin
Saleem Abdulrasool [Fri, 26 Feb 2016 16:34:01 +0000 (16:34 +0000)]
Basic: fix __USER_LABEL_PREFIX__ on Cygwin

Adjust the user label prefix for cygwin x86_64.

Resolves PR26744.

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

8 years agoReduce false positives in printf/scanf format checker
Andy Gibbs [Fri, 26 Feb 2016 15:35:16 +0000 (15:35 +0000)]
Reduce false positives in printf/scanf format checker

Summary:
The printf/scanf format checker is a little over-zealous in handling the conditional operator.  This patch reduces work by not checking code-paths that are never used and reduces false positives regarding uncovered arguments, for example in the code fragment:

printf(minimal ? "%i\n" : "%i: %s\n", code, msg);

Reviewers: rtrieu

Subscribers: cfe-commits

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

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

8 years agoFixing an issue with the code block so that it does not appear as a list.
Aaron Ballman [Fri, 26 Feb 2016 13:39:38 +0000 (13:39 +0000)]
Fixing an issue with the code block so that it does not appear as a list.

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

8 years agoGiving this attribute documentation group a heading; fixes a documentation generation...
Aaron Ballman [Fri, 26 Feb 2016 13:30:58 +0000 (13:30 +0000)]
Giving this attribute documentation group a heading; fixes a documentation generation error.

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

8 years agoTest commit.
Vassil Vassilev [Fri, 26 Feb 2016 10:43:34 +0000 (10:43 +0000)]
Test commit.

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

8 years ago[Driver] Disable frame pointer elimination by default if target is
Akira Hatanaka [Fri, 26 Feb 2016 05:07:00 +0000 (05:07 +0000)]
[Driver] Disable frame pointer elimination by default if target is
x86_64-pc-win32-macho.

rdar://problem/24470634

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

8 years ago[MSVC Compat] Don't evaluate member base expressions w/o side effects
David Majnemer [Fri, 26 Feb 2016 04:23:19 +0000 (04:23 +0000)]
[MSVC Compat] Don't evaluate member base expressions w/o side effects

A member expression's base doesn't always have an impact on what the
member decl would evaluate to.  In such a case, the base is used as a
poor man's scope qualifier.

This fixes PR26738.

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

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

8 years ago[analyzer] Prune some incorrect \param doc comment annotations.
Devin Coughlin [Fri, 26 Feb 2016 03:41:31 +0000 (03:41 +0000)]
[analyzer] Prune some incorrect \param doc comment annotations.

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

8 years agoCheckers/CheckObjCDealloc.cpp: Prune "\param". [-Wdocumentation]
NAKAMURA Takumi [Fri, 26 Feb 2016 03:15:13 +0000 (03:15 +0000)]
Checkers/CheckObjCDealloc.cpp: Prune "\param". [-Wdocumentation]

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

8 years agoOpenMPClause.h: Fix typo in \param. [-Wdocumentation]
NAKAMURA Takumi [Fri, 26 Feb 2016 03:15:09 +0000 (03:15 +0000)]
OpenMPClause.h: Fix typo in \param. [-Wdocumentation]

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

8 years ago[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr
Xiuli Pan [Fri, 26 Feb 2016 03:13:03 +0000 (03:13 +0000)]
[OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

Summary:
OpenCL access qualifiers are now not only used for image types, refine it to avoid misleading,

Add semacheck for OpenCL access qualifier as well as test caees.

Reviewers: pekka.jaaskelainen, Anastasia, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

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

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

8 years agoMake vtables_blacklist dependency conditional on existence of clang target.
Peter Collingbourne [Fri, 26 Feb 2016 03:07:33 +0000 (03:07 +0000)]
Make vtables_blacklist dependency conditional on existence of clang target.

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

8 years ago[analyzer] Shorten ObjcSuperDeallocChecker diagnostics.
Devin Coughlin [Fri, 26 Feb 2016 00:47:42 +0000 (00:47 +0000)]
[analyzer] Shorten ObjcSuperDeallocChecker diagnostics.

Change "use of 'self' after it has been freed with call to [super dealloc]" to
"use of 'self' after it has been deallocated" and "use of instance variable
'_ivar' after the instance has been freed with call to [super dealloc]" to
"use of instance variable '_ivar' after 'self' has been deallocated".

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

8 years ago[analyzer] Fix a memory error in r261935 caught by the Windows bots.
Devin Coughlin [Fri, 26 Feb 2016 00:23:41 +0000 (00:23 +0000)]
[analyzer] Fix a memory error in r261935 caught by the Windows bots.

It was using a temporary StringRef after its underlying storage was freed.

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

8 years ago[analyzer] Warn on use of 'self' after call to to [super dealloc].
Devin Coughlin [Thu, 25 Feb 2016 23:36:52 +0000 (23:36 +0000)]
[analyzer] Warn on use of 'self' after call to to [super dealloc].

Referring to 'self' after a call to [super dealloc] is a use-after-free in
Objective-C because NSObject's -dealloc frees the memory pointed to by self.
This patch extends the ObjCSuperDeallocChecker to catch this error.

rdar://problem/6953275

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

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

8 years ago[analyzer] Reapply r261917 with a fix.
Devin Coughlin [Thu, 25 Feb 2016 21:15:16 +0000 (21:15 +0000)]
[analyzer] Reapply r261917 with a fix.

This reapplies "[analyzer] Make ObjCDeallocChecker path sensitive." (r261917)
with a fix for an error on some bots about specializing a template
from another namespace.

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

8 years agoRevert "[analyzer] Make ObjCDeallocChecker path sensitive."
Devin Coughlin [Thu, 25 Feb 2016 19:13:43 +0000 (19:13 +0000)]
Revert "[analyzer] Make ObjCDeallocChecker path sensitive."

This reverts commit r261917. It broke the bots.

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

8 years ago[analyzer] Make ObjCDeallocChecker path sensitive.
Devin Coughlin [Thu, 25 Feb 2016 18:55:24 +0000 (18:55 +0000)]
[analyzer] Make ObjCDeallocChecker path sensitive.

Convert the ObjCDeallocChecker to be path sensitive. The primary
motivation for this change is to prevent false positives when -dealloc calls
helper invalidation methods to release instance variables, but it additionally
improves precision when -dealloc contains control flow. It also reduces the need
for pattern matching. The check for missing -dealloc methods remains AST-based.

Part of rdar://problem/6927496

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

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

8 years ago[CMake] Fixing install-clang-headers dependencies to depend on generating the headers.
Chris Bieneman [Thu, 25 Feb 2016 18:39:19 +0000 (18:39 +0000)]
[CMake] Fixing install-clang-headers dependencies to depend on generating the headers.

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

8 years agoAdd FieldNames to __NSConstantString_tag
Ben Langmuir [Thu, 25 Feb 2016 16:36:26 +0000 (16:36 +0000)]
Add FieldNames to __NSConstantString_tag

Since consumers of the AST may expect fields to be named.

Patch by Brad King!

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