summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Avoid adding entries to the DeclContext lookup table multiple times when lazilyRichard Smith2013-06-242-5/+9
| | | | | | | | | | | | | | | | | constructing a lookup table. Previously, buildLookup would add lookup table entries for each item lexically within the DC, and adding the first entry with a given name would trigger the external source to add all its entries with that name. Then buildLookup would carry on and re-add those entries all over again. Instead, follow a simple rule: a declaration from an external source is only ever made visible by the external source. One exception to this: since we don't usually build a lookup table for the TU in C, and we never serialize one, we don't expect the external source to provide lookups in the TU in C, so we build those ones ourselves. llvm-svn: 184696
* DebugInfo: ensure negative enumerators are emitted as suchDavid Blaikie2013-06-242-2/+13
| | | | | | | | | | There's still a problem here - since we're not appropriately using the signedness/range of the enum to chooset the encoding and emission of enumerators, but GCC has some bugs around this too so I assume that's not /such/ a high priority though I may get to it soon out of completeness. llvm-svn: 184695
* DebugInfo: Merge a bad debug info enum test into a good oneDavid Blaikie2013-06-242-17/+23
| | | | | | The assembly generation testing has been moved to an LLVM test case. llvm-svn: 184693
* Slightly improve cross-module merging for function templates.Richard Smith2013-06-245-7/+73
| | | | llvm-svn: 184689
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-2412-61/+188
| | | | | | | | Original patch by Fariborz Jahanian; extended by me. Fixes rdar://14124644 llvm-svn: 184688
* When setting the external visible declarations for a decl context, checkRichard Smith2013-06-243-8/+49
| | | | | | | 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
* Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test toRichard Smith2013-06-248-21/+34
| | | | | | follow. llvm-svn: 184678
* Move comment on Sema::isFunctionPointerVarDecl() to the header fileDmitri Gribenko2013-06-242-3/+4
| | | | llvm-svn: 184677
* Documentation parsing: recognize \relates, \related, \relatesonly, \relatedonlyDmitri Gribenko2013-06-232-0/+24
| | | | | | | so that -Wdocumentation-unknown-command does not warn on these commands. Fixes PR16092. llvm-svn: 184676
* ArrayRef'ize Sema::CodeCompleteConstructorInitializerDmitri Gribenko2013-06-233-20/+20
| | | | | | Patch by Robert Wilhelm. llvm-svn: 184675
* Fix the addition of Clang's profile runtime library to the link stepChandler Carruth2013-06-232-1/+38
| | | | | | | | | | | | | | | | | | 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
* The makefile build system had two lists of the 32-bit runtime librariesChandler Carruth2013-06-231-5/+7
| | | | | | | | | | | 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
* Slightly loosen the test as there are other linker invocation patterns.Chandler Carruth2013-06-231-6/+6
| | | | llvm-svn: 184663
* Add and tighten up tests for cross compiling tool selection. This nowChandler Carruth2013-06-231-8/+24
| | | | | | | | 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
* Add null check (resolves PR16423)Stephen Lin2013-06-232-15/+23
| | | | llvm-svn: 184661
* AST: Clean up FriendObjectKind related declsDavid Majnemer2013-06-231-7/+7
| | | | | | | Allow the comments in the FriendObjectKind enumerator-list show up in doxygen. Also, some small readability improvements in related functions. llvm-svn: 184657
* Comment parsing: followup to r184610: allow multiple \returnsDmitri Gribenko2013-06-226-25/+19
| | | | | | | | | 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
* Fix assert if an attempt is made to explicitly instantiate an alias template.Richard Smith2013-06-222-4/+19
| | | | | | Patch by Ismail Pazarbasi! llvm-svn: 184650
* Add dumping support for DeclContext's StoredDeclsMap.Richard Smith2013-06-223-3/+87
| | | | llvm-svn: 184648
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-225-38/+52
| | | | | | and parameter packs llvm-svn: 184644
* Remove duplicated case.Benjamin Kramer2013-06-221-1/+0
| | | | llvm-svn: 184640
* Instantiation bug fix extension (cf. r184503) -- minor code fixes, including ↵Larisse Voufo2013-06-223-30/+42
| | | | | | 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
* Reword and reformat some of the "Multiarch" code in the toolchain setup.Chandler Carruth2013-06-222-208/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert r184401 which reverted r183462.David Majnemer2013-06-223-30/+42
| | | | | | | | | | | | 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
* Extend -Wnon-pod-varargs to check calls made from member pointers.Richard Trieu2013-06-223-4/+8
| | | | llvm-svn: 184629
* Fixed typo.Alexander Kornienko2013-06-221-1/+1
| | | | llvm-svn: 184625
* [analyzer] Use output form collections’ count to decide if ObjC for loop ↵Anna Zaks2013-06-223-13/+328
| | | | | | | | | | | 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
* [CFG] Set the “loop target” (back edge) for VisitObjCForCollectionStmt loopsAnna Zaks2013-06-221-4/+11
| | | | | | | | 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
* Extend -Wnon-pod-varargs to more cases, such as function pointers as returnRichard Trieu2013-06-224-15/+77
| | | | | | types and function pointer arrays. llvm-svn: 184616
* DebugInfo: Random tidying up/simplificationDavid Blaikie2013-06-221-24/+16
| | | | | | No functionality change intended. llvm-svn: 184614
* Provide suggested no-arg calls for overloaded member functions missing callsDavid Blaikie2013-06-214-19/+61
| | | | | | Reviewed by Richard Smith. llvm-svn: 184612
* [docs] `-fno-sanitize=` is accepted too.Sean Silva2013-06-211-1/+1
| | | | llvm-svn: 184611
* [document parsing]: Allow multiple adjacent \return and the likeFariborz Jahanian2013-06-214-21/+22
| | | | | | | commands. Render them properly in XML output. // rdar://14207725 llvm-svn: 184610
* Teach ARM va_arg to ignore empty structs.Tim Northover2013-06-212-0/+33
| | | | | | | | 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
* Check for trivial constructibility before emptiness in ARM ABI.Tim Northover2013-06-212-3/+28
| | | | | | | | | | | | 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
* [NVPTX] Fix inline asm test case to use LLVM IR instead of PTX so it works ↵Justin Holewinski2013-06-211-12/+12
| | | | | | even when the NVPTX target is not built llvm-svn: 184601
* DebugInfo test: Rename function to avoid using the same name as a typeDavid Blaikie2013-06-211-1/+1
| | | | llvm-svn: 184598
* Aggregate & rename limit debug info tests.David Blaikie2013-06-212-2/+24
| | | | llvm-svn: 184596
* Fix a leak of TargetMachine in clang. We'll continue to leak it on purpose ifNick Lewycky2013-06-213-1/+4
| | | | | | given -disable-free. (Reviewed by John McCall over IRC.) llvm-svn: 184595
* PR16214: Debug info for types first used via pointers or qualified types & ↵David Blaikie2013-06-212-1/+22
| | | | | | later require definitions llvm-svn: 184594
* Propagate the invalid bit from bases to derived template classes.Matt Beaumont-Gay2013-06-212-0/+13
| | | | | | Fixes PR16292. llvm-svn: 184581
* [NVPTX] Add NVPTX register constraintsJustin Holewinski2013-06-212-3/+52
| | | | llvm-svn: 184578
* Extend template instantiation bug fix (r184503) with fixit testLarisse Voufo2013-06-211-3/+11
| | | | llvm-svn: 184577
* Add an option to not indent declarations when breaking after the type.Manuel Klimek2013-06-213-21/+48
| | | | | | Make that option the default for LLVM style. llvm-svn: 184563
* Revert "[analyzer] Handle zeroing CXXConstructExprs."Jordan Rose2013-06-213-124/+78
| | | | | | | | | | 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
* [Modules] If a module map resides in a system header directory, treat it as ↵Douglas Gregor2013-06-2111-33/+75
| | | | | | | | | a system module. This prevents -pedantic from causing warnings in the system headers used to create modules. Fixes <rdar://problem/14201171>. llvm-svn: 184560
* Add basic fixit test to template instantiation bug fix (r184503)Larisse Voufo2013-06-211-0/+3
| | | | llvm-svn: 184559
* Add support for polymorphic matchers. Use runtime type checking to determine ↵Samuel Benzaquen2013-06-2118-301/+607
| | | | | | the right polymorphic overload to use. llvm-svn: 184558
* Disable an assertion death test when using MSVC's assert()Reid Kleckner2013-06-211-3/+5
| | | | | | | MSVC's debug runtime prints assertion failures in wide characters, which gtest doesn't understand. llvm-svn: 184544
* [ms-cxxabi] Destroy temporary record arguments in the calleeReid Kleckner2013-06-219-7/+342
| | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud