summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add the global namespace (the "::" namespace specifier) to the list ofKaelyn Uhrain2013-06-243-6/+11
| | | | | | namespaces to try for potential typo corrections. llvm-svn: 184762
* Check the canonical parameter type with getAs<>() in a static checkerReid Kleckner2013-06-241-1/+2
| | | | | | This will prevent breakage when I introduce the DecayedType sugar node. llvm-svn: 184755
* Add some invalid-decl checks to clang_Type_getOffsetOf.Matt Beaumont-Gay2013-06-241-37/+11
| | | | | | | print-size-type.cpp was checking for specific record layout output for invalid decls; I've removed the checks but left the records as tests for not crashing. llvm-svn: 184751
* [Sema] Call CheckParmForFunctionDef on ObjC method parametersReid Kleckner2013-06-242-0/+24
| | | | | | | CheckParmForFunctionDef performs standard checks for type completeness and other things like a destructor check for the MSVC++ ABI. llvm-svn: 184740
* clang/test/Driver/coverage-ld.c: Tweak expressions to match dosish pathsep ↵NAKAMURA Takumi2013-06-241-2/+2
| | | | | | on win32 hosts. llvm-svn: 184726
* The profile library must come before the C library so that it can useChandler Carruth2013-06-241-2/+2
| | | | | | atexit. llvm-svn: 184708
* Avoid adding entries to the DeclContext lookup table multiple times when lazilyRichard Smith2013-06-241-4/+0
| | | | | | | | | | | | | | | | | 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-241-1/+12
| | | | | | | | | | 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-244-0/+61
| | | | llvm-svn: 184689
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-246-40/+107
| | | | | | | | 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-242-1/+17
| | | | | | | 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
* Documentation parsing: recognize \relates, \related, \relatesonly, \relatedonlyDmitri Gribenko2013-06-231-0/+19
| | | | | | | so that -Wdocumentation-unknown-command does not warn on these commands. Fixes PR16092. llvm-svn: 184676
* Fix the addition of Clang's profile runtime library to the link stepChandler Carruth2013-06-231-0/+19
| | | | | | | | | | | | | | | | | | 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
* 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-231-0/+9
| | | | llvm-svn: 184661
* Comment parsing: followup to r184610: allow multiple \returnsDmitri Gribenko2013-06-223-13/+16
| | | | | | | | | 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-221-1/+8
| | | | | | Patch by Ismail Pazarbasi! llvm-svn: 184650
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-222-18/+21
| | | | | | and parameter packs llvm-svn: 184644
* Revert r184401 which reverted r183462.David Majnemer2013-06-221-3/+6
| | | | | | | | | | | | 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-221-3/+3
| | | | llvm-svn: 184629
* [analyzer] Use output form collections’ count to decide if ObjC for loop ↵Anna Zaks2013-06-222-5/+153
| | | | | | | | | | | 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
* Extend -Wnon-pod-varargs to more cases, such as function pointers as returnRichard Trieu2013-06-221-0/+36
| | | | | | types and function pointer arrays. llvm-svn: 184616
* Provide suggested no-arg calls for overloaded member functions missing callsDavid Blaikie2013-06-211-1/+27
| | | | | | Reviewed by Richard Smith. llvm-svn: 184612
* [document parsing]: Allow multiple adjacent \return and the likeFariborz Jahanian2013-06-212-10/+7
| | | | | | | commands. Render them properly in XML output. // rdar://14207725 llvm-svn: 184610
* Teach ARM va_arg to ignore empty structs.Tim Northover2013-06-211-0/+27
| | | | | | | | 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-211-0/+25
| | | | | | | | | | | | 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
* PR16214: Debug info for types first used via pointers or qualified types & ↵David Blaikie2013-06-211-0/+14
| | | | | | later require definitions llvm-svn: 184594
* Propagate the invalid bit from bases to derived template classes.Matt Beaumont-Gay2013-06-211-0/+9
| | | | | | Fixes PR16292. llvm-svn: 184581
* [NVPTX] Add NVPTX register constraintsJustin Holewinski2013-06-211-0/+40
| | | | llvm-svn: 184578
* Extend template instantiation bug fix (r184503) with fixit testLarisse Voufo2013-06-211-3/+11
| | | | llvm-svn: 184577
* Revert "[analyzer] Handle zeroing CXXConstructExprs."Jordan Rose2013-06-212-75/+68
| | | | | | | | | | 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-213-0/+13
| | | | | | | | | 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
* [ms-cxxabi] Destroy temporary record arguments in the calleeReid Kleckner2013-06-213-1/+243
| | | | | | | | | | | | | | | | | | 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
* DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' ↵David Blaikie2013-06-218-52/+41
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add test.Eli Friedman2013-06-211-2/+3
| | | | llvm-svn: 184519
* Delete dead code.Eli Friedman2013-06-211-2/+1
| | | | llvm-svn: 184517
* Add missing test.Eli Friedman2013-06-211-0/+11
| | | | llvm-svn: 184515
* [analyzer] Handle zeroing CXXConstructExprs.Jordan Rose2013-06-212-68/+75
| | | | | | | | | | | | | | | | | Certain expressions can cause a constructor invocation to zero-initialize its object even if the constructor itself does no initialization. The analyzer now handles that before evaluating the call to the constructor, using the same "default binding" mechanism that calloc() uses, rather than simply ignoring the zero-initialization flag. As a bonus, trivial default constructors are now no longer inlined; they are instead processed explicitly by ExprEngine. This has a (positive) effect on the generated path edges: they no longer stop at a default constructor call unless there's a user-provided implementation. <rdar://problem/14212563> llvm-svn: 184511
* Add test header missing from r184504.Douglas Gregor2013-06-211-0/+3
| | | | llvm-svn: 184505
* When building a module, keep *all* declared methods in the global method pool.Douglas Gregor2013-06-213-0/+9
| | | | | | | | | | | | | | | | | As an optimization, we only kept declared methods with distinct signatures in the global method pool, to keep the method lists small. Under modules, however, one could have two different methods with the same signature that occur in different (sub)modules. If only the later submodule is important, message sends to 'id' with that selector would fail because the first method (the only one that got into the method pool) was hidden. When building a module, keep *all* of the declared methods. I did a quick check of both module build time and uses of modules, and found no performance regression despite this causing us to keep more methods in the global method pool. Fixes <rdar://problem/14148896>. llvm-svn: 184504
* Bug Fix: Template explicit instantiations should not have definitions ↵Larisse Voufo2013-06-211-0/+52
| | | | | | (FixIts yet to be tested.) llvm-svn: 184503
* Add a couple more tests.Eli Friedman2013-06-202-0/+5
| | | | llvm-svn: 184501
* Update a comment to clarify that searching the target triple binChandler Carruth2013-06-2035-0/+69
| | | | | | | | | | | | | | directory for programs used by the driver is actually the standard behavior we want to be compatible with GCC cross compilers -- it isn't specific to SUSE or any other distro. Also start fleshing out testing of the different cross compilation patterns, both with a new very bare-bones tree of cross compilers and by extending the multilib trees. Currently, we don't correctly model doing a cross compile using the non-triple target of a bi-arch GCC install, but I'll add support for that (and tests) next. llvm-svn: 184499
* Fix a crash with __flaot128 noticed by Eli.Nico Weber2013-06-201-1/+12
| | | | llvm-svn: 184498
OpenPOWER on IntegriCloud