Commit Graph

44971 Commits

Author SHA1 Message Date
David Blaikie 8ddc2b50e8 Add a triple to make a test resilient to non-TLS hosts (eg: darwin10)
Making the test introduced in r179962 resilient to being run on darwin10 hosts.

llvm-svn: 179992
2013-04-22 04:18:25 +00:00
Dmitri Gribenko 2dbe8f94a9 Fix return type of isBitfield in the binding definition
Patch by Loïc Jaquemet.

llvm-svn: 179984
2013-04-21 18:35:51 +00:00
Simon Atanasyan 4938ddb1ab [Mips] Convert a GNU style Mips ABI name to the name accepted by LLVM
Mips backend.

llvm-svn: 179981
2013-04-21 13:30:10 +00:00
Simon Atanasyan 9035898c21 [Mips] Do not add unnecessary Mips toolchain path to the list
of system include directories with extern "C" semantics.

llvm-svn: 179979
2013-04-21 12:55:59 +00:00
Richard Smith 034185c2f9 The 'constexpr implies const' rule for non-static member functions is gone in
C++1y, so stop adding the 'const' there. Provide a compatibility warning for
code relying on this in C++11, with a fix-it hint. Update our lazily-written
tests to add the const, except for those ones which were testing our
implementation of this rule.

llvm-svn: 179969
2013-04-21 01:08:50 +00:00
Richard Smith 74d0c1eeef Disable VLA diagnostic in C++1y mode, and add some tests.
Still to do here:
  - we have a collection of syntactic accepts-invalids to diagnose
  - support non-PODs in VLAs, including dynamic initialization /
    destruction
  - runtime checks (and throw std::bad_array_length) for bad bound
  - support VLA capture by reference in lambdas
  - properly support VLAs in range-based for (don't recompute bound)

llvm-svn: 179962
2013-04-20 23:28:26 +00:00
Richard Smith 51fe3a48aa Add another test I forgot to svn add.
llvm-svn: 179959
2013-04-20 22:23:29 +00:00
Richard Smith 852c9db72b C++1y: Allow aggregates to have default initializers.
Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in
CXXCtorInitializers and in InitListExprs to represent a default initializer.

There's an additional complication here: because the default initializer can
refer to the initialized object via its 'this' pointer, we need to make sure
that 'this' points to the right thing within the evaluation.

llvm-svn: 179958
2013-04-20 22:23:05 +00:00
Richard Smith f30c842a38 Update some stuff on the open projects page to reflect things we've already done.
llvm-svn: 179953
2013-04-20 16:20:44 +00:00
Richard Smith 95997207e0 Switch C++11 open project to C++1y :)
llvm-svn: 179951
2013-04-20 15:57:27 +00:00
Richard Smith 4cf9a1ee0b Add note that some of these links are dead for now.
llvm-svn: 179950
2013-04-20 13:22:50 +00:00
Richard Smith 33089cbdae VLAs in C++14!
llvm-svn: 179949
2013-04-20 13:20:33 +00:00
Richard Smith 7898d7ba96 Variable templates and generic lambdas are approved for C++14.
llvm-svn: 179947
2013-04-20 12:58:57 +00:00
Richard Smith d3a7386452 Clarifying memory allocation: approved for C++14. Move from N/A to no, since we currently relax 'operator new' calls which didn't come from new-expressions.
llvm-svn: 179946
2013-04-20 12:57:49 +00:00
Richard Smith 74c61eaca2 No digit separators for C++14.
llvm-svn: 179945
2013-04-20 12:56:37 +00:00
Richard Smith 7feda2f990 Generalized constexpr is approved for C++14.
llvm-svn: 179944
2013-04-20 12:49:36 +00:00
Richard Smith 5db8b286e2 More approved C++14 features.
llvm-svn: 179943
2013-04-20 12:47:36 +00:00
Richard Smith 0fa4fceaae Binary literals are approved for C++14.
llvm-svn: 179942
2013-04-20 12:44:32 +00:00
Richard Smith 0feaf0c7e3 Implement core issue 1608: class members can be found via operator lookup in a trailing return type in that class's body.
llvm-svn: 179941
2013-04-20 12:41:22 +00:00
Simon Atanasyan 08450bd55c Supports Sourcery CodeBench Mips toolchain directories tree.
Sourcery CodeBench and modern FSF Mips toolchains require a bit more
complicated algorithm to calculate headers, libraries and sysroot paths
than implemented by Clang driver now. The main problem is that all these
paths depend on a set of command line arguments additionally to a target
triple value. For example, let $TC is a toolchain installation directory.
If we compile big-endian 32-bit mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2 folder and the toolchain's linker requires
--sysroot=$TC/mips-linux-gnu/libc argument. If we compile little-endian
32-bit soft-float mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2/soft-float/el folder and the toolchain's
linker requires --sysroot=$TC/mips-linux-gnu/libc/soft-float/el argument.

