Commit Graph

46144 Commits

Author SHA1 Message Date
Richard Smith 51445cd307 When setting the external visible declarations for a decl context, check
whether they replace any existing lookups in the context, rather than
accumulating a bunch of lookup results referring to the same entity.

llvm-svn: 184679
2013-06-24 01:46:41 +00:00
Richard Smith 6ea058245e Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test to
follow.

llvm-svn: 184678
2013-06-24 01:45:33 +00:00
Dmitri Gribenko c0510b9c97 Move comment on Sema::isFunctionPointerVarDecl() to the header file
llvm-svn: 184677
2013-06-24 01:33:34 +00:00
Dmitri Gribenko 761f801cb2 Documentation parsing: recognize \relates, \related, \relatesonly, \relatedonly
so that -Wdocumentation-unknown-command does not warn on these commands.
Fixes PR16092.

llvm-svn: 184676
2013-06-23 23:33:14 +00:00
Dmitri Gribenko 27cb3dd085 ArrayRef'ize Sema::CodeCompleteConstructorInitializer
Patch by Robert Wilhelm.

llvm-svn: 184675
2013-06-23 22:58:02 +00:00
Chandler Carruth 363817092e Fix the addition of Clang's profile runtime library to the link step
when specifying --coverage (or related) flags.

The system for doing this was based on the old LLVM-hosted profile_rt
library, and hadn't been updated for Linux to use the new compiler-rt
library. Also, it couldn't possibly work on multiarch or biarch systems
in many cases. The whole thing now works much the same as the sanitizer
libraries that are built and used out of the compiler-rt repo.

Note that other target OSes haven't been updated because I don't know if
they're doing anything special with the installation path of profile_rt.
I suspect however that *all* of these are wrong and would encourage
maintainers of each target to take a hard look at how compiler-rt
runtime libraries are linked on their platforms.

llvm-svn: 184666
2013-06-23 11:28:48 +00:00
Chandler Carruth 8907811e4b The makefile build system had two lists of the 32-bit runtime libraries
to build and one had grown out of sync. Put this list in a variable so
this doesn't happen again.

The whole thing here is somewhat suspicious as we don't support 32-bit
environments with a 64-bit bi-arch capable compiler, but none have
complained yet about this so I'm just leaving it alone.

llvm-svn: 184665
2013-06-23 10:10:25 +00:00
Chandler Carruth 7c2544216f Slightly loosen the test as there are other linker invocation patterns.
llvm-svn: 184663
2013-06-23 08:39:08 +00:00
Chandler Carruth b8ffa031df Add and tighten up tests for cross compiling tool selection. This now
verifies that we run the assembler and linker in the correct mode, and
that we can successfully use a bi-arch variant of a GCC installation in
a generic cross compilation invocation of Clang.

llvm-svn: 184662
2013-06-23 08:24:15 +00:00
Stephen Lin 9354fc5abd Add null check (resolves PR16423)
llvm-svn: 184661
2013-06-23 07:37:13 +00:00
David Majnemer 0f4743eaa1 AST: Clean up FriendObjectKind related decls
Allow the comments in the FriendObjectKind enumerator-list show up in
doxygen. Also, some small readability improvements in related functions.

llvm-svn: 184657
2013-06-23 03:38:10 +00:00
Dmitri Gribenko d666293435 Comment parsing: followup to r184610: allow multiple \returns
Remove unneeded member in CommentSema, add a test for the XML schema (the
schema already allowed multiple paragraphs in <ResultDiscussion>, but there
were no tests for that), fix HTML generation (it is not allowed to have <p>
inside <dl>).

llvm-svn: 184652
2013-06-22 23:03:37 +00:00
Richard Smith 392497bebe Fix assert if an attempt is made to explicitly instantiate an alias template.
Patch by Ismail Pazarbasi!

llvm-svn: 184650
2013-06-22 22:03:31 +00:00
Richard Smith 33937e76fd Add dumping support for DeclContext's StoredDeclsMap.
llvm-svn: 184648
2013-06-22 21:49:40 +00:00
David Blaikie 47c1150f50 DebugInfo: Support (using GNU extensions) for template template parameters and parameter packs
llvm-svn: 184644
2013-06-22 18:59:18 +00:00
Benjamin Kramer a157d0503d Remove duplicated case.
llvm-svn: 184640
2013-06-22 16:44:45 +00:00
Larisse Voufo b9bbaba6b1 Instantiation bug fix extension (cf. r184503) -- minor code fixes, including a typo that caused a runtime assertion after firing diagnosis for class definitions, with the 'template' keyword as template header, in friend declarations.
llvm-svn: 184634
2013-06-22 13:56:11 +00:00
Chandler Carruth b427c56399 Reword and reformat some of the "Multiarch" code in the toolchain setup.
There are fundamentally two different things that were getting conflated
here.

