Commit Graph

50260 Commits

Author SHA1 Message Date
Anton Yartsev fee669054f [analyzer] The patch prevents the analyzer from crashing during CFG dump.
llvm-svn: 199800
2014-01-22 13:19:48 +00:00
NAKAMURA Takumi 9f2538d883 [CMake][MS] libclang: Invalidate LLVM_EXPORTED_SYMBOL_FILE to suppress LNK4197.
Each functions is exported as "dllexport" in include/clang-c.
See also KB835326.

llvm-svn: 199799
2014-01-22 13:02:59 +00:00
Daniel Jasper 215d6c8c50 clang-format: Treat "." in protos like namespace separators.
Before:
  optional really.really.long.and.qualified.type.aaaaaaa
      .aaaaaaaa another_fiiiiiiiiiiiiiiiiiiiiield = 2;

After:
  optional
     really.really.long.and.qualified.type.aaaaaaa.aaaaaaaa
          another_fiiiiiiiiiiiiiiiiiiiiield = 2;

llvm-svn: 199796
2014-01-22 08:04:52 +00:00
Alp Toker 2bd4a28664 Change a dyn_cast from r199794 to a straight cast
It's guaranteed to be a CXXMethodDecl.

llvm-svn: 199795
2014-01-22 07:53:08 +00:00
Alp Toker a2794f9f36 Introduce and use Decl::getAsFunction() to simplify templated function checks
Lift the getFunctionDecl() utility out of the parser into a general
Decl::getAsFunction() and use it to simplify other parts of the implementation.

Reduce isFunctionOrFunctionTemplate() to a simple type check that works the
same was as the other is* functions and move unwrapping of shadowed decls to
callers so it doesn't get run twice.

Shuffle around canSkipFunctionBody() to reduce virtual dispatch on ASTConsumer.
There's no need to query when we already know the body can't be skipped.

llvm-svn: 199794
2014-01-22 07:29:52 +00:00
Ted Kremenek ef9e7f8059 Add basic checking for returning null from functions/methods marked 'returns_nonnull'.
This involved making CheckReturnStackAddr into a static function, which
is now called by a top-level return value checking routine called
CheckReturnValExpr.

llvm-svn: 199790
2014-01-22 06:10:28 +00:00
Hans Wennborg a6ae1209df clang-cl: make /Zp a Joined option (PR18503)
We don't currently support this option, but we should be able to parse it.

llvm-svn: 199787
2014-01-22 03:23:35 +00:00
Richard Smith 31875a0a6a Add a test file missed from r199782.
llvm-svn: 199783
2014-01-22 02:05:03 +00:00
Richard Smith b63b6ee9a0 Enforce restrictions that 'main' is not allowed to be deleted, or to be used by
the program, in C++. (We allow the latter as an extension, since we've always
permitted it, and GCC does the same, and our supported C++ ABIs don't do
anything special in main.)

llvm-svn: 199782
2014-01-22 01:43:19 +00:00
Fariborz Jahanian bbf322b0bb ObjectiveC driver. change to reinstate -fno-objc-legacy-dispatch behavior
when the deployment target is 10.5. // rdar://15852259

llvm-svn: 199780
2014-01-22 00:43:54 +00:00
Richard Smith c278c00613 Build an appropriate (albeit trivial) TypeSourceInfo for a destructor name, so
AST consumers can determine where the destructor name was written. Patch by
Olivier Goffart!

llvm-svn: 199779
2014-01-22 00:30:17 +00:00
Richard Smith e81daee21b When formatting a C++-only declaration name, enable C++ mode in the formatter's
language options. This is not really ideal -- we should require the right
language options to be passed in, or not require language options to format a
name -- but it fixes a number of *obviously* wrong formattings. Patch by
Olivier Goffart!

llvm-svn: 199778
2014-01-22 00:27:42 +00:00
Nico Rieck f8e8b5f5c2 Delay attribute checking until auto types are deduced
Checking in ActOnVariableDeclarator computes and caches the linkage using
the non-deduced auto type which defaults to external linkage. Depending on
how the auto type is deduced linkage can change and conflict with the
cached linkage, hitting asserts.

llvm-svn: 199774
2014-01-21 23:54:36 +00:00
Alp Toker 601b22c377 Correct various uses of 'argument' that in fact refer to function parameters
Cleanup only.

llvm-svn: 199773
2014-01-21 23:35:24 +00:00
Richard Smith 111d3485af Fix regression in r197623: only diagnose a by-copy capture of an incomplete
type if the capture is, actually, by copy.

llvm-svn: 199772
2014-01-21 23:27:46 +00:00
Chandler Carruth 902efc61be Teach Clang to look in its installation libdir for libraries (such as
libc++) when the installation is within the system root.

