Commit Graph

70101 Commits

Author SHA1 Message Date
Alexander Shaposhnikov 291d658e19 [analyzer] Fix modeling of constructors
This diff fixes analyzer's crash (triggered assert) on the newly added test case.
The assert being discussed is assert(!B.lookup(R, BindingKey::Direct))
in lib/StaticAnalyzer/Core/RegionStore.cpp, however the root cause is different.
For classes with empty bases the offsets might be tricky.
For example, let's assume we have
 struct S: NonEmptyBase, EmptyBase {
     ...
 };
In this case Clang applies empty base class optimization and 
the offset of EmptyBase will be 0, it can be verified via
clang -cc1 -x c++ -v -fdump-record-layouts main.cpp -emit-llvm -o /dev/null.
When the analyzer tries to perform zero initialization of EmptyBase
it will hit the assert because that region
has already been "written" by the constructor of NonEmptyBase.

Test plan:
make check-all

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

llvm-svn: 311182
2017-08-18 18:20:43 +00:00
Konstantin Zhuravlyov 0ebd9e18ef AMDGPU: Rename r600-mcpu.cl->amdgpu-mcpu.cl
llvm-svn: 311178
2017-08-18 17:29:07 +00:00
Johannes Altmanninger 849f20e4a2 [clang-diff] Add commandline arguments.
Summary:
Support command line options for build path and extra arguments
This emulates the options accepted by clang tools that use CommonOptionsParser.

Add a flag for controlling the maximum size parameter for bottom up matching.

Reviewers: arphaman

Subscribers: klimek

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

llvm-svn: 311173
2017-08-18 16:34:22 +00:00
Johannes Altmanninger fa524d7b24 [clang-diff] Fix some errors and inconsistencies
Fix to the computation of the rightmost descendant.

Prevents root nodes from being mapped if they are already mapped.  This
only makes a difference when we compare AST Nodes other than entire
translation units, a feature which still has to be tested.

Reviewers: arphaman

Subscribers: klimek

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

llvm-svn: 311172
2017-08-18 16:34:15 +00:00
Johannes Altmanninger 5d2fd55fd9 [CommonOptionsParser] Expose ArgumentsAdjustingCompilationDatabase
This is useful for tools such as clang-diff which do not use
CommonOptionsParser due to the need for multiple compilation databases.

llvm-svn: 311170
2017-08-18 16:21:08 +00:00
Konstantin Zhuravlyov a42719406f AMDGPU: add missing amdgcn processors and tests
- gfx600
  - gfx601
  - gfx703
  - gfx902
  - gfx903

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

llvm-svn: 311141
2017-08-18 01:13:39 +00:00
Tim Northover b6a826bdc7 Revert r311137 (GlobalISel ABI commit).
It was committed by mistake since it was in the same monorepo as the
LLVM change I was working on.

llvm-svn: 311140
2017-08-18 00:33:24 +00:00
Tim Northover 48fff995d6 GlobalISel (AArch64): fix ABI at border between GPRs and SP.
If a struct would end up half in GPRs and half on SP the ABI says it should
actually go entirely on the stack. We were getting this wrong in GlobalISel
before, causing compatibility issues.

llvm-svn: 311137
2017-08-17 23:14:01 +00:00
Richard Smith 7cd577bb0d PR34161: support evaluation of 'void()' expressions in C++14 onwards.
llvm-svn: 311115
2017-08-17 19:35:50 +00:00
Alex Lorenz 98f9fcdb1b Unguarded availability diagnoser should use TraverseStmt instead of
Base::TraverseStmt when visiting the then/else branches of if statements

This ensures that the statement stack is correctly tracked and correct
multi-statement fixit is generated inside of an if (@available)

llvm-svn: 311088
2017-08-17 14:22:27 +00:00
Alex Lorenz 36070ed8d2 Print enum constant values using the original source formatting
if possible when creating "Declaration" nodes in XML comments

rdar://14765746

llvm-svn: 311085
2017-08-17 13:41:55 +00:00
Daniel Jasper a7e061f07b Fix undefined behavior that is caused by not always initializing a bool.
The fix in r310994 is incomplete, as moveFromAndCancel can set the
pointer without initializing OldIsSpeculativelyEvaluating.

llvm-svn: 311070
2017-08-17 06:33:46 +00:00
John McCall 99e5e98eec Further refactoring of the constant emitter. NFC.
llvm-svn: 311065
2017-08-17 05:03:55 +00:00
Devin Coughlin a179e171dc [analyzer] Add support for reference counting of parameters on the callee side
This commit adds the functionality of performing reference counting on the
callee side for Integer Set Library (ISL) to Clang Static Analyzer's
RetainCountChecker.

Reference counting on the callee side can be extensively used to perform
debugging within a function (For example: Finding leaks on error paths).

Patch by Malhar Thakkar!

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

llvm-svn: 311063
2017-08-17 04:19:07 +00:00
Ben Langmuir fd6e39c40b [index] Add indexing for unresolved-using declarations
In dependent contexts we end up referencing these, so make sure they
have USRs, and have their declarations indexed. For the most part they
behave like typedefs, but we also need to worry about having multiple
using declarations with the same "name".

rdar://problem/33883650

llvm-svn: 311053
2017-08-16 23:12:21 +00:00
George Burgess IV 03d5db48fc Fix typos in comments; NFC
llvm-svn: 311051
2017-08-16 22:44:17 +00:00
Hal Finkel e85a818add Don't use -no-integrated-as in test/Driver/opt-record.c
-no-integrated-as is not supported on some targets (e.g.,
x86_64-pc-windows-msvc). Testing using -save-temps is good enough to cover the
relevant logic, and that should work everywhere.

llvm-svn: 311043
2017-08-16 21:51:31 +00:00
Hal Finkel 67814df3ea Base optimization-record file names on the final output
Using Output.getFilename() to construct the file name used for optimization
recording in Clang::ConstructJob, when -c is provided, does not work correctly
if we're not using the integrated assembler. With -no-integrated-as (or
-save-temps) Output.getFilename() gives the name of the temporary assembly
file, not the final output file. Instead, use the final output (as provided by
-o). If this is not available, then fall back to using a name based on the
input file.

Fixes PR31532.

llvm-svn: 311041
2017-08-16 21:34:27 +00:00
Taewook Oh 0fb5b78892 Use the file name from linemarker for debug info if an input is preprocessed source.
Summary:
Even in the case of the input file is a preprocessed source, clang uses the file name of the preprocesses source for debug info (DW_AT_name attribute for DW_TAG_compile_unit). However, gcc uses the file name specified in the first linemarker instead. This makes more sense because the one specified in the linemarker represents the "actual" source file name.

Clang already uses the file name specified in the first linemarker for Module name (https://github.com/llvm-mirror/clang/blob/master/lib/Frontend/FrontendAction.cpp#L779) if the input is preprocessed. This patch makes clang to use the same value for debug info as well.

Reviewers: compnerd, rnk, dblaikie, rsmith

Reviewed By: rnk

Subscribers: aprantl, cfe-commits

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

llvm-svn: 311037
2017-08-16 19:36:24 +00:00
Petr Hosek 766288b191 [Driver] SafeStack does not need a runtime library on Fuchsia
Patch by Roland McGrath

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

llvm-svn: 311034
2017-08-16 19:06:05 +00:00
Petr Hosek 1ed7135e65 [CMake] Build sanitized C++ runtimes for Fuchsia
Differential Revision: https://reviews.llvm.org/D36349

llvm-svn: 311033
2017-08-16 19:06:04 +00:00
Alexey Bataev 8c3edfef6b [OPENMP] Fix for PR28581: OpenMP linear clause - wrong results.
If worksharing construct has at least one linear item, an implicit
synchronization point must be emitted to avoid possible conflict with
the loading/storing values to the original variables. Added implicit
barrier if the linear item is found before actual start of the
worksharing construct.

llvm-svn: 311013
2017-08-16 15:58:46 +00:00
Alexey Bataev aee18557f7 [OPRNMP] Fix for PR33445: ICE: OpenMP target containing ordered for.
If exceptions are enabled, there may be a problem with the codegen of
the finalization functions from OpenMP runtime. It happens because of
the problem with the getting of thread identifier value. Patch tries to
fix it by using the result of the call of function
__kmpc_global_thread_num() rather than loading of value of outlined
function parameter.

llvm-svn: 311007
2017-08-16 14:01:00 +00:00
Chandler Carruth bacb80d0d9 Fix a UBSan failure where this boolean was copied when uninitialized.
When r310905 moved the pointer and bool out of a PointerIntPair, it made
them end up uninitialized and caused UBSan failures when copying the
uninitialized boolean. However, making the pointer be null should avoid
the reference to the boolean entirely.

llvm-svn: 310994
2017-08-16 07:22:49 +00:00
Yaxun Liu 0c6374e513 Fix comments about __OPENCL_MEMORY_SCOPE_* macros
llvm-svn: 310986
2017-08-16 04:15:28 +00:00
Richard Smith 96cd671cd6 PR19668, PR23034: Fix handling of move constructors and deleted copy
constructors when deciding whether classes should be passed indirectly.

This fixes ABI differences between Clang and GCC:

 * Previously, Clang ignored the move constructor when making this
   determination. It now takes the move constructor into account, per
   https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
   seem recent, but the ABI change was agreed on the Itanium C++ ABI
   list a long time ago).

 * Previously, Clang's behavior when the copy constructor was deleted
   was unstable -- depending on whether the lazy declaration of the
   copy constructor had been triggered, you might get different behavior.
   We now eagerly declare the copy constructor whenever its deletedness
   is unclear, and ignore deleted copy/move constructors when looking for
   a trivial such constructor.

