Commit Graph

39290 Commits

Author SHA1 Message Date
Hans Wennborg db7a78c211 test/Sema/tls.c: don't use -verify to check if TLS is supported
Use "%clang_cc1" vs "not %clang_cc1" instead.
Also use -fsyntax-only.

llvm-svn: 161165
2012-08-02 09:04:56 +00:00
Jordan Rose fa49c92b5c [analyzer] Also emit Prev/Next links for macros in HTML output. Oops.
llvm-svn: 161154
2012-08-02 02:43:42 +00:00
Jordan Rose 11790a4810 [analyzer] Add Prev/Next links to the HTML output.
llvm-svn: 161153
2012-08-02 02:26:19 +00:00
Anna Zaks 4c4fe84b25 [analyzer] Flush bug reports in deterministic order.
This makes the diagnostic output order deterministic. 
1) This makes order of text diagnostics consistent from run to run.

2) Also resulted in different bugs being reported (from one run to
another) with plist-html output.

llvm-svn: 161151
2012-08-02 00:41:43 +00:00
Anna Zaks 45a992b5f0 [analyzer] CmpRuns should include file name in the issue identifier.
This prevents us from treating the issues from different files with the
same function names and same offsets as the same.

The issue identifier now includes the file name. Also added a way to
strip off the root directories form the source file names.

llvm-svn: 161150
2012-08-02 00:41:40 +00:00
Eli Friedman abab776039 Make sure we don't emit IR for unused EH cleanups. PR13359.
llvm-svn: 161148
2012-08-02 00:10:24 +00:00
Dmitri Gribenko 6087ba7dc8 Comment parser tests: test that we allow placing no whitespace between \param
and [direction].

llvm-svn: 161146
2012-08-01 23:49:32 +00:00
Dmitri Gribenko 58e4131995 Comment to HTML conversion: correct typo in CSS class name: taram -> tparam
llvm-svn: 161145
2012-08-01 23:47:30 +00:00
Dmitri Gribenko b0ddb66a8d Comment diagnostics fixit tests: move exected-warning constructs from the
comment being tested.

llvm-svn: 161144
2012-08-01 23:29:52 +00:00
Dmitri Gribenko fae2e4ed0a Comment diagnostics: add tests for \tparam fixits.
llvm-svn: 161142
2012-08-01 23:27:13 +00:00
Dmitri Gribenko e6213ddabc Initialize flag in DeclInfo.
llvm-svn: 161141
2012-08-01 23:21:57 +00:00
Dmitri Gribenko 527ab21112 Comment AST: add DeclInfo to store information about the declaration. Sema was
already extracting most of this, but discarding at the end of semantic analysis.

llvm-svn: 161140
2012-08-01 23:08:09 +00:00
Dmitri Gribenko 3a770d0fe4 Comment to HTML conversion: refactor. Extracted a class to for FullComment
semantic parts -- this will be reused for comment to XML conversion.

llvm-svn: 161139
2012-08-01 22:48:16 +00:00
Eli Friedman 22be06a250 Fix an assertion failure instantiating a constexpr function from within a -dealloc method. PR13401.
llvm-svn: 161135
2012-08-01 21:02:59 +00:00
Hans Wennborg 1241731803 TLS is not supported on OpenBSD
This fixes PR13502 and adds a test to keep track of which
targets support TLS and which do not.

llvm-svn: 161124
2012-08-01 18:53:19 +00:00
Nuno Lopes 35b8c509c8 add test for PR13497
llvm-svn: 161119
2012-08-01 17:02:30 +00:00
Manuel Klimek 8c9a6bcae6 Fix typo.
llvm-svn: 161106
2012-08-01 08:48:27 +00:00
Daniel Jasper 8bd14aab3a Add missing tests for class template specialization and template
argument matchers.

llvm-svn: 161102
2012-08-01 08:40:24 +00:00
John McCall 13a39c6f54 When devirtualizing the conversion to a virtual base subobject,
don't explode if the offset we get is zero.  This can happen if
you have an empty virtual base class.

