summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* objectiveC++: When throwing c++ exception of Fariborz Jahanian2013-01-101-1/+17
| | | | | | | an objectiveC object, use objc_exception_throw to raise the exception. // rdar://12605907 llvm-svn: 172091
* Error if an anonymous DiagGroup is referenced multiple times.Jordan Rose2013-01-104-0/+119
| | | | | | | | | | | Not only is this inefficient for TableGen, it's annoying for maintenance when renaming warning flags (unusual) or adding those flags to a group (more likely). This uses the new fix-it infrastructure for LLVM's SourceMgr/SMDiagnostic, as well as a few changes to TableGen to track more source information. llvm-svn: 172087
* Do not add newline in empty blocks.Manuel Klimek2013-01-105-16/+16
| | | | | | | void f() {} now gets formatted in one line. llvm-svn: 172067
* Improvements to function type and ObjC block formatting.Daniel Jasper2013-01-102-4/+4
| | | | | | | | | | | | | | | | | | | | | Before: int (^myBlock) (int) = ^(int num) {} A<void ()>; int (*b)(int); After: int (^myBlock)(int) = ^(int num) {} A<void()>; int(*b)(int); For function types and function pointer types, this patch only makes the behavior consistent (for types that are keywords and other types). For the latter function pointer type declarations, we'll probably want to add a space after "int". Also added LangOpts.Bool = 1, so we handle "A<bool()>" appropriately Moved the LangOpts-settings to a public place for use by tests and clang-format binary. llvm-svn: 172065
* [Mips] Pass a combination of +soft-float and -mips16-hard-float flags toSimon Atanasyan2013-01-101-0/+41
| | | | | | the backend if hard float ABI is selected under -mips16 mode. llvm-svn: 172062
* r172047 lacked a test (due to incomplete OpenCL support in clang). Use a ↵David Tweed2013-01-101-0/+29
| | | | | | | | | modified version of a test by Joey Gouly to use attributes to materialise the unsupported types and test vector shifts. llvm-svn: 172053
* Enable intel_ocl_bicc for x86_64 target only. Remove fix from 171969 that ↵Guy Benyei2013-01-101-0/+1
| | | | | | enabled this extension for multiple targets. llvm-svn: 172052
* Don't assert in codegen on static data members which have NoLinkage. FixesNick Lewycky2013-01-101-0/+20
| | | | | | PR14825! llvm-svn: 172031
* Formatter: @optional and @required go on their own line.Nico Weber2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | Previously: @protocol myProtocol - (void)mandatoryWithInt:(int)i; @optional - (void) optional; @required - (void) required; @end Now: @protocol myProtocol - (void)mandatoryWithInt:(int)i; @optional - (void)optional; @required - (void)required; @end llvm-svn: 172023
* Formatter: Add support for @implementation.Nico Weber2013-01-091-2/+2
| | | | | | | Just reuse the @interface code for this. It accepts slightly more than necessary (@implementation cannot have protocol lists), but that's ok. llvm-svn: 172019
* [PreprocessingRecord] A macro expansion can be reported out-of-order in ↵Argyrios Kyrtzidis2013-01-091-0/+5
| | | | | | | | | | | | cases when there are macro expansions inside macro arguments where the arguments are not expanded in the same order as listed; don't assert that all macro expansions are in source order. rdar://12397063 llvm-svn: 172018
* Issue warning when case value is too large to fitFariborz Jahanian2013-01-091-0/+17
| | | | | | | | | in case condition type. // rdar://11577384. Test is conditionalized on x86_64-apple triple as I am not sure if the INT_MAX/LONG_MAX values in the test will pass this test for other hosts. llvm-svn: 172016
* Formatting: Add support for @protocol.Nico Weber2013-01-091-1/+1
| | | | | | Pull pieces of the @interface code into reusable methods. llvm-svn: 172001
* Fix test after r171995.Nico Weber2013-01-091-1/+1
| | | | | | | I wasn't aware libFormat is used elsewhere already. Let me know if rebasing is not the right thing to do here. llvm-svn: 171996
* Do not model loads from complex types, since we don't accurately model the ↵Ted Kremenek2013-01-091-0/+16
| | | | | | | | imaginary and real parts yet. Fixes false positive reported in <rdar://problem/12964481>. llvm-svn: 171987
* Handle static functions being redeclared in function scope.Rafael Espindola2013-01-091-0/+8
| | | | | | Fixes pr14861. llvm-svn: 171978
* Fix ObjC block declarations.Daniel Jasper2013-01-092-4/+4
| | | | | | Before: int ( ^ Block1) (int, int) = ^ (int i, int j) After: int (^Block1) (int, int) = ^(int i, int j) llvm-svn: 171959
* [ubsan] Make static check data non-const so it can be used for deduplication.Will Dietz2013-01-092-5/+5
| | | | llvm-svn: 171947
* Make sure clang puts tokens from different files on separate lines in "-E ↵Eli Friedman2013-01-092-0/+7
| | | | | | | | -P" mode. <rdar://problem/12774044> llvm-svn: 171944
* Make __has_include a bit more resilient in the presence of macros. ↵Eli Friedman2013-01-091-0/+27
| | | | | | <rdar://problem/12748859>. llvm-svn: 171939
* When name lookup for a redeclaration finds declarations that are knownDouglas Gregor2013-01-093-0/+44
| | | | | | | | | | (because they are part of some module) but have not been made visible (because they are in a submodule that wasn't imported), filter out those declarations unless both the old declaration and the new declaration have external linkage. When one or both has internal linkage, there should be no conflict unless both are imported. llvm-svn: 171925
* put back diagnostics when flexible members are capturedFariborz Jahanian2013-01-091-2/+3
| | | | | | in lambdas. llvm-svn: 171921
* [ms-inline asm] Add a test case for the offset operator where the operand is aChad Rosier2013-01-081-3/+6
| | | | | | global variable. llvm-svn: 171919
* Remove lambda from my last patch.Fariborz Jahanian2013-01-081-4/+2
| | | | llvm-svn: 171915
* objectiveC blocks: It is impractical to capture Fariborz Jahanian2013-01-081-0/+9
| | | | | | | | struct variables with flexiable array members in blocks (and lambdas). Issue error instead of crashing in IRGen. // rdar://12655829 llvm-svn: 171912
* PR14855: don't silently swallow a nested-name-specifier after a type name.Richard Smith2013-01-081-0/+2
| | | | llvm-svn: 171908
* Clear LV cache when dropping availability attributes.Rafael Espindola2013-01-081-0/+3
| | | | llvm-svn: 171906
* Don't crash when trying to apply the availability attribute to a block.Rafael Espindola2013-01-081-1/+6
| | | | llvm-svn: 171899
* Mark all subsequent decls used.Rafael Espindola2013-01-081-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | In the source static void f(); static void f(); template<typename T> static void g() { f(); } static void f() { } void h() { g<int>(); } the call to f refers to the second decl, but it is only marked used at the end of the translation unit during instantiation, after the third f decl has been linked in. With this patch we mark all subsequent decls used, so that it is easy to check if a symbol is used or not. llvm-svn: 171888
* [analyzer] Only include uniqueling location as issue_hash when availableAnna Zaks2013-01-081-14/+14
| | | | | | | This makes us more optimistic when matching reports in a changing code base. Addresses Jordan's feedback for r171825. llvm-svn: 171884
* Use Decl::getAvailability() rather than checking for the "unavailable"Douglas Gregor2013-01-081-1/+3
| | | | | | | attribute when determining whether we need to see an implementation of a property. Fixes <rdar://problem/12958191>. llvm-svn: 171877
* Add missing spaces. This doesn't cause problems in practice because we only warnRafael Espindola2013-01-081-2/+2
| | | | | | about _Static_assert with -pedantic. llvm-svn: 171860
* Clear the LV cache when setting the instantiated from link.Rafael Espindola2013-01-081-0/+12
| | | | | | Fixes pr14835. llvm-svn: 171857
* CodeGen/compound-assign-overflow.c: include stdint.h in freestanding modeDmitri Gribenko2013-01-081-1/+1
| | | | | | This hopefully fixes the ARM buildbot. llvm-svn: 171853
* Clear the LV cache when merging the availability attribute.Rafael Espindola2013-01-081-0/+3
| | | | | | | The availability implies default visibility, so it can change the computed visibility. llvm-svn: 171840
* Add a test to make sure that vector output happens for debug info.Eric Christopher2013-01-081-0/+7
| | | | llvm-svn: 171834
* Don't warn about undefined varargs argument behavior in unreachable code.Ted Kremenek2013-01-081-0/+14
| | | | | | Fixes <rdar://problem/12322000>. llvm-svn: 171831
* Add [artificial] debug info annotation to test matching r171826David Blaikie2013-01-081-1/+1
| | | | llvm-svn: 171830
* [arcmt] Follow-up for r171484; make sure when adding brackets enclosing case ↵Argyrios Kyrtzidis2013-01-083-2/+5
| | | | | | | | | statements, that the case does not "contain" a declaration that is referenced "outside" of it, otherwise we will emit un-compilable code. llvm-svn: 171828
* [analyzer] Include the bug uniqueing location in the issue_hash.Anna Zaks2013-01-081-14/+16
| | | | | | | | | | | | | | | The issue here is that if we have 2 leaks reported at the same line for which we cannot print the corresponding region info, they will get treated as the same by issue_hash+description. We need to AUGMENT the issue_hash with the allocation info to differentiate the two issues. Add the "hash" (offset from the beginning of a function) representing allocation site to solve the issue. We might want to generalize solution in the future when we decide to track more than just the 2 locations from the diagnostics. llvm-svn: 171825
* [analyzer] Plist: change the type of issue_hash from int to string.Anna Zaks2013-01-0818-113/+113
| | | | | | This gives more flexibility to what could be stored as issue_hash. llvm-svn: 171824
* clang/test/CodeGenOpenCL/shifts.cl: Fixup for -Asserts.NAKAMURA Takumi2013-01-081-8/+8
| | | | llvm-svn: 171820
* PR14838: When a member reference is bound to a temporary, don't forget toRichard Smith2013-01-081-0/+16
| | | | | | | perform the semantic checks associated with the destruction of that temporary. It'll be destroyed at the end of the constructor. llvm-svn: 171818
* Correct OpenBSD profiling testDmitri Gribenko2013-01-071-1/+1
| | | | | | | | | | The test should be looking for gcrt0.o not crt0.o. Clang was already printing "gcrt0", but the test was looking for "{{.*}}crt0.o", and the .* regexp consumed "g". Patch by Brad Smith. llvm-svn: 171815
* add a tripleRafael Espindola2013-01-071-1/+1
| | | | llvm-svn: 171808
* [ubsan] Use correct type for compound assignment ops.Will Dietz2013-01-071-0/+36
| | | | llvm-svn: 171801
* Test case for r171784.Chad Rosier2013-01-071-0/+8
| | | | llvm-svn: 171785
* Use the C++11 POD definition in C++11 mode to determine whether oneDouglas Gregor2013-01-071-0/+26
| | | | | | can create a VLA of class type. Fixes <rdar://problem/12151822>. llvm-svn: 171783
* Add support for attribute((mode(unwind_word))).Rafael Espindola2013-01-071-0/+2
| | | | | | Patch by Nick Lewycky. Fixes pr8703. llvm-svn: 171781
* objective-C: when searching for declarations in protocolFariborz Jahanian2013-01-071-0/+21
| | | | | | | list of classes, etc., make sure to look into protocol definitions. // rdar://12958878 llvm-svn: 171777
OpenPOWER on IntegriCloud