This also fixes an ABI difference between Clang and MSVC:

 * If the copy constructor would be implicitly deleted (but has not been
   lazily declared yet), for instance because the class has an rvalue
   reference member, we would pass it directly. We now pass such a class
   indirectly, matching MSVC.

Based on a patch by Vassil Vassilev, which was based on a patch by Bernd
Schmidt, which was based on a patch by Reid Kleckner!

This is a re-commit of r310401, which was reverted in r310464 due to ARM
failures (which should now be fixed).

llvm-svn: 310983
2017-08-16 01:49:53 +00:00
Richard Smith c38d51f892 Add test that we get the correct calling convention and mangling for va_list.
llvm-svn: 310982
2017-08-16 01:46:46 +00:00
Richard Smith 55eb844259 Add missing test for warning added in r310803.
llvm-svn: 310978
2017-08-16 00:06:07 +00:00
Dan Albert 5671b890ea Revert "Revert "Revert "Fix LLVMgold plugin name/path for non-Linux."""
llvm-svn: 310977
2017-08-15 23:57:34 +00:00
Dan Albert 8afdd2f81e Revert "Add a target for new LTO plugin name tests."
llvm-svn: 310976
2017-08-15 23:57:32 +00:00
Richard Smith f26d551387 Do not look through pack expansions when looking for unexpanded parameter packs.
Fixes a selection of rejects-valids when pack-expanding a lambda that itself
contains a pack expansion.

llvm-svn: 310972
2017-08-15 22:58:45 +00:00
Dan Albert 255387650a Add a target for new LTO plugin name tests.
Not all targets will use -plugin with -flto. Pick a fixed target so
this works regardless of the default target (regardless of host OS,
the toolchain should be picking the correct LTO plugin for a target
that supports it).

llvm-svn: 310966
2017-08-15 22:10:44 +00:00
John McCall de0fe07eef Extract IRGen's constant-emitter into its own helper class and clean up
the interface.

The ultimate goal here is to make it easier to do some more interesting
things in constant emission, like emit constant initializers that have
ignorable side-effects, or doing the majority of an initialization
in-place and then patching up the last few things with calls.  But for
now this is mostly just a refactoring.