This doesn't really help cross compiles much, but we don't (currently)
have a great story around libc++, cross compiles, and who is responsible
for building and/or installing the libraries. However, it handles the
very common case of non-cross builds in a way entirely consistent with
GCC, so I'm hopeful this won't really hose anyone.

This is the second patch that I think should be backported to 3.4 to
give folks an easy to checkout and install working Clang+libc++
toolchain.

llvm-svn: 199769
2014-01-21 22:49:05 +00:00
David Majnemer b9a5f2d3b6 MSVC ABI: Support C++11's auto on variables
The MSVC C++ ABI always uses the deduced type in place of auto when
generating external names for variables.

N.B.  MSVC doesn't support C++1y's 'operator auto' and this patch will
not give us said functionality.

llvm-svn: 199764
2014-01-21 20:33:36 +00:00
David Blaikie 24b71b3072 Correct the function name shown in diagnostics in warn-thread-safety-analysis.c
Patch by Alex Wang.

llvm-svn: 199762
2014-01-21 19:07:40 +00:00
Adrian Prantl 3eff225a44 Debug info: use the file a typedef is defined in as its decl_file instead
of the current compilation unit.
As a side effect this enables many more LTO uniquing opportunities.

This reapplies r199757 with a better testcase.

llvm-svn: 199760
2014-01-21 18:42:27 +00:00
Adrian Prantl cb6e1257ff revert 199757 for buildbot breakage.
llvm-svn: 199758
2014-01-21 18:23:43 +00:00
Adrian Prantl 83788519a5 Debug info: use the file a typedef is defined in as its decl_file instead
of the current compilation unit.
As a side effect this enables many more LTO uniquing opportunities.

rdar://problem/15851206

llvm-svn: 199757
2014-01-21 18:20:52 +00:00
Alp Toker 3e2aa33532 Fix -Wsometimes-uninitialized in r199754
Also make the -m16 check x86-specific. Other archs may have a different take on
things.

llvm-svn: 199755
2014-01-21 18:01:01 +00:00
David Woodhouse 6996f6b9ec Add -m16 option for using x86-*-*-code16 triple
llvm-svn: 199754
2014-01-21 17:19:44 +00:00
Daniel Jasper 2158912a4e clang-format: Enable formatting for .proto and .protodevel files.
Support for protocol buffer files seems complete enough.

llvm-svn: 199750
2014-01-21 15:40:01 +00:00
Tim Northover d875d34171 Macho-embedded: fix tests after last rename
Very sorry, I managed to completely forget "make check".

llvm-svn: 199739
2014-01-21 13:23:09 +00:00
Tim Northover 1a9b904b76 Macho-embedded: rename compiler-rt support from Darwin-embedded
There's nothing Darwin-based in the files or target now, so the previous name
is now misleading.

llvm-svn: 199733
2014-01-21 12:38:19 +00:00
Daniel Jasper 7cfde414e1 clang-format: text following #if is likely an expression.
Before:
  #if AAAA &&BBBB

After:
  #if AAAA && BBBB

llvm-svn: 199713
2014-01-21 08:56:09 +00:00
Nick Lewycky 36e9b3ccff Neither attribute overloadable nor enable_if are supported by GCC. Disable the
GCC warning about attributes on function definitions for both of them.

llvm-svn: 199710
2014-01-21 04:31:12 +00:00
Rafael Espindola e1bd71fea4 Use private linkage for utf-16 objc strings too.
llvm-svn: 199709
2014-01-21 02:57:56 +00:00
Rafael Espindola 6839d23be7 Now that r199688 avoids the real issue, use private linkage for objc strings.
llvm-svn: 199705
2014-01-21 01:50:12 +00:00
Nick Lewycky d950ae74a3 Simplify expression, made possible by r199702.
llvm-svn: 199703
2014-01-21 01:30:30 +00:00
Justin Bogner e25ffdf8a1 Revert "CodeGen: Simplify CodeGenFunction::EmitCaseStmt"
I misunderstood the discussion on this. The complexity here is
justified by the malloc overhead it saves.

This reverts commit r199302.

llvm-svn: 199700
2014-01-21 00:35:11 +00:00
Alp Toker b3fd5cfa81 Update FunctionTypeLoc and related names to match r199686
llvm-svn: 199699
2014-01-21 00:32:38 +00:00
Bob Wilson 74b6cd15ed Stop linking with crt1.o etc. for the iOS simulator. <rdar://problem/11800973>
Recent versions of the iOS simulator no longer require linking with the
crt1.o, dylib1.o, or bundle1.o files. The relevant code is now included in
libSystem for the simulator.

llvm-svn: 199696
2014-01-21 00:17:10 +00:00
Rafael Espindola d19f80a0b4 Give explicit sections for string constants used in NSStrings.
Without them they can be merged with non unnamed_addr constants during LTO.
The resulting constant is not unnamed_addr and goes in a different section,
which causes ld64 to crash.

A testcase that would crash before:

