summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* We want the dwarf AT_producer for assembly source files to match clang'sKevin Enderby2013-01-172-0/+13
| | | | | | | | | | | | | | | | AT_producer. Which includes clang's version information so we can tell which version of the compiler was used. This is second of the two steps to allow us to do this. The first was a change to llvm-mc with revision 172630 to provide a method to set the AT_producer string. This second step has the clang driver passing the value of getClangFullVersion() via the new flag -dwarf-debug-producer when invoking the integrated assembler on assembly source files. Then using the new setDwarfDebugProducer() method to set the AT_producer string. rdar://12888242 llvm-svn: 172758
* Do not pass -pie flag to linker if -shared specified. This matchesPeter Collingbourne2013-01-171-0/+6
| | | | | | | the gcc driver and makes it possible to add -pie to $CC or similar and have it apply in the right places. llvm-svn: 172753
* [ms-inline asm] Updates and test case for r172743.Chad Rosier2013-01-172-17/+29
| | | | | | Part of rdar://12576868 llvm-svn: 172744
* Format strings: correct signedness if already correcting width (%d,%u).Jordan Rose2013-01-172-0/+29
| | | | | | | | | | | | It is valid to do this: printf("%u", (int)x); But if we see this: printf("%lu", (int)x); ...our fixit should suggest %d, not %u. llvm-svn: 172739
* Convert test/FixIt/format-darwin.m to use relative line numbers.Jordan Rose2013-01-171-46/+42
| | | | llvm-svn: 172738
* Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are ↵Joey Gouly2013-01-172-0/+12
| | | | | | not supported. llvm-svn: 172732
* Add initial rough support for synthesizing linker options when passedChandler Carruth2013-01-171-0/+16
| | | | | | | | | | | -fopenmp in the link step on Linux. There is probably more tweaking that will need to take place to get good support for linking the relevant libraries on all Linux distributions and/or on other platforms, but this get's the ball moving and allows Clang to build programs which contain OpenMP pragmas that can be safely ignored by a compiler that doesn't implement them, and yet makes direct calls into the OpenMP runtime. llvm-svn: 172715
* Improve -Wreorder to handle cases of anonymous class member orderingDavid Blaikie2013-01-171-0/+11
| | | | llvm-svn: 172707
* clang/test/Index/code-completion-skip-bodies.cpp: Check stdout and stderr ↵NAKAMURA Takumi2013-01-171-6/+6
| | | | | | | | individually, rather than mixed output of stdout and stderr with 2>&1. XFAIL(s) are removed. llvm-svn: 172705
* Add test for PR12938, fixed by Richard Smith in r172691David Blaikie2013-01-171-0/+5
| | | | llvm-svn: 172697
* Suppress all -Wunused-value warnings from macro body expansions.Matt Beaumont-Gay2013-01-173-22/+40
| | | | | | | | | | | | | | | | | | | This is inspired by a number of false positives in real code, including PR14968. I've added test cases reduced from these false positives to test/Sema/unused-expr.c, as well as corresponding test cases that pass the offending expressions as arguments to a no-op macro to ensure that we do warn there. This also removes my previous tweak from r166522/r166534, so that we warn on unused cast expressions in macro arguments. There were several test cases that were using -Wunused-value to test general diagnostic emission features; I changed those to use other warnings or warn on a macro argument expression. I stared at the test case for PR14399 for a while with Richard Smith and we believe the new test case exercises the same codepaths as before. llvm-svn: 172696
* Add a comment for DanielDouglas Gregor2013-01-171-0/+2
| | | | llvm-svn: 172695
* Test that we correctly handle reversion of line splicing etc in raw stringRichard Smith2013-01-171-0/+4
| | | | | | literals. As suggested by Sean Silva. llvm-svn: 172694
* [IRgen] Update modules autolink metadata to use module flags (as now specifiedDaniel Dunbar2013-01-171-1/+3
| | | | | | in the LangRef). llvm-svn: 172692
* Implement C++11 semantics for [[noreturn]] attribute. This required splittingRichard Smith2013-01-176-8/+65
| | | | | | | | it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as affecting the function type, whereas [[noreturn]] does not). llvm-svn: 172691
* Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn onRichard Smith2013-01-172-1/+92
| | | | | | | expressions which have undefined behavior due to multiple unsequenced modifications or an unsequenced modification and use of a variable. llvm-svn: 172690
* clang/test/Modules/compiler_builtins.m: Mark this as XFAIL:win32 for now. ↵NAKAMURA Takumi2013-01-171-0/+1
| | | | | | Investigating. llvm-svn: 172689
* Treat hidden Objective-C protocol definitions as if they wereDouglas Gregor2013-01-174-1/+44
| | | | | | | undefined, and don't find methods or protocols within those protocol definitions. This completes <rdar://problem/10634711>. llvm-svn: 172686
* Implement a fixit for -Wmain-return-typeDmitri Gribenko2013-01-172-1/+50
| | | | llvm-svn: 172684
* objC block layout: Patch reorders block layout to Fariborz Jahanian2013-01-177-171/+127
| | | | | | produce more inline layout metadata. // rdar://12752901 llvm-svn: 172683
* [objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a ↵Argyrios Kyrtzidis2013-01-164-0/+12
| | | | | | | | | | | | | | | | | | dictionary literal if we can see the elements of the arrays. for example: NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]]; --> NSDictionary *dict = @{ @"A" : @"1", @"B" : @"2" }; rdar://12428166 llvm-svn: 172679
* Delay linkage checks when validating the weakref attribute.Rafael Espindola2013-01-161-1/+4
| | | | llvm-svn: 172678
* Fixes crash when illegal function definitions are deleted or defaulted. ↵Aaron Ballman2013-01-161-0/+21
| | | | | | Fixes PR14577. llvm-svn: 172676
* Check for internal weak decls after merging.Rafael Espindola2013-01-162-0/+13
| | | | | | | | This fixes pr14946. The problem was that the linkage computation was done too early, so things like "extern int a;" would be given external linkage, even if a previous declaration was static. llvm-svn: 172667
* Rework the traversal of Objective-C categories and extensions toDouglas Gregor2013-01-165-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consider (sub)module visibility. The bulk of this change replaces myriad hand-rolled loops over the linked list of Objective-C categories/extensions attached to an interface declaration with loops using one of the four new category iterator kinds: visible_categories_iterator: Iterates over all visible categories and extensions, hiding any that have their "hidden" bit set. This is by far the most commonly used iterator. known_categories_iterator: Iterates over all categories and extensions, ignoring the "hidden" bit. This tends to be used for redeclaration-like traversals. visible_extensions_iterator: Iterates over all visible extensions, hiding any that have their "hidden" bit set. known_extensions_iterator: Iterates over all extensions, whether they are visible to normal name lookup or not. The effect of this change is that any uses of the visible_ iterators will respect module-import visibility. See the new tests for examples. Note that the old accessors for categories and extensions are gone; there are *Raw() forms for some of them, for those (few) areas of the compiler that have to manipulate the linked list of categories directly. This is generally discouraged. Part two of <rdar://problem/10634711>. llvm-svn: 172665
* Add raw string literal versus C preprocessor test, suggested by James Dennett.Richard Smith2013-01-161-0/+9
| | | | llvm-svn: 172660
* Fix recent test for more diverse environments.Tim Northover2013-01-161-2/+5
| | | | | | | I think the main issue was the lack of -ffreestanding, which pulled in the host's stdint.h. After that things went rapidly downhill. llvm-svn: 172653
* Correct order of operands forwarding NEON vfma to LLVM fmaTim Northover2013-01-161-0/+16
| | | | llvm-svn: 172650
* Add testcase missed yesterday. Patch from Paul Robinson.Eric Christopher2013-01-161-0/+41
| | | | llvm-svn: 172648
* No longer crashing with an assert when __has_include or __has_include_next ↵Aaron Ballman2013-01-161-1/+23
| | | | | | is used outside of a preprocessor directive. This fixes PR14837. llvm-svn: 172639
* Teach global selector lookup to ignore hidden methods, which occurDouglas Gregor2013-01-164-0/+32
| | | | | | | when the methods are declared in a submodule that has not yet been imported. Part of <rdar://problem/10634711>. llvm-svn: 172635
* First step in implementation of mips16 and nomips16 attributes.Reed Kotler2013-01-162-0/+34
| | | | | | Waiting for new llvm attribute code for the next step. llvm-svn: 172626
* [PCH/Modules] Change how macro [re]definitions are de/serialized.Argyrios Kyrtzidis2013-01-161-0/+28
| | | | | | | | | | | | | | | | | | Previously we would serialize the macro redefinitions as a list, part of the identifier, and try to chain them together across modules individually without having the info that they were already chained at definition time. Change this by serializing the macro redefinition chain and then try to synthesize the chain parts across modules. This allows us to correctly pinpoint when 2 different definitions are ambiguous because they came from unrelated modules. Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH is redefined without undef'ing it first. rdar://13016031 llvm-svn: 172620
* Fix uninitialized bool flag access in SanitizerArgs parserAlexey Samsonov2013-01-161-0/+3
| | | | llvm-svn: 172605
* clang/test/Driver/darwin-sdkroot.c: Suppress this on msys bash, to introduce ↵NAKAMURA Takumi2013-01-162-0/+7
| | | | | | | | the feature "shell-preserves-root". MSYS transforms '/' to 'X:/mingwroot/'. llvm-svn: 172598
* [analyzer] Add an annotation to allow suppression of direct ivarAnna Zaks2013-01-161-2/+6
| | | | | | assignment llvm-svn: 172597
* [analyzer] Fix warning typo.Anna Zaks2013-01-161-4/+4
| | | | llvm-svn: 172596
* Add -fmodules-autolink/-fno-modules-autolink (defaults to on) so thatDouglas Gregor2013-01-162-1/+7
| | | | | | users can explicitly enable/disable modules autolinking. llvm-svn: 172592
* Collect both normal and static data members of a class in sourceEric Christopher2013-01-163-5/+5
| | | | | | | | | | order. Describe static data members to metadata using new interfaces. Part of PR14471. Patch by Paul Robinson! llvm-svn: 172591
* One can have an unavailable method overridden by an available method,Douglas Gregor2013-01-161-4/+4
| | | | | | | but not vice-versa. Fix bug introduced in r172567 and noticed by Jordan, thanks! llvm-svn: 172586
* Apply adjustment to function- and array-typed non-type templateDouglas Gregor2013-01-161-0/+15
| | | | | | | parameters (per C++ [temp.param]p8) when computing the type of a reference to a non-type template parameter. Fixes <rdar://problem/13000548>. llvm-svn: 172585
* When checking availability attributes for consistency between anDouglas Gregor2013-01-151-0/+13
| | | | | | | | overriding and overridden method, allow the overridden method to have a narrower contract (introduced earlier, deprecated/obsoleted later) than the overriding method. Fixes <rdar://problem/12992023>. llvm-svn: 172567
* [driver/Darwin] Adjust SDKROOT handling code to not generate "-isysroot /".Daniel Dunbar2013-01-151-1/+11
| | | | llvm-svn: 172548
* Add a test for -Wsemicolon-before-method-body fixitDmitri Gribenko2013-01-151-0/+22
| | | | llvm-svn: 172545
* Don't crash when binding a reference to a temporary pointer created fromRichard Smith2013-01-151-0/+7
| | | | | | | | resolving an overloaded function reference within an initializer list. Previously we would try to resolve the overloaded function reference without first stripping off the InitListExpr wrapper. llvm-svn: 172517
* PR14950: Fix out-of-bounds function parameter access in literal operator lookup.Richard Smith2013-01-151-0/+6
| | | | llvm-svn: 172514
* PR14918: Don't confuse braced-init-lists after template variable declarationsRichard Smith2013-01-151-0/+11
| | | | | | | | | | | with function definitions. We really should remove Parser::isDeclarationAfterDeclarator entirely, since it's meaningless in C++11 (an open brace could be either a function definition or an initializer, which is what it's trying to differentiate between). The other caller of it happens to be correct right now... llvm-svn: 172510
* Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!Douglas Gregor2013-01-151-0/+17
| | | | llvm-svn: 172509
* Fix behavior of [[gnu::]] function attributes. Per g++'s behavior, theseRichard Smith2013-01-152-1/+11
| | | | | | | | | | | attributes appertain to a declaration, even though they would be much more naturally modelled as appertaining to a function type. Previously, we would try to distribute them from the declarator to the function type, then reject them for being at an incorrect location. Now, we just distribute them as far as the declarator; the existing attribute handling code can actually apply them there just fine. llvm-svn: 172504
* [driver] Warnings for warning options are handled by the frontend. The ↵Chad Rosier2013-01-152-6/+5
| | | | | | | | | | driver needs to process the warning options to setup diagnostic state, but should not be emitting warnings as these would be rudndant with what the frontend emits. rdar://13001556 llvm-svn: 172497
OpenPOWER on IntegriCloud