While I'm at it, remove an unnecessary block from the IR-generation
of the null-check, mark the eventual GEP as inbounds, and generally
prettify.

llvm-svn: 161100
2012-08-01 05:04:58 +00:00
Dmitri Gribenko 307cf89b19 Comment to HTML conversion: skip \tparam commands with whitespace paragraphs
llvm-svn: 161096
2012-08-01 00:48:00 +00:00
Dmitri Gribenko 7c0456f91b Comment to HTML conversion: escape HTML special characters in command arguments
llvm-svn: 161094
2012-08-01 00:21:12 +00:00
Aaron Ballman 899b9c6666 Explicitly defaulted constructors cannot be used for default initialization.
llvm-svn: 161088
2012-07-31 22:40:31 +00:00
Dmitri Gribenko 34df220410 Comment parsing: add support for \tparam command on all levels.
The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this
breaks libclang binary compatibility, but should not be a problem since API is
so new.

This also fixes PR13372 as a side-effect.

llvm-svn: 161087
2012-07-31 22:37:06 +00:00
Douglas Gregor f4cc61d525 When testing whether we can perform copy or move initialization, be
sure to supply an initialization location. Fixes <rdar://problem/11951661>.

llvm-svn: 161084
2012-07-31 22:15:04 +00:00
David Blaikie 5ba8be0e9a Include clang-check as part of the clang installation.
This also tidies up a couple of other tools we were (partially) installing:
* c-index-test was being installed but shouldn't be (it's just a clang-dev tool)
* diagtool was being installed in cmake but not make (& shouldn't be installed in either)

Review by Manuel Klimek, Doug Gregor, and Chandler Carruth.

llvm-svn: 161073
2012-07-31 20:29:59 +00:00
Rafael Espindola fb4263f156 Consider the visibility of template template arguments. GCC doesn't, but it also
fails to consider the linkage, which we were already considering.

llvm-svn: 161070
2012-07-31 19:02:02 +00:00
Jordan Rose 69bd4e803b [analyzer] Control C++ inlining with a macro in ExprEngineCallAndReturn.cpp.
For now this will stay on, but this way it's easy to switch off if we need
to pull back our support for a while.

llvm-svn: 161064
2012-07-31 18:22:40 +00:00
Jordan Rose a765bac7a1 [analyzer] Turn -cfg-add-initializers on by default, and remove the flag.
llvm-svn: 161060
2012-07-31 18:04:59 +00:00
Jordan Rose 6a97d92ef5 [analyzer] Don't try to inline if there's no region for a message receiver.
While usually we'd use a symbolic region rather than a straight-up Unknown,
we can still generate unknowns via array subscripts with symbolic indexes.
(And if this ever changes in the future, we still shouldn't crash.)

llvm-svn: 161059
2012-07-31 18:04:53 +00:00
Jordan Rose 1f8c0b4587 [analyzer] Add a FIXME about devirtualization in ctors/dtors.
llvm-svn: 161058
2012-07-31 18:04:49 +00:00
Hans Wennborg 16250c7c18 -Wformat: better handling of qualifiers on pointer arguments
Warn about using pointers to const-qualified types as arguments to
scanf. Ignore the volatile qualifier when checking if types match.

llvm-svn: 161052
2012-07-31 16:37:47 +00:00
Jordan Rose e8a21b73ac [analyzer] Getting an lvalue for a reference field still requires a load.
This was causing a crash in our array-to-pointer logic, since the region
was clearly not an array.

PR13440 / <rdar://problem/11977113>

llvm-svn: 161051
2012-07-31 16:34:07 +00:00
Douglas Gregor 2d8db8fe7a Tweak code-completion heuristics deciding between a lambda
code-completion and an Objective-C message send, based on Jordan's
feedback.

llvm-svn: 161049
2012-07-31 15:27:48 +00:00
Manuel Klimek d627ec8a05 This test actually works on Win32...
llvm-svn: 161048
2012-07-31 14:45:10 +00:00
Manuel Klimek 3aad855a89 Fixes a segfault in Tooling when using pch's:
Clear the FileManager's stat cache in between running
translation units, as the stat cache loaded from a pch
is only valid for one compiler invocation.

llvm-svn: 161047
2012-07-31 13:56:54 +00:00
Benjamin Kramer 1bbcbd0187 Remove deprecated getNameAsCString methods.
llvm-svn: 161044
2012-07-31 11:45:39 +00:00
Jiangning Liu 5007bb6c0b Add two more .keep files to avoid the missing of empty folders in git repository.
llvm-svn: 161043
2012-07-31 10:52:55 +00:00
Jiangning Liu 43f37dca77 Add two .keep files to avoid the missing of empty folders in git repository.
llvm-svn: 161042
2012-07-31 10:24:27 +00:00
Alexander Kornienko 4de035947b Added -ast-list option to dump filterable AST decl node names.
llvm-svn: 161040
2012-07-31 09:37:40 +00:00
Jiangning Liu 61b06cbcb4 Support ARM hard float (arm-linux-gnueabihf).
llvm-svn: 161038
2012-07-31 08:06:29 +00:00
Sylvestre Ledru a5202660fb Fix some minor typos
llvm-svn: 161036
2012-07-31 06:56:50 +00:00
Manuel Klimek 4b7740a9fe Document the result type of the matcher functions where
it's not obvious from the source code.

llvm-svn: 161035
2012-07-31 06:28:58 +00:00
John McCall f253834456 Introduce new queries on ObjCRuntime for how to interpret subscripts
on object pointers and whether pointer arithmetic on object pointers
is supported.  Make ObjFW interpret subscripts as pseudo-objects.
Based on a patch by Jonathan Schleifer.

llvm-svn: 161028
2012-07-31 05:14:30 +00:00
Rafael Espindola 06b2b4a7c9 Handle functions with struct arguments or return types and the regparm
attribute. It is a variation of the x86_64 ABI:

* A struct returned indirectly uses the first register argument to pass the
  pointer.
* Floats, Doubles and structs containing only one of them are not passed in
  registers.
* Other structs are split into registers if they fit on the remaining ones.
  Otherwise they are passed in memory.
* When a struct doesn't fit it still consumes the registers.

llvm-svn: 161022
2012-07-31 02:44:24 +00:00
Jordan Rose 3865c6e670 [analyzer] Add a test that messages to super invalidate ivars.
llvm-svn: 161021
2012-07-31 02:05:30 +00:00
Rafael Espindola 74ec5c03ca Attributes preceding a function declaration are first applied to the return
type and then propagated to the function. This was failing for destructors,
constructors and constructors templates since they don't have a return type.

Fix that by directly calling processTypeAttrs on the dummy type we use as the
return type in these cases.

llvm-svn: 161020
2012-07-31 01:54:04 +00:00
Aaron Ballman 1f10cc5eb4 No longer emitting a PCH file when using -fsyntax-only on a header file. Fixes PR13343.
llvm-svn: 161019
2012-07-31 01:21:00 +00:00
Jordan Rose 42e8d6497d [analyzer] Let CallEvent decide what goes in an inital stack frame.
This removes explicit checks for 'this' and 'self' from
Store::enterStackFrame. It also removes getCXXThisRegion() as a virtual
method on all CallEvents; it's now only implemented in the parts of the
hierarchy where it is relevant. Finally, it removes the option to ask
for the ParmVarDecls attached to the definition of an inlined function,
saving a recomputation of the result of getRuntimeDefinition().

No visible functionality change!

llvm-svn: 161017
2012-07-31 01:07:55 +00:00
Jordan Rose 4502b53c3b Explain why ACC_bottom should never occur in diagnosing ARC casts.
This is just a clarification on Fariborz's original patch, per e-mail
discussion. No functionality change.

llvm-svn: 161016
2012-07-31 01:07:43 +00:00
Douglas Gregor 721b14d1b3 When we encounter a code-completion token while parsing an ill-formed
lambda-introducer in Objective-C++11, fall back to treating the tokens
as an Objective-C message send to provide those (more likely)
completions. Fixes <rdar://problem/11980263>.

llvm-svn: 161015
2012-07-31 00:50:07 +00:00