* file1.mm:
void g(id notification) {
  [notification valueForKey:@"name"];
}

* file2.cpp:
extern const char js_name_str[] = "name";

* file3.cpp
extern bool JS_GetProperty(const char *name);
extern const char js_name_str[];
bool js_ReportUncaughtException() { JS_GetProperty(js_name_str); }

run

clang file1.mm  -o file1.o -c -w -emit-llvm
clang file2.cpp -o file2.o -c -w -emit-llvm
clang file3.cpp -o file3.o -c -w

ld -dylib -o XUL file1.o file2.o file3.o -undefined dynamic_lookup.

llvm-svn: 199688
2014-01-20 20:33:18 +00:00
Alp Toker 9cacbabd33 Rename FunctionProtoType accessors from 'arguments' to 'parameters'
Fix a perennial source of confusion in the clang type system: Declarations and
function prototypes have parameters to which arguments are supplied, so calling
these 'arguments' was a stretch even in C mode, let alone C++ where default
arguments, templates and overloading make the distinction important to get
right.

Readability win across the board, especially in the casting, ADL and
overloading implementations which make a lot more sense at a glance now.

Will keep an eye on the builders and update dependent projects shortly.

No functional change.

llvm-svn: 199686
2014-01-20 20:26:09 +00:00
Rafael Espindola 8ff1610f06 Simplify further.
Thanks to David Blaikie for the push.

llvm-svn: 199685
2014-01-20 20:13:11 +00:00
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
Ted Kremenek f0ae7d0201 [analyzer] Teach NonNullParamChecker about 'nonnull' attributes on parameters.
llvm-svn: 199473
2014-01-17 07:15:35 +00:00
Ted Kremenek 2ff160046b Change CallEvent to use ArrayRef<> interface to get formal parameters of callee.
llvm-svn: 199472
2014-01-17 07:15:31 +00:00
Ted Kremenek 81541c561c Add ArrayRef<> interface to get the formal parameters of a BlockDecl.
llvm-svn: 199471
2014-01-17 07:15:26 +00:00
NAKAMURA Takumi 4ec59174fd Tweak clang/test/PCH/modified-module-dependency.m for win32 hosts.
llvm-svn: 199469
2014-01-17 07:04:17 +00:00
Ted Kremenek 9aedc159ef Enhance attribute 'nonnull' to be applicable to parameters directly (infix).
This allows the following syntax:

  void baz(__attribute__((nonnull)) const char *str);

instead of:

  void baz(const char *str) __attribute__((nonnull(1)));

This also extends to Objective-C methods.

The checking logic in Sema is not as clean as I would like.  Effectively
now we need to check both the FunctionDecl/ObjCMethodDecl and the parameters,
so the point of truth is spread in two places, but the logic isn't that
cumbersome.

Implements <rdar://problem/14691443>.

llvm-svn: 199467
2014-01-17 06:24:56 +00:00
Ted Kremenek 07e4a66306 Add ArrayRef<> interface to get the parameters of a FunctionDecl/ObjCMethodDecl.
This is an alternate interface to the separate iterator interfaces
provided by FunctionDecl and ObjCMethodDecl, which precede ArrayRef.

Providing this new interface is more convenient for some uses, and
likely the old interfaces should be removed.  I have not undertaken
that effort in this change because this API introduction may
solicit commentary and that was a larger change than I wanted
to introduce all at once to serve a direct purpose.

llvm-svn: 199466
2014-01-17 06:24:50 +00:00
Ted Kremenek a146db3987 Push NonNullAttr inspection loop into CheckNonNullArguments.
No functionality change.

llvm-svn: 199465
2014-01-17 06:24:47 +00:00
Ted Kremenek 2bc7333a06 Make 'CheckNonNullArguments' a static function. No functionality change.
llvm-svn: 199464
2014-01-17 06:24:43 +00:00
Ted Kremenek 4997b21a80 Refine diagnostic: attribute 'nonnull' applies to both functions and methods.
llvm-svn: 199460
2014-01-17 04:58:29 +00:00
Alp Toker 9609d30db6 Kill off obsolete err_target_unknown_cxxabi diag
Unused since r199250.

llvm-svn: 199459
2014-01-17 04:23:58 +00:00
Alp Toker 581f6f1dfc Make -cl-kernel-arg-info a cc1-only option like the others
The driver wasn't doing anything with it. Also rephrase the help text.

llvm-svn: 199458
2014-01-17 04:19:59 +00:00
Aaron Ballman 13472563ad Updating the minimum version information for Visual Studio.
Patch thanks to Nikola Smiljanic!

llvm-svn: 199457
2014-01-17 03:38:49 +00:00
Alp Toker e1252dfb02 Tweak test run line for readability
Matching up the argument order in r199455's two RUN lines better demonstrates
what's going on.

llvm-svn: 199456
2014-01-17 03:35:04 +00:00