Commit Graph

54527 Commits

Author SHA1 Message Date
Alexey Samsonov 3205b51673 Add ubsan/not_ubsan features to Clang lit tests and use
them to exclude tests with large stack usage from UBSan bootstrap.

llvm-svn: 217064
2014-09-03 19:46:32 +00:00
Alexey Samsonov 2c0aac2591 Fix member function call on null pointer in Sema::FindInstantiatedDecl.
This bug was reported by UBSan.

llvm-svn: 217059
2014-09-03 18:45:45 +00:00
Anton Yartsev 94e46f3eb8 Enhance the 'Vectors and Extended Vectors' section.
Added cast operations to the table of vector operations. Supported status 'no' means that there are no tests in the Clang test suite for the given cast.

llvm-svn: 217055
2014-09-03 17:59:21 +00:00
Rafael Espindola efde5a7740 Update for LLVM api change.
llvm-svn: 217050
2014-09-03 17:31:52 +00:00
Nico Weber 2a9b6aae9a Fix indentation. No behavior change.
llvm-svn: 217044
2014-09-03 15:28:00 +00:00
Eli Bendersky 7325e56c10 Split off CUDA-specific Sema parts to a new file
In line with SemaOpenMP.cpp, etc. CUDA-specific semantic analysis code goes into
a separate file. This is in anticipation of adding extra functionality here in
the near future.

No change in functionality.

Review: http://reviews.llvm.org/D5160
llvm-svn: 217043
2014-09-03 15:27:03 +00:00
Tom Stellard c4e0c1075b CGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins
Using the intrinsic allows the SelectionDAGBuilder to turn this call
into the FABS Node and also the intrinsic is something the vectorizer knows
how to vectorize.

This patch also sets the readnone attribute on this call, which should
enable additional optmizations.

llvm-svn: 217042
2014-09-03 15:24:29 +00:00
Iain Sandoe fe3add79bf Fix configure and make build of clang-interpreter.
Replaced 'jit' link component with 'mcjit'.
Updated the required libraries.

llvm-svn: 217033
2014-09-03 13:13:50 +00:00
Benjamin Kramer 7ab8476c15 ASTMatchers: Add a matcher to detect whether a decl or stmt is inside a template instantiation.
This is hoisted from clang-tidy where it's used everywhere. The implementation
is not particularly efficient right now, but there is no easy fix for that.

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

llvm-svn: 217029
2014-09-03 12:08:14 +00:00
Benjamin Kramer a39beb9dd6 Parse: Replace polymorphic functor objects with lambdas and llvm::function_ref.
No change in functionality.

llvm-svn: 217025
2014-09-03 11:06:10 +00:00
Daniel Jasper db986eb6bb clang-format: Add an option 'SpaceAfterCStyleCast'.
This permits to add a space after closing parenthesis of a C-style cast.
Defaults to false to preserve old behavior.

Fixes llvm.org/PR19982.

Before:
  (int)i;

After:
  (int) i;

Patch by Marek Kurdej.

llvm-svn: 217022
2014-09-03 07:37:29 +00:00
Ed Schouten ca98874943 Allow a scoped lockable object to acquire/release multiple locks.
Scoped lockable objects (mutex guards) are implemented as if it is a
lock itself that is acquired upon construction and unlocked upon
destruction. As it if course needs to be used to actually lock down
something else (a mutex), it keeps track of this knowledge through its
underlying mutex field in its FactEntry.

The problem with this approach is that this only allows us to lock down
a single mutex, so extend the code to use a vector of underlying
mutexes. This, however, makes the code a bit more complex than
necessary, so subclass FactEntry into LockableFactEntry and
ScopedLockableFactEntry and move all the logic that differs between
regular locks and scoped lockables into member functions.

llvm-svn: 217016
2014-09-03 06:00:11 +00:00
Richard Smith 73b21d8fa1 [modules] Use DeclContext::equals rather than == on DeclContext* when
determining whether a declaration is out of line, instead of assuming
that the semantic and lexical DeclContext will be the same declaration
whenever they're the same entity.