1) A bi-arch GCC toolchain install. This is not a full blown cross
   compiler, but it supports targetting both 32-bit and 64-bit variants
   of the same architecture using multilib OS installs and runtimes.

2) A "multiarch" Debian OS/runtime layout that lays out the libraries,
   headers, etc as-if there were going to be a full blown cross compiler
   even when in reality it is just a bi-arch GCC targeting two variants.
   Also, these tend to use oddly "canonicalized" triples without the
   vendor in them unlike the typical cross compiler runtime library
   search that vanilla GCC cross compilers perform.

Now, when we mean the bi-arch nature of GCC accomplished with just
a suffix or tweak to the GCC paths, we say 'Biarch' or something
related. When we mean the Debian layout of includes and libraries, we
say multiarch or reference the multiarch triple.

In the process of reading and often renaming stuff in all these places,
also reformat with clang-format. No functionality change should be going
on here, this is just tidying up.

llvm-svn: 184632
2013-06-22 11:35:51 +00:00
David Majnemer 626032f6fc Revert r184401 which reverted r183462.
The problem with r183462 was that we assumed that a diagnostic id of
zero would be silent.

This small correction to CheckDerivedToBaseConversion changes it's
behavior to omit the diagnostic when given a diagnostic id of zero.

This fix passes the test case added in r184402.

llvm-svn: 184631
2013-06-22 06:43:58 +00:00
Richard Trieu 9be9c6804f Extend -Wnon-pod-varargs to check calls made from member pointers.
llvm-svn: 184629
2013-06-22 02:30:38 +00:00
Alexander Kornienko 34a87e851a Fixed typo.
llvm-svn: 184625
2013-06-22 01:35:36 +00:00
Anna Zaks 27982c70fc [analyzer] Use output form collections’ count to decide if ObjC for loop should be entered
This fixes false positives by allowing us to know that a loop is always entered if
the collection count method returns a positive value and vice versa.

Addresses radar://14169391.

llvm-svn: 184618
2013-06-22 00:23:26 +00:00
Anna Zaks 56b4975bad [CFG] Set the “loop target” (back edge) for VisitObjCForCollectionStmt loops
Add the back edge info by creating a basic block, marked as loop target. This is
consistent with how other loops are processed, but was omitted from
VisitObjCForCollectionStmt.

llvm-svn: 184617
2013-06-22 00:23:20 +00:00
Richard Trieu 41bc0994c3 Extend -Wnon-pod-varargs to more cases, such as function pointers as return
types and function pointer arrays.

llvm-svn: 184616
2013-06-22 00:20:41 +00:00
David Blaikie 18cfbc53ee DebugInfo: Random tidying up/simplification
No functionality change intended.

llvm-svn: 184614
2013-06-22 00:09:36 +00:00
David Blaikie e5323aa921 Provide suggested no-arg calls for overloaded member functions missing calls
Reviewed by Richard Smith.

llvm-svn: 184612
2013-06-21 23:54:45 +00:00
Sean Silva 4c280bd3de [docs] `-fno-sanitize=` is accepted too.
llvm-svn: 184611
2013-06-21 23:50:58 +00:00
Fariborz Jahanian fb6f6f61ca [document parsing]: Allow multiple adjacent \return and the like
commands. Render them properly in XML output.
// rdar://14207725

llvm-svn: 184610
2013-06-21 23:49:29 +00:00
Tim Northover 1711cc930b Teach ARM va_arg to ignore empty structs.
Empty structs are ignored for parameter passing purposes, but va_arg was
incrementing the pointer anyway which could lead to va_list getting out of
sync.

llvm-svn: 184605
2013-06-21 23:05:33 +00:00
Tim Northover 1060eae78e Check for trivial constructibility before emptiness in ARM ABI.
According to the Itanium ABI (3.1.1), types with non-trivial copy constructors
passed by value should be passed indirectly, with the caller creating a
temporary.

We got this mostly correct, but forgot that empty structs can have non-trivial
constructors too and passed them incorrectly. This simply reverses the order of
the check.

llvm-svn: 184603
2013-06-21 22:49:34 +00:00
Justin Holewinski bcb9055083 [NVPTX] Fix inline asm test case to use LLVM IR instead of PTX so it works even when the NVPTX target is not built
llvm-svn: 184601
2013-06-21 22:39:56 +00:00
David Blaikie 4686b16226 DebugInfo test: Rename function to avoid using the same name as a type
llvm-svn: 184598
2013-06-21 21:58:54 +00:00
David Blaikie bea8cc7113 Aggregate & rename limit debug info tests.
llvm-svn: 184596
2013-06-21 21:23:18 +00:00
Nick Lewycky 92a6c74bbf Fix a leak of TargetMachine in clang. We'll continue to leak it on purpose if
given -disable-free. (Reviewed by John McCall over IRC.)