1. Calculate MultiarchSuffix using all necessary command line options and
   use this MultiarchSuffix to detect crtbegin.o location in the
   GCCInstallationDetector::ScanLibDirForGCCTriple() routine.
2. If a user does not provide --sysroot argument to the driver explicitly,
   calculate new sysroot value based on command line options. Then use this
   calculated sysroot path:
   a. To populate a file search paths list in the Linux::Linux() constructor.
   b. To find Mips toolchain specific include headers directories
      in the Linux::AddClangSystemIncludeArgs() routine.
   c. To provide -–sysroot argument for a linker.

Note:
- The FSF's tree slightly differs (folder names) and is not supported
  yet.
- New addExternCSystemIncludeIfExits() routine is a temporary solution.
  I plan to move path existence check to the addExternCSystemInclude()
  routine by a separate commit.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D644

llvm-svn: 179934
2013-04-20 08:15:03 +00:00
Anna Zaks 6c0c47ede5 [analyzer] Ensure BugReporterTracking works on regions with pointer arithmetic
Introduce a new helper function, which computes the first symbolic region in
the base region chain. The corresponding symbol has been used for assuming that
a pointer is null. Now, it will also be used for checking if it is null.

This ensures that we are tracking a null pointer correctly in the BugReporter.

llvm-svn: 179916
2013-04-20 01:15:42 +00:00
Anna Zaks 390fb10a9b [analyzer] Flip printPretty and printPrettyAsExpr as per suggestion from Jordan (r179572)
llvm-svn: 179915
2013-04-20 01:15:36 +00:00
Anna Zaks 4e88300256 [analyzer] Correct the comment
llvm-svn: 179914
2013-04-20 01:15:32 +00:00
Argyrios Kyrtzidis 0903f8dac5 [libclang] Make sure the preable does not truncate comments.
rdar://13647445

llvm-svn: 179907
2013-04-19 23:24:25 +00:00
Jordan Rose 2a481fa63b [analyzer] Website: update lists of potential and actual checkers.
- memory.MismatchedDelete, memory.MultipleDelete, and memory.DeallocateNonPtr
  are complete (unix.MismatchedDeallocator and cplusplus.NewDelete)
- Per discussion on the mailing list, different.UnaryPlusWithUnsigned has
  dubious value; remove it.
- Add potential checker ctordtor.PlacementSelfCopy per an internal bug report.
- core.AttributeNonNull is now core.NonNullParamChecker, though no one should
  be depending on this name anyway.

llvm-svn: 179900
2013-04-19 22:19:14 +00:00
Adrian Prantl 8ac6170341 Remove an empty line so the line numbers match up again after the recent documentation change.
llvm-svn: 179898
2013-04-19 21:59:40 +00:00
Adrian Prantl c0dd7a4f25 still not relaxed enough.
llvm-svn: 179897
2013-04-19 21:52:06 +00:00
Adrian Prantl b37427fd82 cleanup and relax test cases
llvm-svn: 179896
2013-04-19 21:48:07 +00:00
Richard Smith c5c27f2a1f Note that we support (and in fact have supported since the dawn of time itself)
C++1y binary literals.

llvm-svn: 179883
2013-04-19 20:47:20 +00:00
Chad Rosier 7f2ab89774 [ms-inline asm] The parsing of C++ identifiers is a task of the front-end parser,
not the asm parser.  As such, begin moving the parsing logic in that direction.
This patch is just a temporary hack until the real frontend parser can be hooked
up.  Part of rdar://13663589

llvm-svn: 179882
2013-04-19 20:37:49 +00:00
Adrian Prantl c60dc718c0 Emit the underlying type in the debug info for all kinds of fixed enums
instead of only C++11-scoped-with-class-tag enums.