This fixes behavior of declarations within merged classes and enums.

llvm-svn: 217008
2014-09-03 02:33:22 +00:00
Eric Christopher af2b7dc522 Reinstate "Update for llvm API change.""
This reinstates r215113.

llvm-svn: 216986
2014-09-02 22:35:49 +00:00
Eli Bendersky 838600482a Fix up formatting.
llvm-svn: 216976
2014-09-02 22:00:06 +00:00
Richard Smith cdd7cbcac0 Avoid test failure on platforms where size_t is long long (and thus can't be
directly written in strictly-conforming source code).

llvm-svn: 216969
2014-09-02 21:39:21 +00:00
Reid Kleckner be80f6d901 Add --analyze to clang-cl
llvm-svn: 216964
2014-09-02 21:35:28 +00:00
Richard Smith a10a16264f Tests for DR550-572.
llvm-svn: 216953
2014-09-02 21:29:16 +00:00
Ed Schouten bf041d975e Use /usr/bin/env python instead of /usr/bin/python.
On operating systems like the BSDs, it is typically the case that
/usr/bin/python does not exist. We should therefore use /usr/bin/env
instead. This is also done in various other scripts in tools/.

llvm-svn: 216945
2014-09-02 20:59:13 +00:00
Rafael Espindola 9efb728920 Don't indent inside a namespace.
llvm-svn: 216937
2014-09-02 19:37:08 +00:00
Richard Trieu b292604553 Don't allow lambdas to capture invalid decls during template instantiations.
Fixes PR20731.

llvm-svn: 216936
2014-09-02 19:32:44 +00:00
Yunzhong Gao 637cb90ba8 Fixing a typo in the documented __builtin_convertvector example.
"vf[0]" ==> "vs[0]"

llvm-svn: 216935
2014-09-02 19:24:14 +00:00
David Blaikie 86b9464e01 Fix for LLVM API change to SpecialCaseList::create
llvm-svn: 216926
2014-09-02 18:13:58 +00:00
Rafael Espindola fa8d024210 Test cleanup: move CHECK close to code.
llvm-svn: 216892
2014-09-01 22:29:32 +00:00
David Majnemer 9676a2bc47 Frontend: Reindent Opts.CoverageFile
No functional change intended.

llvm-svn: 216888
2014-09-01 18:50:05 +00:00
David Majnemer ca32f9342b MS ABI: Reindent MicrosoftCXXABI::GetVirtualBaseClassOffset
No functional change intended.

llvm-svn: 216887
2014-09-01 18:50:02 +00:00
Alexander Potapenko c8e749a5fd Typo fix, no functionality change.
llvm-svn: 216876
2014-09-01 12:35:57 +00:00
NAKAMURA Takumi 3a1469ea04 clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 for targeting MSVC x86 for now, due to incompatibility of attribute(thiscall).
With targeting i686-win32,

  error: 'error' diagnostics seen but not expected:
    File clang/test/CXX/drs/dr5xx.cpp Line 521: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>'
    File clang/test/CXX/drs/dr5xx.cpp Line 518: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>'
    File clang/test/CXX/drs/dr5xx.cpp Line 518: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>'
  error: 'note' diagnostics seen but not expected:
    File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here
    File clang/test/CXX/drs/dr5xx.cpp Line 521: in instantiation of function template specialization 'dr547::f<void () __attribute__((thiscall)) const, dr547::S>' requested here
    File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here
    File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here
  7 errors generated.