llvm-svn: 310964
2017-08-15 21:42:52 +00:00
John McCall f1ef796fd9 Allow the target field of a CK_ToUnion to be more easily recovered.
llvm-svn: 310963
2017-08-15 21:42:47 +00:00
John McCall 477b123ead Allow StmtVisitor visitation to be parameterized. NFC.
llvm-svn: 310962
2017-08-15 21:42:42 +00:00
Dan Albert fe9f1e60c5 Revert "Revert "Fix LLVMgold plugin name/path for non-Linux.""
Summary:
Relanding https://reviews.llvm.org/D35739 which was reverted because
it broke the tests on non-Linux. The tests have been fixed to be
platform agnostic, and additional tests have been added to make sure
that the plugin has the correct extension on each platform
(%pluginext doesn't work in CHECK lines).

Reviewers: srhines, pirama

Reviewed By: srhines

Subscribers: emaste, mehdi_amini, eraman, cfe-commits

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

llvm-svn: 310960
2017-08-15 21:31:17 +00:00
Stephen Hines 14ccaedbb8 Switch to consumeError(), since this can crash otherwise.
Summary:
If assertions are disabled, but LLVM_ABI_BREAKING_CHANGES is enabled,
this will cause an issue with an unchecked Success. Switching to
consumeError() is the correct way to bypass the check.

Reviewers: llvm-commits, cfe-commits, arphaman

Reviewed By: arphaman

Subscribers: arphaman, klimek, pirama

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

llvm-svn: 310958
2017-08-15 21:20:41 +00:00
Kuba Mracek cea6267cc6 Fixup for r310950: Also remove the new instance of %T from html-diags.c
llvm-svn: 310952
2017-08-15 19:54:04 +00:00
Kuba Mracek 5b57633a45 [clang] Get rid of "%T" expansions
The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t.

This patch removes %T in clang.

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

llvm-svn: 310950
2017-08-15 19:47:06 +00:00
Alexander Shaposhnikov ab0400d5af [clang] Code cleanup in clang/tooling
1. Add missing explicit for SymbolName constructor.
2. Add missing std::move in createRenameReplacements.

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

llvm-svn: 310948
2017-08-15 19:23:54 +00:00
Richard Smith 78a07ba438 PR33082: Improve tracking of unexpanded parameter packs within variadic generic lambdas.
llvm-svn: 310946
2017-08-15 19:11:21 +00:00
Yaxun Liu 504d4e2403 Attempt to fix failure in CodeGenOpenCL/atomic-ops.cl again
llvm-svn: 310937
2017-08-15 17:59:26 +00:00
Argyrios Kyrtzidis 478276271b [index] Update indexing to handle CXXDeductionGuideDecls properly
CXXDeductionGuideDecls can't be referenced so there's no need to output a symbol occurrence for them.
Also handle DeducedTemplateSpecializationTypeLocs in the TypeIndexer so we don't miss the symbol occurrences of the corresponding template decls.

Patch by Nathan Hawes!

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

llvm-svn: 310933
2017-08-15 17:20:37 +00:00
Yaxun Liu adcfe5d881 Attempt to fix failure in CodeGenOpenCL/atomic-ops.cl
llvm-svn: 310932
2017-08-15 17:16:44 +00:00
Yaxun Liu 99d56d291f Remove -finclude-default-header in OpenCL atomic tests
Differential Revision: https://reviews.llvm.org/D36676

llvm-svn: 310927
2017-08-15 16:30:31 +00:00
Yaxun Liu 30d652a447 [OpenCL] Support variable memory scope in atomic builtins
Differential Revision: https://reviews.llvm.org/D36580

llvm-svn: 310924
2017-08-15 16:02:49 +00:00
Alex Lorenz 0b1ce8b8e6 Allow pretty platform names in availability attributes
rdar://32076651

llvm-svn: 310921
2017-08-15 14:42:01 +00:00
Alexey Bataev 07ed94a7c7 [OPENMP] Fix compiler crash on argument translate for NVPTX.
When translating arguments for NVPTX target it is not taken into account
that function may have variable number of arguments. Patch fixes this
problem.

llvm-svn: 310920
2017-08-15 14:34:04 +00:00
Alex Lorenz 1e23dd6315 [Sema] Silence -Wobjc-missing-property-synthesis for unavailable properties
rdar://30296911

llvm-svn: 310916
2017-08-15 12:40:01 +00:00
Sven van Haastregt efb4d4c78c [OpenCL] Allow targets to select address space per type
Generalize getOpenCLImageAddrSpace into getOpenCLTypeAddrSpace, such
that targets can select the address space per type.

No functional changes intended.

Initial patch by Simon Perretta.

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

llvm-svn: 310911
2017-08-15 09:38:18 +00:00
Reid Kleckner fdb3df65b6 Avoid PointerIntPair of constexpr EvalInfo structs
They are stack allocated, so their alignment is not to be trusted.
32-bit MSVC only guarantees 4 byte stack alignment, even though alignof
would tell you otherwise. I tried fixing this with __declspec align, but
that apparently upsets GCC. Hopefully this version will satisfy all
compilers.

See PR32018 for some info about the mingw issues.

Should supercede https://reviews.llvm.org/D34873

llvm-svn: 310905
2017-08-15 01:17:47 +00:00
Dan Albert 1e29ee9d95 Revert "Fix LLVMgold plugin name/path for non-Linux."
Broke a test. Will fix the test and re-land later.

llvm-svn: 310903
2017-08-15 00:31:44 +00:00
Petr Hosek 3450d7e7f7 [CMake] Include LLVMFuzzer in Fuchsia toolchain
Differential Revision: https://reviews.llvm.org/D36541

llvm-svn: 310901
2017-08-15 00:22:00 +00:00
Dan Albert 25efd75df4 Fix LLVMgold plugin name/path for non-Linux.
Summary:
It's only named LLVMgold.so on Linux. Fix the name for Windows and
Darwin.

Also fix the path for Windows so binutils doesn't have to.

Reviewers: srhines, pirama

Reviewed By: srhines

Subscribers: cfe-commits

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

llvm-svn: 310895
2017-08-14 23:19:38 +00:00
Alexander Shaposhnikov 901d61561c [analyzer] Fix SimpleSValBuilder::simplifySVal
This diff fixes a crash (triggered assert) on the newly added test case.
In the method Simplifier::VisitSymbolData we check the type of S and return
Loc/NonLoc accordingly.

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

llvm-svn: 310887
2017-08-14 21:23:08 +00:00
Erik Pilkington 8b352c4d9d [Sema] Improve some -Wunguarded-availability diagnostics
rdar://33543523
Differential revision: https://reviews.llvm.org/D36200

llvm-svn: 310874
2017-08-14 19:49:12 +00:00
Alexey Bataev 0f87dbee4e [OPENMP] Fix for PR33922: New ident_t flags for
__kmpc_for_static_init().

OpenMP 5.0 will include OpenMP Tools interface that requires distinguishing different worksharing constructs.

Since the same entry point (__kmp_for_static_init(ident_t *loc,
kmp_int32 global_tid,........)) is called in case static
loop/sections/distribute it is suggested using 'flags' field of the
ident_t structure to pass the type of the construct.

llvm-svn: 310865
2017-08-14 17:56:13 +00:00
Alex Lorenz 44b94c7eb3 [rename] Introduce symbol occurrences
Symbol occurrences store the results of local rename and will also be used for
the global, indexed rename results. Their kind is used to determine whether they
should be renamed automatically or not. They can be converted to a set of
AtomicChanges as well.

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

llvm-svn: 310853
2017-08-14 16:19:24 +00:00
Martin Probst 325ff7c5e0 clang-format: [JS] wrap optional properties in type aliases.
Summary:
clang-format wraps object literal keys in an object literal if they are
marked as `TT_SelectorName`s and/or the colon is marked as
`TT_DictLiteral`. Previously, clang-format would accidentally work
because colons in type aliases were marked as `TT_DictLiteral`. r310367
fixed this to assing `TT_JsTypeColon`, which broke wrapping in certain
situations. However the root cause was that clang-format incorrectly
didn't skip questionmarks when detecting selector name.

This change fixes both locations to (1) assign `TT_SelectorName` and (2)
treat `TT_JsTypeColon` like `TT_DictLiteral`.

Previously:

    type X = {
      a: string, b?: string,
    };

Now:

    type X = {
      a: string,
      b?: string,
    };

Reviewers: djasper, sammccall

Subscribers: cfe-commits, klimek

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

llvm-svn: 310852
2017-08-14 16:09:08 +00:00
Martin Probst 83e0220b3f clang-format: [JS] do not insert whitespace in call positions.
Summary:
In JavaScript, may keywords can be used in method names and thus call sites:

    foo.delete();
    foo.instanceof();

clang-format would previously insert whitespace after the `instanceof`. This
change generically skips inserting whitespace between a keyword and a
parenthesis if preceded by a dot, i.e. in a callsite.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 310851
2017-08-14 16:08:16 +00:00
Alexey Bataev 6e01dc1b84 [OPENMP][DEBUG] Fix for PR33676: Debug info for OpenMP region is broken.
After some changes in clang/LLVM debug info for task-based regions was
not generated at all. Patch fixes this problem.

llvm-svn: 310850
2017-08-14 16:03:47 +00:00
Alexey Bataev 3c595a6b2c [OPENMP] Generalization of calls of the outlined functions.
General improvement of the outlined functions calls.

llvm-svn: 310840
2017-08-14 15:01:03 +00:00
Brian Gesiak 1333aaca97 [Parse] Fix typo in header docs (NFC)
Summary:
Fix typo "delcarations", added in rL310609 and rL310627.

llvm-svn: 310838
2017-08-14 14:29:11 +00:00
Aaron Ballman 2cf8df6251 Fixes a typo in a comment; NFC.
llvm-svn: 310837
2017-08-14 14:16:00 +00:00
Krasimir Georgiev 9b5a89b0e2 clang-format: Fix left pointer alignment after delctype/typeof
Change 272124* introduced a regression in spaceRequiredBetween for left aligned pointers to decltype and typeof expressions. This fix adds logic to fix this. The test added is based on a related test in determineStarAmpUsage. Also add test cases for the regression.

http://llvm.org/viewvc/llvm-project?view=revision&revision=272124
LLVM bug tracker: https://bugs.llvm.org/show_bug.cgi?id=30407

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

Fix contributed by euhlmann!

llvm-svn: 310831
2017-08-14 11:06:07 +00:00
Alex Lorenz b176693d99 Set the lexical context for dummy tag decl inside createTagFromNewDecl
This is a follow-up to r310706. This change has been recommended by
Bruno Cardoso Lopes and Richard Smith.

llvm-svn: 310829
2017-08-14 10:59:44 +00:00
Artem Dergachev a7c80a4c07 [analyzer] Rename functions responsible for CFG-based suppress-on-sink.
Update comments. No functional change intended.

Addresses Devin's post-commit review comments in https://reviews.llvm.org/D35673
and https://reviews.llvm.org/D35674.

llvm-svn: 310820
2017-08-14 08:38:47 +00:00
Jonas Hahnfeld 21b60edb05 Fix memory leak in ToolChain::TranslateOpenMPTargetArgs
rL310433 introduced a code path where DAL is not returned and must be freed.
This change allows to run openmp-offload.c when Clang is built with ASan.

llvm-svn: 310817
2017-08-14 07:44:05 +00:00
Richard Smith b115e5dda2 Rename cxx1z -> cxx17 across all diagnostic IDs.
llvm-svn: 310805
2017-08-13 23:37:29 +00:00
Richard Smith cbaaa295f0 Replace remaining user-visible mentions of C++1z with C++17.
llvm-svn: 310804
2017-08-13 22:26:53 +00:00
Richard Smith 6c74e32139 [c++2a] Treat 'concept' and 'requires' as keywords, add compat warning for C++17 and before.
llvm-svn: 310803
2017-08-13 21:32:33 +00:00
Martin Storsjo 31cac7a67c [AArch64] Add support for a MinGW AArch64 target
Differential Revision: https://reviews.llvm.org/D36364

llvm-svn: 310798
2017-08-13 19:42:17 +00:00
Sylvestre Ledru d23dd6c633 clang-format: add an option -verbose to list the files being processed
Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Tags: #clang

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

llvm-svn: 310778
2017-08-12 15:15:10 +00:00
Richard Smith 6c716116df PR34163: Don't cache an incorrect key function for a class if queried between
the class becoming complete and its inline methods being parsed.

This replaces the hack of using the "late parsed template" flag to track member
functions with bodies we've not parsed yet; instead we now use the "will have
body" flag, which carries the desired implication that the function declaration
*is* a definition, and that we've just not parsed its body yet.

llvm-svn: 310776
2017-08-12 01:46:03 +00:00
Bruno Cardoso Lopes 4164dd9167 Revert "[Modules] Prevent #import to reenter header if not building a module."
This reverts commit r310605. Richard pointed out a better way to achieve
this, which I'll post a patch for soon.

llvm-svn: 310775
2017-08-12 01:38:26 +00:00
Kostya Serebryany 3e78c4bddc Add a Dockerfile for clang-proto-fuzzer
Summary: Add a Dockerfile for clang-proto-fuzzer

Reviewers: morehouse, vitalybuka

Reviewed By: morehouse

Subscribers: hintonda, cfe-commits

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

llvm-svn: 310774
2017-08-12 01:27:10 +00:00
Alex Shlyapnikov a9f6a52925 Disabling openmp-offload.c on linux until it is stabilized on all local configurations.
Differential revision: https://reviews.llvm.org/D29660

llvm-svn: 310772
2017-08-11 23:10:39 +00:00
Gheorghe-Teodor Bercea 0499212ebf [OpenMP] Move failing flag tests to disabled GPU
offloading test file. This should prevent further errors
with the sanitizer.

Diff: D29660
llvm-svn: 310765
2017-08-11 21:17:50 +00:00
George Karpenkov 33613f63f6 Add -fsanitize=fuzzer-no-link flag to the driver.
The flag will perform instrumentation necessary to the fuzzing,
but will NOT link libLLVMFuzzer.a library.
Necessary when modifying CFLAGS for projects which may produce
executables as well as a fuzzable target.

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

llvm-svn: 310733
2017-08-11 17:22:58 +00:00
Gheorghe-Teodor Bercea 9c52574886 [OpenMP] Enable previously successful offloading tests.
Create a separate test file to contain all tests for OpenMP
offloading to GPUs.

Make libdevice checking more robust by accounting for
the case in which no libdevice is found.

This changes are in connrection with diff: D29660

llvm-svn: 310718
2017-08-11 15:46:22 +00:00
Simon Dardis 16bddf21cf [mips] Add missing mips-registered-target to mips test.
llvm-svn: 310715
2017-08-11 15:23:23 +00:00
Simon Dardis ad9d05de8f [mips] Support implicit gpopt with N64 when using -fno-pic
As clang defaults to -mno-abicalls when using -fno-pic for N64, implicitly use
-mgpopt in that case.

Reviewers: atanasyan

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

llvm-svn: 310714
2017-08-11 15:01:34 +00:00
Alex Lorenz 213d34330f [modules] Set the lexical DC for dummy tag decls that refer to hidden
declarations that are made visible after the dummy is parsed and ODR verified

Prior to this commit the
"(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."),"
assertion failure was triggered during semantic analysis of the dummy
tag declaration that was declared in another tag declaration because its
lexical context did not point to the outer tag decl.