rdar://problem/13463793

llvm-svn: 179879
2013-04-19 19:56:39 +00:00
Adrian Prantl 6847fe3686 s/C++0x/C++11/
llvm-svn: 179878
2013-04-19 19:56:35 +00:00
Richard Smith 9172520f57 Initial work on status page for C++14.
llvm-svn: 179864
2013-04-19 17:27:48 +00:00
Andy Gibbs aa0b94a2d8 Keep the parentheses in #pragma message (partial revert of r179771).
llvm-svn: 179862
2013-04-19 17:13:17 +00:00
Richard Smith 25b555a6bf C++11 support is now feature-complete.
llvm-svn: 179861
2013-04-19 17:00:31 +00:00
Reid Kleckner 7ab75b3f68 Avoid names like __in that conflict with SAL in builtin headers
Microsoft's Source Annotation Language (SAL) defines a bunch of keywords
for annotating the inputs and outputs of functions.  Empty definitions
for the keywords are provided by <stdlib.h> -> <crtdefs.h> -> <sal.h>.
This makes it basically impossible to include MSVC's stdlib.h and
Clang's *mmintrin.h headers at the same time if they have variables
named __in.  As a workaround, I've renamed those variables.

This fixes the Modules/compiler_builtins.m test which was XFAILed,
presumably due to this conflict.

llvm-svn: 179860
2013-04-19 17:00:14 +00:00
Richard Smith 2fd1d7aee3 Implement CodeGen for C++11 thread_local, following the Itanium ABI specification as discussed on cxx-abi-dev.
llvm-svn: 179858
2013-04-19 16:42:07 +00:00
Anton Yartsev 3976656e08 [analyzer] Call proper callback for const regions escaped other then on call.
llvm-svn: 179846
2013-04-19 09:39:51 +00:00
Eric Christopher 3669c3c603 Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"
This reverts commit r179837 as it seems to be causing test failures.

llvm-svn: 179839
2013-04-19 07:46:36 +00:00
David Blaikie cf5e5bade1 PR14606: Debug info for using directives/DW_TAG_imported_module
More changes later for using declarations/DW_TAG_imported_declaration.

llvm-svn: 179837
2013-04-19 07:04:02 +00:00
David Blaikie bfa5274df5 Give CGDebugInfo::getContextDescriptor a more specific return type
Not that the DI* hierarchy is terribly type safe, but this makes the contract a
little clearer I think.

llvm-svn: 179835
2013-04-19 06:56:38 +00:00
Argyrios Kyrtzidis 982934e7d4 [libclang] Fix copy-paste error in comment.
llvm-svn: 179823
2013-04-19 00:51:52 +00:00
Argyrios Kyrtzidis 23814e4f49 [libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.
rdar://13667150

llvm-svn: 179819
2013-04-18 23:53:05 +00:00
Fariborz Jahanian d5d6f3d5a2 Objective-C++: Enable passing of modern C++11 style
initialized temporaries to objc++ methods. 
// rdar://12788429

llvm-svn: 179818
2013-04-18 23:43:21 +00:00
Argyrios Kyrtzidis 9d9bc01e42 [libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and
parameter types in an ObjC method declarations.

rdar://13676977

llvm-svn: 179816
2013-04-18 23:29:12 +00:00
Chad Rosier 274800025a Fix typo.
llvm-svn: 179811
2013-04-18 23:12:05 +00:00
Benjamin Kramer 1e4a886c28 Add comment to describe cleverness.
llvm-svn: 179806
2013-04-18 22:49:48 +00:00
Argyrios Kyrtzidis 9adfd8aabb [libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.
rdar://13684512

llvm-svn: 179803
2013-04-18 22:15:49 +00:00
Dmitri Gribenko c2c804d145 Comment parsing: simplify code. As a side effect, this also silences GCC's
-Wunitnitialized warning.

Patch by Rui Ueyama.

llvm-svn: 179794
2013-04-18 20:50:35 +00:00
Fariborz Jahanian 507a5f8cb3 Objective-C parsing [qoi]: Provide good recovery when
Objective-C dictionary literals has bad syntax for the
separator. // rdar://10679157

llvm-svn: 179784
2013-04-18 19:37:43 +00:00