Fariborz Jahanian
15f60cb2ba
ObjectiveC driver. reinstate -fno-objc-legacy-dispatch behavior
...
when the deployment target is 10.5. // rdar://15852259
llvm-svn: 199682
2014-01-20 19:32:33 +00:00
Aaron Ballman
b39a9b8b0c
Adding a bit of documentation that was missed with r198883 (when ParseArgumentsAsUnevaluated was added).
...
llvm-svn: 199679
2014-01-20 18:42:10 +00:00
Aaron Ballman
b9023ed0f6
Exposed a declarative way to specify that an attribute can be duplicated when merging attributes on a declaration. This replaces some hard-coded functionality from Sema.
...
llvm-svn: 199677
2014-01-20 18:07:09 +00:00
Aaron Ballman
9a99e0da5a
Remove some hard-coded specialness for thread-safety attributes from the parser, and made it more declarative. If an attribute is allowed to appear on a function definition when late parsed, it can now use the FunctionDefinition attribute subject. It's treated as a FunctionDecl for most purposes, except it also gets exposed on the AttributeList so that it can be used while parsing.
...
llvm-svn: 199676
2014-01-20 17:18:35 +00:00
Daniel Jasper
929b1db276
clang-format: Properly format custom options in protocol buffer definitions.
...
Before:
option(my_option) = "abc";
After:
option (my_option) = "abc";
llvm-svn: 199672
2014-01-20 16:47:22 +00:00
Aaron Ballman
3f5f3e7949
Formatting cleanups; no functional changes.
...
llvm-svn: 199671
2014-01-20 16:15:55 +00:00
Rafael Espindola
4f5f0b78a1
Add a triple. Should fix the 64 bit bots.
...
llvm-svn: 199670
2014-01-20 16:15:48 +00:00
Rafael Espindola
a69024aa2a
Make the test more strict.
...
llvm-svn: 199669
2014-01-20 15:58:59 +00:00
Aaron Ballman
f28e49931a
Fixing a typo (turned out to be harmless since the default priority values are the same between the two attributes).
...
llvm-svn: 199666
2014-01-20 15:22:57 +00:00
Rafael Espindola
63582d605e
Remove virtual methods that were added in 2009 and still had 1 implementation.
...
llvm-svn: 199665
2014-01-20 15:19:43 +00:00
Aaron Ballman
05a63787a2
Since the diagnostics engine understands Attr objects, this code is no longer required -- we can just pass in the attribute directly.
...
llvm-svn: 199664
2014-01-20 15:06:09 +00:00
Aaron Ballman
fc1951c505
Making some minor improvements to r199626.
...
llvm-svn: 199663
2014-01-20 14:19:44 +00:00
Aaron Ballman
9e013515aa
HasFunctionProto is a more strict version of FunctionLike. Since attribute subjects are inclusive (passing a single subject test means no subject-related diagnostic will fire), these two subjects should not be combined.
...
llvm-svn: 199662
2014-01-20 14:18:40 +00:00
Daniel Jasper
a55544a658
clang-format: Leave 2 empty lines in Google's JavaScript style.
...
As per the style guide, two lines are required between top-level
elements.
llvm-svn: 199660
2014-01-20 14:10:30 +00:00
Bradley Smith
0f28f0cfc1
[ARM] Add ACLE enum/wchar size predefines
...
llvm-svn: 199642
2014-01-20 10:52:00 +00:00
NAKAMURA Takumi
bf6d1efbba
[CMake] Apply ADDITIONAL_HEADERS introduced in r199639.
...
llvm-svn: 199640
2014-01-20 10:24:05 +00:00
Chandler Carruth
0cfd0e98df
Add the test trees that were supposed to be part of r199632.
...
llvm-svn: 199633
2014-01-20 09:47:21 +00:00
Chandler Carruth
5a3d898758
Make the Linux support for finding libc++ somewhat less braindead.
...
Now instead of just looking in the system root for it, we also look
relative to the clang binary's directory. This should "just work" in
almost all cases. I've added test cases accordingly.
This is probably *very* worthwhile to backport to the 3.4 branch so that
folks can check it out, build it, and use that as their host compiler
going forward.
llvm-svn: 199632
2014-01-20 09:42:24 +00:00
Alp Toker
c620cab8c4
PR18551: accepts invalid strong enum to bool when operator! is used
...
llvm-svn: 199627
2014-01-20 07:20:22 +00:00
Ted Kremenek
dbf62e3eee
Wire up basic parser/sema support for attribute 'returns_nonnull'.
...
This attribute is supported by GCC. More generally it should
probably be a type attribute, but this behavior matches 'nonnull'.
This patch does not include warning logic for checking if a null
value is returned from a function annotated with this attribute.
That will come in subsequent patches.
llvm-svn: 199626
2014-01-20 05:50:47 +00:00
Ted Kremenek
b5867121a7
These attributes are no longer "checker-specific."
...
llvm-svn: 199625
2014-01-20 05:50:41 +00:00
Alp Toker
73287bfe40
MSVC 2013 type trait support
...
Implement type trait primitives used in the latest edition of the Microsoft
standard C++ library type_traits header.
With this change we can parse much of the Visual Studio 2013 standard headers,
particularly anything that includes <type_traits>.
Fully implemented, available in all language modes:
* __is_constructible()
* __is_nothrow_constructible()
* __is_nothrow_assignable()
Partially implemented, semantic analysis WIP, available as MS extensions:
* __is_destructible()
* __is_nothrow_destructible()
llvm-svn: 199619
2014-01-20 00:24:09 +00:00
Alp Toker
b4bca41491
Fix nothrow trait with multiple default constructors
...
Check all default ctors, not just the first one we see. This brings
__has_nothrow_constructor() in line with the other unary type traits.
A C++ class can have multiple default constructors but clang was only checking
the first one written, presumably due to ambiguity in the GNU specification.
MSVC has the same bug, while g++ has the correct implementation which we now
match.
llvm-svn: 199618
2014-01-20 00:23:47 +00:00
Richard Smith
f600441a04
PR18544: don't assert that 'operator new' is not declared inside a namespace;
...
such an assert will fail in invalid code that does so!
llvm-svn: 199617
2014-01-19 23:25:37 +00:00
NAKAMURA Takumi
c28a9a2c33
[CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.
...
LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff.
llvm-svn: 199597
2014-01-19 13:00:01 +00:00
NAKAMURA Takumi
ee13ed8dbb
[CMake][Standalone] Redefine LLVM_RUNTIME_OUTPUT_INTDIR and LLVM_LIBRARY_OUTPUT_INTDIR to point appropriate target directories.
...
llvm-svn: 199596
2014-01-19 12:55:14 +00:00
NAKAMURA Takumi
718d3b63f6
[CMake] Prune LLVM_TOOLS_DIR and LLVM_LIBS_DIR in clang/test/CMakeLists.txt. They are overridden in configure_lit_site_cfg().
...
llvm-svn: 199591
2014-01-19 12:45:35 +00:00
Daniel Jasper
7052ce6d8b
clang-format: Better support and testing for protocol buffers.
...
With this patch, there is dedicated testing for protocol buffers
(https://developers.google.com/protocol-buffers/ ).
Also some minor tweaks formatting tweaks.
llvm-svn: 199580
2014-01-19 09:04:08 +00:00
NAKAMURA Takumi
2e3166af59
[CMake] check-clang requires clang-tblgen. It is not required by anyone when external CLANG_TABLEGEN is specified.
...
llvm-svn: 199579
2014-01-19 08:54:48 +00:00
Daniel Jasper
31745731e8
clang-format: Fix ObjC block as first call parameter formatting.
...
Before:
foo (^{ bar(); });
After:
foo(^{ bar(); });
llvm-svn: 199573
2014-01-19 07:46:32 +00:00
Ted Kremenek
256bd96d1c
Harden InitListExpr::isStringLiteralInit() against getInit() returning null.
...
This led to a crash on invalid code (sorry, no good test case).
Fixes <rdar://problem/15831804>.
llvm-svn: 199571
2014-01-19 06:31:34 +00:00
Alp Toker
96cf758d3a
Fix comment typos
...
llvm-svn: 199563
2014-01-18 21:49:37 +00:00
Alp Toker
64197b9eb9
docs: clarify the role of compiler-builtin type trait primitives
...
Update the documentation to clarify the intent of clang's built-in type trait
facilities, their relation to user-facing C++ type traits and means to check
for availability.
Also explain that __has_feature() is not currently up to date and should not
generally be used in user code (there's a proposal to provide more consistent
checks via __has_builtin(), see cfe-dev).
llvm-svn: 199562
2014-01-18 21:49:02 +00:00
Alp Toker
1c79b3d486
Make unreferenced f-group options anonymous
...
These were showing up with find-unused-options.sh
llvm-svn: 199560
2014-01-18 20:45:14 +00:00
Nick Lewycky
ed91da719e
Try to fix this link.
...
llvm-svn: 199538
2014-01-18 02:29:10 +00:00
David Blaikie
d74be70aba
Driver support for -fdebug-types-sections
...
Using backend-option like a few other debug codegen flags. I believe
Eric Christopher's working at porting those over to something nicer
such as an API level CodeGenOptions or the like, so this can be
improved along with that work.
llvm-svn: 199535
2014-01-18 02:02:06 +00:00
Reid Kleckner
661f35b0c5
Refactor ABI argument lowering a little
...
Currently it tracks the number of free registers, but soon it will track
stack offsets for inalloca lowering.
No functional change.
llvm-svn: 199532
2014-01-18 01:12:41 +00:00
Alp Toker
0abb057715
Restrict redeclaration of tags introduced by using decls to MSVCCompat
...
This limits the facility added in r199490 while we seek clarification on the
standard.
llvm-svn: 199531
2014-01-18 00:59:32 +00:00
Joerg Sonnenberger
d769a1ed62
Use switch statements in preparation for adding more architectures.
...
llvm-svn: 199529
2014-01-18 00:50:49 +00:00
Richard Smith
59d26d2e67
PR12788: Remove unnecessary and incorrect special case for indirect fields.
...
This caused us to skip a step that was essential for correct access control.
llvm-svn: 199522
2014-01-17 22:29:43 +00:00
Ismail Pazarbasi
1121de36c2
Fix string-literal to char* conversion in overload resolution for C++11
...
String literal to char* conversion is deprecated in C++03, and is removed in
C++11. We still accept this conversion in C++11 mode as an extension, if we find
it in the best viable function.
llvm-svn: 199513
2014-01-17 21:08:52 +00:00
Richard Smith
990a692f4a
Don't allow 'this' within typedefs within classes that otherwise look like they
...
might be member function declarations. Patch by Harald van Dijk!
llvm-svn: 199512
2014-01-17 21:01:18 +00:00
Daniel Jasper
47ef6ddece
clang-format: Don't break lines starting with "import <string-literal>"
...
The author might be missing the "#" or these might be protocol buffer
definitions. Either way, we should not break the line or the string.
There don't seem to be other valid use cases.
llvm-svn: 199501
2014-01-17 16:21:39 +00:00
Ted Kremenek
115c3f7a36
[analyzer] Fix incorrect spelling of 'pthread_rwlock_trywrlock'. Patch by Jean Baptiste Noblot.
...
llvm-svn: 199499
2014-01-17 16:06:43 +00:00
Aaron Ballman
d6432f838e
Adding a test case for nonnull being attached to something other than a function, Objective-C method, or parameter.
...
llvm-svn: 199496
2014-01-17 14:38:58 +00:00
Alp Toker
320374c4b1
Permit redeclaration of tags introduced by using decls
...
This valid construct appears in MSVC headers where it's used to provide a
definition for the '::type_info' compiler builtin type.
llvm-svn: 199490
2014-01-17 12:57:21 +00:00
David Majnemer
440e82ec04
Fix a build-bot breakage for clang-modernize when run with the MSVC ABI
...
llvm-svn: 199486
2014-01-17 10:54:42 +00:00
David Majnemer
1cdd96d6ad
Revert "Revert r199416, "MS ABI: Improve selection of an inheritance model""
...
This reverts commit r199475 (which reverted r199416) with fixes for the
breakages.
We wouldn't lock an inheritance model if we saw a pointer-to-member
formed as a result of the address-of operator.
llvm-svn: 199482
2014-01-17 09:01:00 +00:00
Ted Kremenek
15478b32cb
Add more test cases for attribute 'objc_protocol_requires_explicit_implementation'.
...
llvm-svn: 199480
2014-01-17 08:34:19 +00:00
NAKAMURA Takumi
5c486cf3f3
Revert r199416, "MS ABI: Improve selection of an inheritance model"
...
It broke tests for targeting x86_64-pc-win32:
Clang Tools :: clang-modernize/LoopConvert/array.cpp
Clang :: CodeGenCXX/2010-05-10-Var-DbgInfo.cpp
Clang :: CodeGenCXX/member-call-parens.cpp
Clang :: CodeGenCXX/ptr-to-datamember.cpp
Clang :: SemaTemplate/instantiate-function-1.cpp
llvm-svn: 199475
2014-01-17 07:33:47 +00:00