rdar://32292196

llvm-svn: 310706
2017-08-11 12:06:52 +00:00
Stefan Maksimovic ac642ae7c0 Revert r302670 for the upcoming 5.0.0 release
This is causing failures when compiling clang with -O3
as one of the structures used by clang is passed by
value and uses the fastcc calling convention.

Faliures manifest for stage2 mips build.

llvm-svn: 310704
2017-08-11 11:39:07 +00:00
Stefan Maksimovic 76391b101d Revert r310057
Bring back changes which r304953 introduced since
they were in fact not the cause of failures described
in r310057 commit message.

llvm-svn: 310702
2017-08-11 11:03:54 +00:00
Yuka Takahashi 9b6b5d5a88 [Bash-autocompletion] Add --autocomplete flag to 5.0 release notes
Summary:
I thought we should add this information to release notes, because we
added a new flag to clang driver.

Reviewers: v.g.vassilev, teemperor, ruiu

Subscribers: cfe-commits

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

llvm-svn: 310700
2017-08-11 09:44:42 +00:00
Josh Gao 55afa7504f Revert "Thread Safety Analysis: warn on nonsensical attributes."
This reverts commit rL310403, which caused spurious warnings in libc++,
because it didn't properly handle templated scoped lockable types.

llvm-svn: 310698
2017-08-11 07:54:35 +00:00
Richard Smith 9d07ae77e7 Implement latest feature test macro recommendations, P0096R4.
llvm-svn: 310694
2017-08-11 03:39:40 +00:00
Richard Smith b9e5af2123 Update cxx_status to mention the upcoming Clang 5 release.
llvm-svn: 310693
2017-08-11 03:16:11 +00:00
Richard Smith f8c735c770 PR33850: Update cxx_dr_status for Clang 5 branch.
llvm-svn: 310692
2017-08-11 03:14:20 +00:00
Richard Smith 0887754110 PR33489: A function-style cast to a deduced class template specialization type is type-dependent if it can't be resolved due to a type-dependent argument.
llvm-svn: 310691
2017-08-11 02:04:19 +00:00
Akira Hatanaka 8d7bdf6dff [Sema][ObjC] Fix spurious -Wcast-qual warnings.
We do not meaningfully track object const-ness of Objective-C object
types. Silence the -Wcast-qual warning that is issued when casting to or
from Objective-C object types results in losing const qualification.

rdar://problem/33807915

llvm-svn: 310672
2017-08-11 00:06:49 +00:00
Craig Topper 699ae0c173 [X86] Implement __builtin_cpu_is
This patch adds support for __builtin_cpu_is. I've tried to match the strings supported to the latest version of gcc.

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

llvm-svn: 310657
2017-08-10 20:28:30 +00:00
Kamil Rytarowski 9fef3b3948 Enable bunch of sanitizers on NetBSD/X86 and X86_64
Summary:
Enable more sanitizers:
 - i386 and amd64:
 * SanitizerKind::Vptr;
 * SanitizerKind::Leak;
 * SanitizerKind::SafeStack;
 * SanitizerKind::Function;

 - amd64 only:
 * SanitizerKind::Thread;

These sanitizers are in the process of upstreaming to LLVM projects.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, dim, vitalybuka, kcc, filcab, fjricci

Reviewed By: vitalybuka

Subscribers: #sanitizers, cfe-commits

Tags: #sanitizers

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

llvm-svn: 310649
2017-08-10 18:53:52 +00:00
Alex Shlyapnikov 5f1ac1444b Disabling openmp-offload.c on linux until it is stabilized on all local configurations.
llvm-svn: 310640
2017-08-10 17:55:01 +00:00
Brian Gesiak 75023dbf51 [Parse] Document Parser::SkipFunctionBodies
Reviewers: erikjv, doug.gregor

Subscribers: cfe-commits

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

llvm-svn: 310627
2017-08-10 17:02:04 +00:00
Gheorghe-Teodor Bercea 14528c60ba [OpenMP] Delete tests in openmp-offload.c which cuase failures
until a better way to perform these tests is figured out.

Change connected to diff: D29654

llvm-svn: 310625
2017-08-10 16:56:59 +00:00
Bob Wilson 7a85cc52d7 Add a getName accessor for ModuleMacros.
Swift would like to be able to access the name of a ModuleMacro.
There was some discussion of this in
https://github.com/apple/swift-clang/pull/93, suggesting that it makes
sense to have this accessor in Clang.

llvm-svn: 310622
2017-08-10 16:42:46 +00:00
Ilya Biryukov b88de41636 Fixed a race condition in PrecompiledPreamble.
Summary:
Two PrecompiledPreambles, used in parallel on separate threads,
could be writing preamble to the same temporary file.

Reviewers: bkramer, krasimir, klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

llvm-svn: 310618
2017-08-10 16:10:40 +00:00
Momchil Velikov 57c681f33e Place implictly declared functions at block scope
Such implicitly declared functions behave as if the enclosing block
contained the declaration extern int name() (C90, 6.3.3.2 Function calls),
thus their names should have block scope (C90, 6.1.2.1 Scope of identifiers).

This patch fixes https://bugs.llvm.org/show_bug.cgi?id=33224

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

llvm-svn: 310616
2017-08-10 15:43:06 +00:00
Simon Atanasyan c717041e84 [mips] Group all `-mabicalls` related checks in the single place. NFC
llvm-svn: 310615
2017-08-10 15:42:31 +00:00
Simon Atanasyan c038841e8b [mips] Show warning in case of mixing -mlong-calls and -mabicalls options
While we do not support `-mshared / -mno-shared` properly, show warning
and ignore `-mlong-calls` option in case of implicitly or explicitly
provided `-mabicalls` option.

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

llvm-svn: 310614
2017-08-10 15:42:25 +00:00
Simon Atanasyan 3306e3a8e8 [mips] Notify user that `-mabicalls` is ignored on non-PIC N64 ABI
The -mabicalls option does not make sense in the case of non position
independent code for the N64 ABI. After this change the driver shows a
warning that -mabicalls is ignored in that case.

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

llvm-svn: 310613
2017-08-10 15:42:16 +00:00
Brian Gesiak a9d31f9199 [Parse] Document PrintStats, SkipFunctionBodies
Summary:
Add documentation for `clang::ParseAST` parameters `PrintStats` and
`SkipFunctionBodies`. Also, remove a tiny bit of trailing whitespace.

Reviewers: craig.topper, doug.gregor, erikjv

Subscribers: cfe-commits

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

llvm-svn: 310609
2017-08-10 15:30:35 +00:00
Bruno Cardoso Lopes fca5abc9d2 [Modules] Prevent #import to reenter header if not building a module.
When non-modular headers are imported while not building a module but
in -fmodules mode, be conservative and preserve the default #import
semantic: do not reenter headers.

rdar://problem/33745031

llvm-svn: 310605
2017-08-10 15:16:24 +00:00
Alexander Potapenko 5241081532 [sanitizer-coverage] Change cmp instrumentation to distinguish const operands
This implementation of SanitizerCoverage instrumentation inserts different
callbacks depending on constantness of operands:

  1. If both operands are non-const, then a usual
     __sanitizer_cov_trace_cmp[1248] call is inserted.
  2. If exactly one operand is const, then a
     __sanitizer_cov_trace_const_cmp[1248] call is inserted. The first
     argument of the call is always the constant one.
  3. If both operands are const, then no callback is inserted.

This separation comes useful in fuzzing when tasks like "find one operand
of the comparison in input arguments and replace it with the other one"
have to be done. The new instrumentation allows us to not waste time on
searching the constant operands in the input.

Patch by Victor Chibotaru.