llvm-svn: 184595
2013-06-21 21:15:32 +00:00
David Blaikie 940ca4d462 PR16214: Debug info for types first used via pointers or qualified types & later require definitions
llvm-svn: 184594
2013-06-21 21:03:11 +00:00
Matt Beaumont-Gay 76d0b46dd1 Propagate the invalid bit from bases to derived template classes.
Fixes PR16292.

llvm-svn: 184581
2013-06-21 18:58:32 +00:00
Justin Holewinski 7ceab3a892 [NVPTX] Add NVPTX register constraints
llvm-svn: 184578
2013-06-21 18:51:24 +00:00
Larisse Voufo d8576e19ce Extend template instantiation bug fix (r184503) with fixit test
llvm-svn: 184577
2013-06-21 18:49:56 +00:00
Manuel Klimek 836c2868f9 Add an option to not indent declarations when breaking after the type.
Make that option the default for LLVM style.

llvm-svn: 184563
2013-06-21 17:25:42 +00:00
Jordan Rose e83cb0922b Revert "[analyzer] Handle zeroing CXXConstructExprs."
Per review from Anna, this really should have been two commits, and besides
it's causing problems on our internal buildbot. Reverting until these have
been worked out.

This reverts r184511 / 98123284826bb4ce422775563ff1a01580ec5766.

llvm-svn: 184561
2013-06-21 16:30:32 +00:00
Douglas Gregor 963c553564 [Modules] If a module map resides in a system header directory, treat it as a system module.
This prevents -pedantic from causing warnings in the system headers
used to create modules. Fixes <rdar://problem/14201171>.

llvm-svn: 184560
2013-06-21 16:28:10 +00:00
Larisse Voufo dd08c59317 Add basic fixit test to template instantiation bug fix (r184503)
llvm-svn: 184559
2013-06-21 15:56:15 +00:00
Samuel Benzaquen c6f2c9b566 Add support for polymorphic matchers. Use runtime type checking to determine the right polymorphic overload to use.
llvm-svn: 184558
2013-06-21 15:51:31 +00:00
Reid Kleckner f9794c15e7 Disable an assertion death test when using MSVC's assert()
MSVC's debug runtime prints assertion failures in wide characters, which
gtest doesn't understand.

llvm-svn: 184544
2013-06-21 12:58:12 +00:00
Reid Kleckner 23f4c4b64f [ms-cxxabi] Destroy temporary record arguments in the callee
Itanium destroys them in the caller at the end of the full expression,
but MSVC destroys them in the callee.  This is further complicated by
the need to emit EH-only destructor cleanups in the caller.

This should help clang compile MSVC's debug iterators more correctly.
There is still an outstanding issue in PR5064 of a memcpy emitted by the
LLVM backend, which is not correct for C++ records.

Fixes PR16226.

Reviewers: rjmccall

Differential Revision: http://llvm-reviews.chandlerc.com/D929

llvm-svn: 184543
2013-06-21 12:45:15 +00:00
Manuel Klimek cd5e799833 Improve documentation for AST matchers.
llvm-svn: 184538
2013-06-21 09:59:59 +00:00
David Blaikie 03039fe9ba DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' and add '[def]' for non-decl tag types
This is to make test cases looking for definitions more legible by
making the definition explicit rather than just the absence of '[fwd]'.
This allowed the debug-info-record tests to be rephrased - and in the
interests of reducing the number of individual test cases/invocations we
have, I merged them into one file, separated them with namespaces (&
then moved them to C++ because namespaces are great). If they need to
remain 'C' only tests, they can be moved back. (I didn't group them with
'debug-info-class.cpp' because these tests only apply to
-fno-limit-debug-info)

I removed the pieces of code that would cause these tests to pass under
-flimit-debug-info to ensure the tests remain relevant to their fixes
should we ever improve -flimit-debug-info to catch that kind of code.

This commit is version locked with the corresponding change to
DebugInfo.h in LLVM. Except some transient buildbot fallout.

llvm-svn: 184524
2013-06-21 03:41:46 +00:00
Eli Friedman 6f0cd6e866 Delete dead code.
llvm-svn: 184520
2013-06-21 02:13:57 +00:00
Eli Friedman 81e4e4e5cc Add test.
llvm-svn: 184519
2013-06-21 02:09:51 +00:00
Sean Silva 8d5ec19730 [docs] Add link to presentation slides.
llvm-svn: 184518
2013-06-21 02:09:29 +00:00