llvm-svn: 216841
2014-08-31 12:21:50 +00:00
Richard Smith 1b88632886 cxx_status: we did support some of C++14 in Clang 3.3.
llvm-svn: 216837
2014-08-31 04:18:54 +00:00
Richard Smith 20f3767f36 cxx_status: the name C++14 isn't provisional any more.
llvm-svn: 216836
2014-08-31 04:17:48 +00:00
Richard Smith fb640501a2 Tests for DR525-550.
llvm-svn: 216834
2014-08-31 03:06:20 +00:00
NAKAMURA Takumi 41429874d6 clang/test/CodeGenCXX/debug-info-access.cpp: Use %itanium_abi_triple to appease msvc. "[def] [free]" can be seen in different order.
llvm-svn: 216829
2014-08-31 00:27:00 +00:00
Craig Topper bf3e32705a Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already.
llvm-svn: 216825
2014-08-30 16:55:52 +00:00
Craig Topper 8c2a2a0f82 Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>.
llvm-svn: 216824
2014-08-30 16:55:39 +00:00
Rafael Espindola f7765ac9b9 Cleanup test.
This should make it easier to add more tests to this file.

llvm-svn: 216807
2014-08-30 00:15:37 +00:00
Richard Smith 70d5850955 [modules] Fix deserialization cycle when loading a tag declaration with a typedef name for linkage purposes. When loading the type, delay loading its typedef until we've finished loading and merging the type. In its place, save out the name of the typedef, which we need for merging purposes.
llvm-svn: 216806
2014-08-30 00:04:23 +00:00
Rafael Espindola 2321920b61 Cleanup the test a bit. It was too dependent on the output order.
llvm-svn: 216802
2014-08-29 23:45:52 +00:00
Adrian Prantl 21361fb308 Debug info: Only emit C++ accessibility specifiers when they are diverging
from the default for the containing type.

rdar://problem/18154959

llvm-svn: 216800
2014-08-29 22:44:27 +00:00
Richard Smith b602c7f843 Add some missing test coverage for merging 'extern "C"' functions with modules.
llvm-svn: 216796
2014-08-29 22:33:38 +00:00
Reid Kleckner 76176f28b9 Fix my broken test cases.
llvm-svn: 216791
2014-08-29 22:06:20 +00:00
David Blaikie 02118cedd5 unique_ptrify PTHManager's PerIDCache using the newly added llvm::FreeDeleter
llvm-svn: 216786
2014-08-29 22:04:45 +00:00
David Blaikie 60e836ba99 unique_ptrify some parameters to PTHManager::PTHManager
A couple of these arguments were passed by void* as a rather extreme
example of pimpling. Adjusting this to a more classic form of the idiom
(involving forward declarations) makes this more legible and allows
explicit passing of ownership via std::unique_ptr.

llvm-svn: 216785
2014-08-29 22:04:40 +00:00
Anna Zaks ae08e431dd Fixup for r216763. Add a driver test.
llvm-svn: 216783
2014-08-29 21:51:22 +00:00
Reid Kleckner c34735148f Make all virtual member pointers use variadic musttail calls
This avoids encoding information about the function prototype into the
thunk at the cost of some function prototype bitcast gymnastics.

Fixes PR20653.

llvm-svn: 216782
2014-08-29 21:43:29 +00:00
Larisse Voufo 2e84650768 Fix for PR20660, where unexpanded parameter pack in function parameter clause causes clang to crash.
llvm-svn: 216778
2014-08-29 21:08:16 +00:00
Nico Weber ce069f11f9 Add a comment, no functional change.
llvm-svn: 216777
2014-08-29 21:05:44 +00:00
Fariborz Jahanian 3b23008987 Objective-C [qoi]. If property is going to be implemented
in the super class, do not issue the warning about property
in current class's protocol will not be auto synthesized.
// rdar://18179833

llvm-svn: 216769
2014-08-29 20:29:31 +00:00
David Blaikie eb62b822e3 unique_ptrify the raw_ostream argument to clang::serialized_diags::create
llvm-svn: 216767
2014-08-29 20:17:13 +00:00
David Blaikie 53dd8fea69 unique_ptrify clang::ento::createCheckerManager
llvm-svn: 216765
2014-08-29 20:11:03 +00:00
David Blaikie c9950cb1dd unique_ptrify PathDiagnosticConsumer::HandlePathDiagnostic
FoldingSet, another intrusive data structure that could use some
unique_ptr love on its interfaces. Eventually.

llvm-svn: 216764
2014-08-29 20:06:10 +00:00