llvm-svn: 310600
2017-08-10 15:00:13 +00:00
Nikolai Bozhenov 1f626cd2eb [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 1.
The original patch was an improvement to IR ValueTracking on non-negative
integers. It has been checked in to trunk (D18777, r284022). But was disabled by
default due to performance regressions.
Perf impact has improved. The patch would be enabled by default.
 
Reviewers: reames, hfinkel
 
Differential Revision: https://reviews.llvm.org/D34101
 
Patch by: Olga Chupina <olga.chupina@intel.com>

llvm-svn: 310582
2017-08-10 11:22:52 +00:00
Alex Lorenz 994f231792 Revert r310489 and follow-up commits r310505, r310519, r310537 and r310549
Commit r310489 caused 'openmp-offload.c' test failures on Darwin and other
platforms:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/39230/testReport/junit/Clang/Driver/openmp_offload_c/

The follow-up commits tried to fix the test, but the test is still failing.

llvm-svn: 310580
2017-08-10 10:34:46 +00:00
Alexander Kornienko cf007a7614 [Lexer] Finding beginning of token with escaped new line
Summary:
Lexer::GetBeginningOfToken produced invalid location when
backtracking across escaped new lines.

This fixes PR26228

Reviewers: akyrtzi, alexfh, rsmith, doug.gregor

Reviewed By: alexfh

Subscribers: alexfh, cfe-commits

Patch by Paweł Żukowski!

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

llvm-svn: 310576
2017-08-10 10:06:16 +00:00
Gheorghe-Teodor Bercea a659943306 [OpenMP] Provide a default GPU arch that is supported by
the underlying hardware.

This fixes a bug triggered by diff: D29660

llvm-svn: 310549
2017-08-10 05:01:42 +00:00
Petr Hosek 916a4672c1 [Driver] Search compiler-rt paths in -print-file-name=
This makes it possible to print the name of compiler-rt libraries
by using simply clang -print-file-name=libclang_rt.${runtime}-${arch}.so
same as other libraries, without having to know the details of the
resource directory organization.

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

llvm-svn: 310548
2017-08-10 04:16:38 +00:00
Jacob Bandes-Storch 58933c5d03 [clang-format] let PointerAlignment dictate spacing of function ref qualifiers
Summary: The original changes for ref qualifiers in rL272537 and rL272548 allowed function const+ref qualifier spacing to diverge from the spacing used for variables. It seems more consistent for `T const& x;` to match `void foo() const&;`.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 310544
2017-08-10 01:30:22 +00:00
Matt Arsenault 3cbb12c2ed Remove unused function
llvm-svn: 310540
2017-08-10 00:19:43 +00:00
Jacob Bandes-Storch d6a7e983e2 clang-format: Fix bug with ENAS_DontAlign and empty lines
This fixes a bug in `ENAS_DontAlign` (introduced in D32733) where blank lines had an EscapedNewlineColumn of 0, causing a subtraction to overflow when converted back to unsigned and leading to runaway memory allocation.

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

llvm-svn: 310539
2017-08-10 00:15:31 +00:00
Gheorghe-Teodor Bercea 57dbc55c88 [OpenMP] Remove offending test.
Diff: D29660
llvm-svn: 310537
2017-08-09 23:47:41 +00:00
Coby Tayree 7d442fc6d4 [X86][Asm] Allow negative immediate to appear before bracketed expression
Currently, only non-negative immediate is allowed prior to a brac expression (memory reference).
MASM / GAS does not have any problem cope with the left side of the real line, so we should be able to as well.

llvm: D36229

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

llvm-svn: 310529
2017-08-09 21:50:22 +00:00
Matt Arsenault 3fe7395fbc AMDGPU: Use direct struct returns and arguments
This is an improvement over always using byval for
structs.

This will use registers until ~16 are used, and then
switch back to byval. This needs more work, since I'm
not sure it ever really makes sense to use byval. If
the register limit is exceeded, the arguments still
end up passed on the stack, but with a different ABI.
It also may make sense to base this on number of
registers used for non-struct arguments, rather than
just arguments that appear first in the argument list.

llvm-svn: 310527
2017-08-09 21:44:58 +00:00
George Burgess IV b8709babd2 Use unsigned instead of an enum for map keys
ubsan's enum sanitizer doesn't like the latter, and we had to have
out-of-bounds values for DenseMapInfo's tombstone/empty keys.

llvm-svn: 310523
2017-08-09 21:20:41 +00:00
Gabor Horvath 0284a20fba [Sema] Assign new flag -Wenum-compare-switch to switch-related parts of -Wenum-compare
Patch by: Reka Nikolett Kovacs

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

llvm-svn: 310521
2017-08-09 20:56:43 +00:00
Gheorghe-Teodor Bercea 94ab42b49c [OpenMP] Fix failing test for D29660.
Non-functional change.

llvm-svn: 310519
2017-08-09 20:52:58 +00:00
Hans Wennborg 7d928cc596 Make -std=c++17 an alias of -std=c++1z
As suggested on PR33912.

Trying to keep this small to make it easy to merge to the 5.0 branch. We
can do a follow-up with more thorough renaming (diagnostic text,
options, ids, etc.) later.

(For C++14 this was done in r215982, and I think a smaller patch for the
3.5 branch:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140818/113013.html)

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

llvm-svn: 310516
2017-08-09 20:12:53 +00:00
Gheorghe-Teodor Bercea 690f6f9b9f [OpenMP] Enable executable lookup into driver directory.
Summary: Invoking the compiler inside a script causes the clang-offload-bundler executable to not be found. This patch enables the lookup for executables in the driver directory where the clang-offload-bundler resides.

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

Reviewed By: hfinkel

Subscribers: cfe-commits

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

llvm-svn: 310513
2017-08-09 19:52:28 +00:00
Alexey Bataev e754b18f5e [OPENMP] Emit non-debug version of outlined functions with original
name.

If the host code is compiled with the debug info, while the target
without, there is a problem that the compiler is unable to find the
debug wrapper. Patch fixes this problem by emitting special name for the
debug version of the code.

llvm-svn: 310511
2017-08-09 19:38:53 +00:00
David Blaikie 2385825aab PointerLikeTypeTraits: class->struct to match LLVM change
llvm-svn: 310508
2017-08-09 18:34:22 +00:00
Gheorghe-Teodor Bercea 9d652e9294 [OpenMP] Make the PTX version tests general enough to work on all toolchains.
Add explicit test for Darwin and PowerPC. Clean-up tests.

Non-functional change.

Original diff: D29660

llvm-svn: 310505
2017-08-09 18:25:52 +00:00
Gheorghe-Teodor Bercea 6b26dcb6d6 [OpenMP] Add flag for overwriting default PTX version for OpenMP targets
Summary:
This flag "--fopenmp-ptx=" enables the overwriting of the default PTX version used for GPU offloaded OpenMP target regions: "+ptx42".



Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar

Reviewed By: ABataev

Subscribers: rengolin, cfe-commits

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

llvm-svn: 310489
2017-08-09 15:56:54 +00:00
Gheorghe-Teodor Bercea 0846582878 [OpenMP] Add flag for disabling the default generation of relocatable OpenMP target code for NVIDIA GPUs.
Summary: Previously we have added the "-c" flag which gets passed to PTXAS by default to generate relocatable OpenMP target code by default. This set of flags exposes control over this behaviour.

Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar

Reviewed By: ABataev

Subscribers: Hahnfeld, rengolin, cfe-commits

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

llvm-svn: 310484
2017-08-09 15:27:39 +00:00
Erich Keane be89f4c565 Fix broken getAttributeSpellingListIndex for pragma attributes
We noticed when implementing a new pragma that the TableGen-generated function 
getAttributeSpellingListIndex() did not work for pragma attributes. It relies 
on the values in the enum AttributeList::Syntax and a new value 
AS_ContextSensitiveKeyword was added changing the value for AS_Pragma. 
Apparently no tests failed since no pragmas currently make use of the 
generated function.

To fix this we can move AS_Pragma back to the value that TableGen code expects. 
Also to prevent changes in the enum from breaking that routine again I added 
calls to getAttributeSpellingListIndex() in the unroll pragma code. That will 
cause some lit test failures if the order is changed. I added a comment to 
remind of this issue in the future.

This assumes we don’t need/want full TableGen support for 
AS_ContextSensitiveKeyword. It currently only appears in getAttrKind and no 
other TableGen-generated routines.

Patch by: mikerice

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

llvm-svn: 310483
2017-08-09 15:27:36 +00:00
Martin Probst 0a19d433c1 clang-format: [JS] detect ASI after closing parens.
Summary: A closing parenthesis followed by a declaration or statement should always terminate the current statement.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 310482
2017-08-09 15:19:16 +00:00
Gheorghe-Teodor Bercea b9d117233f [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default
Original Diff: D29642

This patch was previously reverted due to an error with patch D29654
that this depends on.

llvm-svn: 310479
2017-08-09 14:59:35 +00:00
Tim Northover 9710338a56 Reapply Sema: allow imaginary constants via GNU extension if UDL overloads not present.
C++14 added user-defined literal support for complex numbers so that you
can write something like "complex<double> val = 2i". However, there is
an existing GNU extension supporting this syntax and interpreting the
result as a _Complex type.

This changes parsing so that such literals are interpreted in terms of
C++14's operators if an overload is present but otherwise falls back to
the original GNU extension.

(We now have more robust diagnostics for implicit conversions so the
libc++ test that caused the original revert still passes).

llvm-svn: 310478
2017-08-09 14:56:48 +00:00
Joey Gouly 922ca2345d [OpenCL] Minor refactoring to reduce copy/pasted code
Set the type of TheCall inside SemaBuiltinReserveRWPipe to reduce
duplicated code.

llvm-svn: 310477
2017-08-09 14:52:47 +00:00
Coby Tayree 69eb696112 [X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class pointers aliases
MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef.
This patch enhance its implementation with this behavior.

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

llvm-svn: 310472
2017-08-09 13:31:41 +00:00
Gabor Horvath b57e264257 [Sema] -Wenum-compare no longer warn on anonymous enums in switch statements
Patch by: Reka Nikolett Kovacs

llvm-svn: 310468
2017-08-09 12:34:58 +00:00
Diana Picus 0c9f193acc Revert "PR19668, PR23034: Fix handling of move constructors and deleted copy constructors when deciding whether classes should be passed indirectly."
This reverts commit r310401 because it seems to have broken some ARM
bot(s).

llvm-svn: 310464
2017-08-09 12:22:25 +00:00
Krasimir Georgiev 3b86534a63 [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment pragmas
Summary:
This handles a case where the trailing '*/' of a multiline jsdoc eding in a
comment pragma wouldn't be put on a new line.

Reviewers: mprobst

Reviewed By: mprobst

Subscribers: cfe-commits, klimek

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

llvm-svn: 310458
2017-08-09 09:42:32 +00:00
Gabor Horvath 64c3241154 [Sema] Extend -Wenum-compare to handle mixed enum comparisons in switch statements
Patch by: Reka Nikolett Kovacs

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

llvm-svn: 310449
2017-08-09 08:57:09 +00:00
George Burgess IV 2fd1ff81b4 Attempt #2 to appease buildbots
"error: unable to create target: 'No available targets are compatible
with this triple.'"

llvm-svn: 310445
2017-08-09 06:07:08 +00:00
George Burgess IV 8b928feeb4 Attempt to appease msc buildbot
It was timing out on this test, but for reasons unrelated to the
specific bug it was testing for. Randomly breaking in gdb with `clang
-target i686-windows -fmsc-version=1700` reveals *many* frames from
MicrosoftCXXNameMangler. So, it would seem that some caching is needed
there, as well...

Fingers crossed that specifying a triple is sufficient to work around
this.

llvm-svn: 310444
2017-08-09 05:20:05 +00:00
Vitaly Buka f0ada558ce [clang-fuzzer] Resolve proto dependencies
llvm-svn: 310441
2017-08-09 04:45:00 +00:00
George Burgess IV 35cb4f84a4 [AST] Cache intermediate visibility/linkage results
This is a follow-up to r310436 with actual functional changes. Please
see that commit message for a description of why a cache is appearing
here.

Suggestions for less-bad ways of testing this are appreciated. :)

This fixes PR29160.

llvm-svn: 310437
2017-08-09 04:12:17 +00:00
George Burgess IV 99db3ea690 [AST] Move visibility computations into a class; NFC
This is patch 1 in a 2 patch series that aims to fix PR29160. Its goal
is to cache decl visibility/linkage for the duration of each
visibility+linkage query.

The simplest way I can see to do this is to put the visibility
calculation code that needs to (transitively) access this cache into a
class, which is what this patch does. Actual caching will come in patch
2. (Another way would be to keep the cache in ASTContext + manually
invalidate it or something, but that felt way too subtle to me.)

Caching visibility results across multiple queries seems a bit tricky,
since the user can add visibility attributes ~whenever they want, and
these attributes can apparently have far-reaching effects (e.g. class
visibility extends to its members, ...). Because a cache that's dropped
at the end of each top-level query seems to work nearly as well and
doesn't require any eviction logic, I opted for that design.

llvm-svn: 310436
2017-08-09 04:02:49 +00:00
Richard Trieu c06b35c97e Allow operator delete to be an invalid Decl.
Do not discard invalid Decl when searching for the operator delete function.
The lookup for this function always expects to find a result, so sometimes the
invalid Decl is the only choice possible.  This fixes PR34109.

llvm-svn: 310435
2017-08-09 02:03:59 +00:00
Gheorghe-Teodor Bercea 5289843597 [OpenMP] Fix bug regarding cubin integration into host binary
when a BindArchAction is used.

This is not a functional change.

Original Diff: D29654

llvm-svn: 310433
2017-08-09 01:02:19 +00:00
Tim Northover 0241637c0e Sema: disable implicit conversion from _Complex to real types in C++.
Converting a _Complex type to a real one simply discards the imaginary part.
This can easily lead to loss of information so for safety (and GCC
compatibility) this patch disallows that when the conversion would be implicit.

The one exception is bool, which actually compares both real and imaginary
parts and so is safe.

llvm-svn: 310427
2017-08-08 23:18:05 +00:00
Tim Northover d1fafc8b05 Revert "Lexer: always allow imaginary constants in GNU mode."
This reverts r310423. It was committed by mistake, I intended to commit the
improved diagnostics for implicit conversions instead.

llvm-svn: 310426
2017-08-08 23:17:51 +00:00
Tim Northover 8fbb4c40b3 Lexer: always allow imaginary constants in GNU mode.
llvm-svn: 310423
2017-08-08 22:03:54 +00:00
Simon Atanasyan a92a842326 [mips] Enable `long_call/short_call` attributes on MIPS64
This change enables `long_call/short_call/far/near` attributes on
MIPS64 targets.

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

llvm-svn: 310418
2017-08-08 21:17:33 +00:00
Reid Kleckner e2e82061f9 [codeview] Emit nested enums and typedefs from classes
Previously we limited ourselves to only emitting nested classes, but we
need other kinds of types as well.

This fixes the Visual Studio STL visualizers, so that users can
visualize std::string and other objects.

llvm-svn: 310410
2017-08-08 20:30:14 +00:00
Kostya Serebryany 9f338dcd4f [sanitizer-coverage] -fsanitize-coverage=bb,inline-8bit-counters
llvm-svn: 310409
2017-08-08 20:20:40 +00:00
Matt Morehouse f051f5d1e6 Integrate Kostya's clang-proto-fuzzer with LLVM.
Summary:
The clang-proto-fuzzer models a subset of C++ as a protobuf and
uses libprotobuf-mutator to generate interesting mutations of C++
programs.  Clang-proto-fuzzer has already found several bugs in
Clang (e.g., https://bugs.llvm.org/show_bug.cgi?id=33747,
https://bugs.llvm.org/show_bug.cgi?id=33749).

As with clang-fuzzer, clang-proto-fuzzer requires the following
cmake flags:
- CMAKE_C_COMPILER=clang
- CMAKE_CXX_COMPILER=clang++
- LLVM_USE_SANITIZE_COVERAGE=YES  // needed for libFuzzer
- LLVM_USE_SANITIZER=Address  // needed for libFuzzer

In addition, clang-proto-fuzzer requires:
- CLANG_ENABLE_PROTO_FUZZER=ON

clang-proto-fuzzer also requires the following dependencies:
- binutils  // needed for libprotobuf-mutator
- liblzma-dev  // needed for libprotobuf-mutator
- libz-dev  // needed for libprotobuf-mutator
- docbook2x  // needed for libprotobuf-mutator
- Recent version of protobuf [3.3.0 is known to work]

A working version of libprotobuf-mutator will automatically be
downloaded and built as an external project.

Implementation of clang-proto-fuzzer provided by Kostya
Serebryany.

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

Reviewers: kcc, vitalybuka, bogner

Reviewed By: kcc, vitalybuka

Subscribers: thakis, mgorny, cfe-commits

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

llvm-svn: 310408
2017-08-08 20:15:04 +00:00
Eli Friedman 181dfe4c92 [coverage] Special-case calls to noreturn functions.
The code after a noreturn call doesn't execute.

The pattern in the testcase is pretty common in LLVM (a switch with
a default case that calls llvm_unreachable).

The original version of this patch was reverted in r309995 due to a
crash. This version includes a fix for that crash (testcase in 
test/CoverageMapping/md.cpp).

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

llvm-svn: 310406
2017-08-08 20:10:14 +00:00
Josh Gao b40c177095 Thread Safety Analysis: warn on nonsensical attributes.
Add warnings in cases where an implicit `this` argument is expected to
attributes because either `this` doesn't exist because the attribute is
on a free function, or because `this` is on a type that doesn't have a
corresponding capability/lockable/scoped_lockable attribute.

Reviewers: delesley, aaron.ballman

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

llvm-svn: 310403
2017-08-08 19:44:35 +00:00
Josh Gao ec1369ed6e Reland "Thread Safety Analysis: fix assert_capability."
Delete the test that was broken by rL309725, and add it back in a
follow up commit. Also, improve the tests a bit.

Reviewers: delesley, aaron.ballman

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

llvm-svn: 310402
2017-08-08 19:44:34 +00:00
Richard Smith f1a425edb7 PR19668, PR23034: Fix handling of move constructors and deleted copy
constructors when deciding whether classes should be passed indirectly.

This fixes ABI differences between Clang and GCC:

 * Previously, Clang ignored the move constructor when making this
   determination. It now takes the move constructor into account, per
   https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
   seem recent, but the ABI change was agreed on the Itanium C++ ABI
   list a long time ago).

 * Previously, Clang's behavior when the copy constructor was deleted
   was unstable -- depending on whether the lazy declaration of the
   copy constructor had been triggered, you might get different behavior.
   We now eagerly declare the copy constructor whenever its deletedness
   is unclear, and ignore deleted copy/move constructors when looking for
   a trivial such constructor.

This also fixes an ABI difference between Clang and MSVC:

 * If the copy constructor would be implicitly deleted (but has not been
   lazily declared yet), for instance because the class has an rvalue
   reference member, we would pass it directly. We now pass such a class
   indirectly, matching MSVC.

llvm-svn: 310401
2017-08-08 19:12:28 +00:00
Aaron Ballman b6fd726f9c Restore previous structure ABI behavior for bit-fields with the packed attribute for PS4 targets.
An ABI change was introduced in r254596 that modified structure layouts when the 'packed' attribute was used on one-byte bitfields. Since the PS4 target needs to maintain backwards compatibility for all structure layouts, this change reintroduces the old behavior for PS4 targets only. It also introduces PS4 specific cases to the relevant test.

Patch by Matthew Voss.

llvm-svn: 310388
2017-08-08 18:07:17 +00:00
Alexey Bataev 3b8d5586ec [OPENMP][DEBUG] Set proper address space info if required by target.
Arguments, passed to the outlined function, must have correct address
space info for proper Debug info support. Patch sets global address
space for arguments that are mapped and passed by reference.

Also, cuda-gdb does not handle reference types correctly, so reference
arguments are represented as pointers.

llvm-svn: 310387
2017-08-08 18:04:06 +00:00
Craig Topper 41a550ccfa [X86] Support 'avx5124vnniw' and 'avx5124fmaps' for __builtin_cpu_supports.
They still need to be implemented in the intrinsics, the command line, and the backend. But this change isn't dependent on any of that and resolves a TODO.

llvm-svn: 310386
2017-08-08 17:43:44 +00:00
Erik Pilkington 1b00372fad [Availability] Don't make an availability attribute imply default visibility on macOS
Fixes PR33796, rdar://33655115

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

llvm-svn: 310382
2017-08-08 17:09:09 +00:00
Alexey Bataev 4aa19052f3 Revert "[OPENMP][DEBUG] Set proper address space info if required by target."
This reverts commit r310377.

llvm-svn: 310379
2017-08-08 16:45:36 +00:00
Alexey Bataev 5a497136be [OPENMP][DEBUG] Set proper address space info if required by target.
Arguments, passed to the outlined function, must have correct address
space info for proper Debug info support. Patch sets global address
space for arguments that are mapped and passed by reference.

Also, cuda-gdb does not handle reference types correctly, so reference
arguments are represented as pointers.

llvm-svn: 310377
2017-08-08 16:29:11 +00:00
Nico Weber 2db47198dd Use "foo-12345.o.tmp" instead of "foo.o-12345" as temporary file name.
This helps some tools that do things based on the output's extension.

For example, we got reports from users on Windows that have a tool that scan a
build output dir (but skip .obj files). The tool would keep the "foo.obj-12345"
file open, and then when clang tried to rename the temp file to the final
output filename, that would fail. By making the tempfile end in ".obj.tmp",
tools like this could now have a rule to ignore .tmp files.
This is a less ambitious reland of https://reviews.llvm.org/D36238

https://reviews.llvm.org/D36413

llvm-svn: 310376
2017-08-08 16:21:23 +00:00
Gheorghe-Teodor Bercea ee914104d9 Non-functional change. Fix test for D29654.
llvm-svn: 310368
2017-08-08 15:13:07 +00:00
Martin Probst 0fb46bb222 clang-format: [JS] fix union type spacing in object & array types.
Summary:
Previously, clang-format would insert whitespace in union types nested in object
and array types, as it wouldn't recognize those as a type operator:

    const x: {foo: number | null};
    const x: [number | null];

While this is correct for actual binary operators, clang-format should not
insert whitespace into union and intersection types to mark those:

    const x: {foo: number|null};
    const x: [number|null];

This change propagates that the context is not an expression by inspecting
the preceding token and marking as non-expression if it was a type colon.

Reviewers: djasper

Subscribers: klimek

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

llvm-svn: 310367
2017-08-08 15:00:58 +00:00
Martin Probst 64d31edef3 clang-format: [JS] handle single lines comments ending in `\\`.
Summary:
Previously, clang-format would consider the following code line to be part of
the comment and incorrectly format the rest of the file.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 310365
2017-08-08 14:52:42 +00:00
Alexey Bataev 6a824b9a45 Revert "[OPENMP][DEBUG] Set proper address space info if required by target."
This reverts commit r310360.

llvm-svn: 310364
2017-08-08 14:44:43 +00:00
Gheorghe-Teodor Bercea 2c92693280 [OpenMP] OpenMP device offloading code generation produces a cubin file which is then integrated in the host binary using the host linker.
Diff: D29654

llvm-svn: 310362
2017-08-08 14:33:05 +00:00
Alexey Bataev 59b81e51d3 [OPENMP][DEBUG] Set proper address space info if required by target.
Arguments, passed to the outlined function, must have correct address
space info for proper Debug info support. Patch sets global address
space for arguments that are mapped and passed by reference.

Also, cuda-gdb does not handle reference types correctly, so reference
arguments are represented as pointers.

llvm-svn: 310360
2017-08-08 14:25:14 +00:00
Nikolai Bozhenov ce25d41b67 [libclang] Fix PR34055 (incompatible update of clang-c/Index.h)
Fixes a regression introduced by r308218.

llvm-svn: 310359
2017-08-08 14:13:50 +00:00
Alex Lorenz 4003a98eec Darwin's toolchain should be initialized before openmp offloading
is processed

This fixes an 'openmp-offload.c' test failure introduced by r310263.

llvm-svn: 310347
2017-08-08 11:22:21 +00:00
Alex Lorenz 7e9c478cda Revert r310291, r310300 and r310332 because of test failure on Darwin
The commit r310291 introduced the failure. r310332 was a test fix commit and
r310300 was a followup commit. I reverted these two to avoid merge conflicts
when reverting.

The 'openmp-offload.c' test is failing on Darwin because the following
run lines:
// RUN:   touch %t1.o
// RUN:   touch %t2.o
// RUN:   %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes %t1.o %t2.o 2>&1 \
// RUN:   | FileCheck -check-prefix=CHK-TWOCUBIN %s

trigger the following assertion:

Driver.cpp:3418:
    assert(CachedResults.find(ActionTC) != CachedResults.end() &&
           "Result does not exist??");

llvm-svn: 310345
2017-08-08 11:20:17 +00:00
Reid Kleckner 908ac3916d Fix openmp-offload.c test on Windows
llvm-svn: 310332
2017-08-08 01:36:16 +00:00
Reid Kleckner 59d1220cfd [codeview] Fix class name formatting
In particular, removes spaces between template arguments of class
templates to better match VS type visualizers.

llvm-svn: 310331
2017-08-08 01:33:53 +00:00
Sean Callanan 2b3a54bafc This adds the argument --dump-ir to clang-import-test, which allows
viewing of the final IR. This is useful for confirming that 
structure layout was correct.

I've added two tests:

- A test that checks that structs in top-level code are completed 
  correctly during struct layout (they are)
- A test that checks that structs defined in function bodies are 
  cpmpleted correctly during struct layout (currently they are not, 
  so this is XFAIL).

The second test fails because LookupSameContext()
(ExternalASTMerger.cpp) can't find the struct. This is an issue I 
intend to resolve separately.

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

llvm-svn: 310318
2017-08-07 22:27:30 +00:00
Gheorghe-Teodor Bercea ef5e106fc1 [OpenMP] Error when trying to offload to an unsupported architecture
Summary: Throw an error when offloading is unsupported for a particular target architecture.

Reviewers: sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld

Reviewed By: ABataev

Subscribers: cfe-commits, rengolin

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

llvm-svn: 310307
2017-08-07 21:11:10 +00:00
Gheorghe-Teodor Bercea e3b0a19d4f [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.
Summary: For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted.

Reviewers: arpith-jacob, sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld, hfinkel, tstellar

Reviewed By: ABataev, Hahnfeld

Subscribers: rengolin, Hahnfeld, cfe-commits

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

llvm-svn: 310306
2017-08-07 20:57:59 +00:00
Martin Storsjo c85d26b0f3 [AArch64] Ignore stdcall and similar on aarch64/windows
This is similar to what's done on arm and x86_64, where
these calling conventions are silently ignored, as in
SVN r245076.

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

llvm-svn: 310303
2017-08-07 20:52:04 +00:00
Gheorghe-Teodor Bercea ceb422236a [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default
Summary: When device offloading is enabled and the device is an NVIDIA GPU, OpenMP target regions must be compiled with relocation enabled by passing the "-c" flag to the PTXAS invocation.

Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar

Reviewed By: Hahnfeld

Subscribers: Hahnfeld, rengolin, mkuron, cfe-commits

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

llvm-svn: 310300
2017-08-07 20:31:51 +00:00
George Burgess IV bc30b699b7 Mark static variables static; NFC.
llvm-svn: 310299
2017-08-07 20:26:33 +00:00
Gheorghe-Teodor Bercea 53431bc046 [OpenMP] Pass -v to PTXAS if it was passed to the driver.
Summary: When compiling code being offloaded by OpenMP to an NVIDIA GPU, pass the -v to PTXAS if it was passed to the CLANG driver.

Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, jlebar, hfinkel, tstellar

Reviewed By: jlebar

Subscribers: Hahnfeld, rengolin, cfe-commits

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

llvm-svn: 310295
2017-08-07 20:19:23 +00:00
Gheorghe-Teodor Bercea 4cdba82ee0 [OpenMP] Integrate OpenMP target region cubin into host binary
Summary: OpenMP device offloading code generation produces a cubin file which is then integrated in the host binary using the host linker.

Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, rnk, hfinkel, tstellar

Reviewed By: hfinkel

Subscribers: sfantao, rnk, rengolin, cfe-commits

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

llvm-svn: 310291
2017-08-07 20:01:48 +00:00
Gheorghe-Teodor Bercea bcfdd7861e Non-functional change. Fix previous patch D34784.
llvm-svn: 310282
2017-08-07 18:43:37 +00:00
Benjamin Kramer 4504fe2449 Add some missing -no-canonical-prefixes.
llvm-svn: 310278
2017-08-07 18:31:01 +00:00
Gheorghe-Teodor Bercea 47e0cf378c [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading
Summary:
OpenMP has the ability to offload target regions to devices which may have different architectures.

A new -fopenmp-target-arch flag is introduced to specify the device architecture.

In this patch I use the new flag to specify the compute capability of the underlying NVIDIA architecture for the OpenMP offloading CUDA tool chain.

Only a host-offloading test is provided since full device offloading capability will only be available when [[ https://reviews.llvm.org/D29654 | D29654 ]] lands.

Reviewers: hfinkel, Hahnfeld, carlo.bertolli, caomhin, ABataev

Reviewed By: hfinkel

Subscribers: guansong, cfe-commits

Tags: #openmp

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

llvm-svn: 310263
2017-08-07 15:39:11 +00:00
Kamil Rytarowski 9d1f5dc37b Enable LLVM asan support for NetBSD/i386
Summary:
Verified to work and useful to run check-asan, as this target tests 32-bit and 64-bit execution.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, filcab, dim, vitalybuka

Reviewed By: vitalybuka

Subscribers: #sanitizers, cfe-commits

Tags: #sanitizers

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

llvm-svn: 310245
2017-08-07 10:57:03 +00:00
Martin Storsjo ba4431e842 [test] Remove an unintentional -x cl flag in an aarch64-windows test
This test was only intended to test compiling C, not OpenCL.

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

llvm-svn: 310222
2017-08-06 19:57:49 +00:00
Craig Topper 9d8e9ff620 [X86] Enable isel to use the PAUSE instruction even when SSE2 is disabled. Clang part
Summary:
On older processors this instruction encoding is treated as a NOP.

MSVC doesn't disable intrinsics based on features the way clang/gcc does. Because the PAUSE instruction encoding doesn't crash older processors, some software out there uses these intrinsics without checking for SSE2.

This change also seems to also be consistent with gcc behavior.

Fixes PR34079

Reviewers: RKSimon, zvi

Reviewed By: RKSimon

Subscribers: cfe-commits

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

llvm-svn: 310191
2017-08-05 23:35:54 +00:00
Yaxun Liu a3c3d7b442 [OpenCL] Remove extra select functions from opencl-c.h
OpenCL spec v2.0 s6.13.6:

gentype select (gentype a,
gentype b,
igentype c)

gentype select (gentype a,
gentype b,
ugentype c)

igentype and ugentype must have the same number
of elements and bits as gentype.

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

llvm-svn: 310160
2017-08-05 02:23:47 +00:00
Richard Trieu 5fb82efebf [ODRHash] Treat some non-templated classes as templated.
When using nested classes, if the inner class is not templated, but the outer
class is templated, the inner class will not be templated, but may have some
traits as if it were.  This is particularly evident if the inner class
refers to the outer class in some fashion.  Treat any class that is in the
context of a templated class as also a templated class.

llvm-svn: 310158
2017-08-05 00:54:19 +00:00
Vedant Kumar a7764adcbb Revert "[Coverage] Precise region termination with deferred regions"
This reverts commit r310010. I don't think there's anything wrong with
this commit, but it's causing clang to generate output that llvm-cov
doesn't do a good job with and the fix isn't immediately clear.

See Eli's comment in D36250 for more context.

I'm reverting the clang change so the coverage bot can revert back to
producing sensible output, and to give myself some time to investigate
what went wrong in llvm.

llvm-svn: 310154
2017-08-05 00:34:10 +00:00
Adrian Prantl b442302131 Debug Info: Set the DICompileUnit's isOptimized flag when compiling with LTO.
rdar://problem/27640939

llvm-svn: 310147
2017-08-04 23:08:57 +00:00
Reid Kleckner 2d3c421f1c Clean up some lambda conversion operator code, NFC
We don't need special handling in CodeGenFunction::GenerateCode for
lambda block pointer conversion operators anymore. The conversion
operator emission code immediately calls back to the generic
EmitFunctionBody.

Rename EmitLambdaStaticInvokeFunction to EmitLambdaStaticInvokeBody for
better consistency with the other Emit*Body methods.

I'm preparing to do something about PR28299, which touches this code.

llvm-svn: 310145
2017-08-04 22:38:06 +00:00
Reid Kleckner e6cde14416 [libclang] Determinize order of platform availability attrs
Previously this code was doing std::sort on IdentifierInfo pointers. Now
it sorts alphabetically by platform name.

This should de-flake clang/test/Index/availability.c, which was failing
non-deterministically for me.

llvm-svn: 310138
2017-08-04 21:52:25 +00:00
Reid Kleckner cefb333582 [Support] Use FILE_SHARE_DELETE to fix RemoveFileOnSignal on Windows
Summary:
Tools like clang that use RemoveFileOnSignal on their output files
weren't actually able to clean up their outputs before this change.  Now
the call to llvm::sys::fs::remove succeeds and the temporary file is
deleted. This is a stop-gap to fix clang before implementing the
solution outlined in PR34070.

Reviewers: davide

Subscribers: llvm-commits, hiraditya

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

llvm-svn: 310137
2017-08-04 21:52:00 +00:00
Kostya Serebryany 7dbb1e179e [libFuzzer] add -fsanitize-coverage-pc-table to -fsanitize=fuzzer
llvm-svn: 310136
2017-08-04 21:35:11 +00:00
Alexey Bataev d90ec748a8 Revert "[OPENMP][DEBUG] Set proper address space info if required by target."
This reverts commit r310104.

llvm-svn: 310135
2017-08-04 21:27:11 +00:00
Alexey Bataev efd884d393 Revert "[OPENMP] Fix for pacify buildbots, NFC."
This reverts commit r310120.

llvm-svn: 310134
2017-08-04 21:26:25 +00:00
Vlad Tsyrklevich 3f3aad235d Reland "CFI: blacklist STL allocate() from unrelated-casts"
Reland r310097 with a fix for a debug assertion in NamedDecl.getName()

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

llvm-svn: 310132
2017-08-04 21:21:00 +00:00
Vlad Tsyrklevich bbe96e50f3 Revert "Reland "CFI: blacklist STL allocate() from unrelated-casts""
This reverts commit r310105.

llvm-svn: 310121
2017-08-04 20:37:49 +00:00
Alexey Bataev e09a774bea [OPENMP] Fix for pacify buildbots, NFC.
llvm-svn: 310120
2017-08-04 20:29:52 +00:00