summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Use {{.*}}suffix instead of [[TC]] in places where we print the toolchainRafael Espindola2013-04-301-80/+80
| | | | | | | path with /. This matches linux-ld.c and should finish fixing this test on windows. llvm-svn: 180786
* [Mips] Pass -mips16, -mmicromips, -mdsp and -mdspr2 flags to theSimon Atanasyan2013-04-301-0/+44
| | | | | | assembler. llvm-svn: 180775
* Objective-C (mostly arc): Under ARC, we often have unneeded qualifiers Fariborz Jahanian2013-04-301-0/+11
| | | | | | | in the diagnostics. Remove them when reporting incompatible Objective-C pointer types. // rdar://13752880. llvm-svn: 180765
* Modify triple to try to make it pass on ARM.Bill Wendling2013-04-291-2/+2
| | | | llvm-svn: 180748
* Emit the TLS intialization functions into a list.Bill Wendling2013-04-291-0/+21
| | | | | | | | | | Add the TLS initialization functions to a list of initialization functions. The back-end takes this list and places the function pointers into the correct section. This way they're called before `main().' <rdar://problem/13733006> llvm-svn: 180739
* c language: diagnose use of "[*]" on any array dimensionFariborz Jahanian2013-04-291-0/+7
| | | | | | | | in the parameter of a function definition. Currently, it crashes in irgen if it is on other than the 1st dimension. // rdar://13705391 llvm-svn: 180732
* [test] add missing header for the test.Argyrios Kyrtzidis2013-04-291-0/+1
| | | | llvm-svn: 180719
* When emitting a preprocessed file with implicit module imports, make sure ↵Argyrios Kyrtzidis2013-04-291-0/+4
| | | | | | | | line directives are emitted in the next line. rdar://13722737 llvm-svn: 180718
* Revert "[analyzer] Model casts to bool differently from other numbers."Jordan Rose2013-04-294-111/+12
| | | | | | | | | This seems to be causing quite a slowdown on our internal analyzer bot, and I'm not sure why. Needs further investigation. This reverts r180638 / 9e161ea981f22ae017b6af09d660bfc3ddf16a09. llvm-svn: 180714
* Keep the parser's template depth up to date when parsing local templates andRichard Smith2013-04-291-0/+76
| | | | | | late-parsed templates. Patch by Faisal Vali! llvm-svn: 180708
* Implement DR580: access checks for template parameters of a class template areRichard Smith2013-04-291-1/+75
| | | | | | performed within the context of that class template. Patch by Ismail Pazarbasi! llvm-svn: 180707
* Properly reenter multiple contexts when parsing a late-parsed function templateRichard Smith2013-04-291-0/+1
| | | | | | within a dependent context. Patch by Will Wilson (+clang-format)! llvm-svn: 180702
* Fix an assertion failure / accepts-invalid in -fms-extensions mode. Don't buildRichard Smith2013-04-291-1/+25
| | | | | | | | | a dependent-scope id expression when a templated member function of a non-templated class references an unknown identifier, since instantiation won't rebuild it (and we can tell at parse time that it'll never work). Based on a patch by Faisal Vali! llvm-svn: 180701
* Struct-path aware TBAA: fix handling of may_alias attribute.Manman Ren2013-04-271-2/+13
| | | | llvm-svn: 180656
* Struct-path aware TBAA: change the format of TBAAStructType node.Manman Ren2013-04-271-11/+11
| | | | | | | We switch the order of offset and field type to make TBAAStructType node (name, parent node, offset) similar to scalar TBAA node (name, parent node). llvm-svn: 180653
* Fix an assertion hit in Sema::CheckObjCMethodOverrides.Argyrios Kyrtzidis2013-04-271-0/+23
| | | | llvm-svn: 180651
* documenttion parsing. Provide a c-index testFariborz Jahanian2013-04-262-101/+107
| | | | | | | and limit comment extraction to public c++ bases. // rdar://13647476 llvm-svn: 180646
* [libclang] Introduce clang_Module_getASTFile function that returns the ↵Argyrios Kyrtzidis2013-04-261-0/+7
| | | | | | | | module file where a module object came from. rdar://13743084 llvm-svn: 180643
* [analyzer] An ObjC for-in loop runs 0 times if the collection is nil.Jordan Rose2013-04-261-1/+13
| | | | | | | | | | | | | | | In an Objective-C for-in loop "for (id element in collection) {}", the loop will run 0 times if the collection is nil. This is because the for-in loop is implemented using a protocol method that returns 0 when there are no elements to iterate, and messages to nil will result in a 0 return value. At some point we may want to actually model this message send, but for now we may as well get the nil case correct, and avoid the false positives that would come with this case. <rdar://problem/13744632> llvm-svn: 180639
* [analyzer] Model casts to bool differently from other numbers.Jordan Rose2013-04-264-12/+111
| | | | | | | | | | | | | | | | | | | Casts to bool (and _Bool) are equivalent to checks against zero, not truncations to 1 bit or 8 bits. This improved reasoning does cause a change in the behavior of the alpha BoolAssignment checker. Previously, this checker complained about statements like "bool x = y" if 'y' was known not to be 0 or 1. Now it does not, since that conversion is well-defined. It's hard to say what the "best" behavior here is: this conversion is safe, but might be better written as an explicit comparison against zero. More usefully, besides improving our model of booleans, this fixes spurious warnings when returning the address of a local variable cast to bool. <rdar://problem/13296133> llvm-svn: 180638
* [analyzer] Consolidate BoolAssignmentChecker tests by using two RUN lines.Jordan Rose2013-04-262-39/+5
| | | | llvm-svn: 180637
* [PCH/modules] Require the preprocessing record option to match the used PCH, ↵Argyrios Kyrtzidis2013-04-261-4/+4
| | | | | | | | | if modules are enabled. The preprocessing record becomes important when modules are enabled, since it is used to calculate the module cache hash. llvm-svn: 180635
* [Modules] Fix an issue where the reconstructed redeclaration chain was ↵Argyrios Kyrtzidis2013-04-264-0/+33
| | | | | | | | | | | | | incomplete, missing the definition from a module. -Make sure that a deserialized external decl gets added to the TU scope. -When associating an identifier with a set of decls, use the most recent local ones, if they exist, otherwise associating decls from modules (that came after a local one) will lead to an incomplete reconstructed re-declaration chain. rdar://13712705 llvm-svn: 180634
* document parsing. When a sub-class (c++ Objective-C) missing Fariborz Jahanian2013-04-261-0/+101
| | | | | | | | a comment, grab the first comment found in its class heirarchy. Also, when a category is mossing a comment, grab comment of its primary class. // rdar://13647476 llvm-svn: 180629
* [driver] Implement the -fdebug-compilation-dir in a way that is compatible withChad Rosier2013-04-262-6/+0
| | | | | | | gcc. No test case included as I'm having problems finding a test case where the inode/dev don't match. llvm-svn: 180628
* Comment parsing: -fparse-all-comments: recognize empty line commentsDmitri Gribenko2013-04-261-0/+6
| | | | | | | | | In -fparse-all-comments mode empty '//' comments were recognized as RCK_Invalid, and were not merged with next and previous lines. Patch by Amin Shali. llvm-svn: 180625
* Implement C++1y decltype(auto).Richard Smith2013-04-263-0/+129
| | | | llvm-svn: 180610
* C++1y: support simple variable assignments in constexpr functions.Richard Smith2013-04-265-8/+165
| | | | llvm-svn: 180603
* Support debug info for using directives at global/namespace scope.David Blaikie2013-04-261-4/+9
| | | | llvm-svn: 180594
* Add r180263 back, but fix hasBraces() to be correct during parsing.Rafael Espindola2013-04-261-0/+7
| | | | | | | | Original commit message: Fix a case in linkage computation that should check for single line extern "C". llvm-svn: 180591
* Add a testcase for a recent regression.Rafael Espindola2013-04-261-0/+9
| | | | | | Thanks to Bill Wendling for the original testcase. llvm-svn: 180586
* Revert r180263. It's causing failures.Bill Wendling2013-04-251-7/+0
| | | | llvm-svn: 180583
* Objective-C: This is a small modification to myFariborz Jahanian2013-04-252-2/+39
| | | | | | | | | | patch -n r180198. When reporting on missing property accessor implementation in categories, do not report when they are declared in primary class, class's protocol, or one of it super classes or in of the other categories. // rdar://13713098 llvm-svn: 180580
* [analyzer] Teach DeadStoreChecker to look though BO_Comma and disregard the LHS.Anna Zaks2013-04-251-0/+22
| | | | llvm-svn: 180579
* Put friend decls in the correct context.Rafael Espindola2013-04-251-0/+12
| | | | | | | | | | When we find a friend declaration we have to skip transparent contexts for doing lookups, but we should not skip them when inserting the new decl if the lookup found nothing. Fixes PR15841. llvm-svn: 180571
* Fix a case in linkage computation that should check for single line extern "C".Rafael Espindola2013-04-251-0/+7
| | | | llvm-svn: 180263
* Don't mark 'extern "C" void f(void)' as having extern storage class.Rafael Espindola2013-04-251-0/+7
| | | | | | | | | | Instead, we check for one line extern "C" context in linkage computation and when deciding if a variable is a definition. This hopefully completes the transition to having "as written" semantics for hasExternalStorage. llvm-svn: 180258
* [ms-cxxabi] Fix a number of bugs in the mangler.Peter Collingbourne2013-04-254-18/+75
| | | | | | | | | | | | | | This includes the following fixes: - Implement 4 subtly different variants of qualifier mangling and use them in what I believe are the right places. - Fix handling of array types. Previously we were always decaying them, which is wrong if the type appears as a template argument, pointee, referent etc. Fixes PR13182. Differential Revision: http://llvm-reviews.chandlerc.com/D709 llvm-svn: 180250
* Add "-no-canonical-prefixes" to a test case.Richard Trieu2013-04-251-4/+4
| | | | llvm-svn: 180239
* [analyzer] Fix a crash in RetainCountChecker - we should not rely on ↵Anna Zaks2013-04-251-1/+54
| | | | | | | | | | | CallEnter::getCallExpr to return non-NULL We get a CallEnter with a null expression, when processing a destructor. All other users of CallEnter::getCallExpr work fine with null as return value. (Addresses PR15832, Thanks to Jordan for reducing the test case!) llvm-svn: 180234
* Objective-C parsing [qoi]: Recover gracefully with good diagnosticFariborz Jahanian2013-04-241-0/+21
| | | | | | | when class implementation declaration adds protocol qualifier list. // rdar://12233858 llvm-svn: 180228
* Objective-C arc: Improve disgnostics when 'weak'Fariborz Jahanian2013-04-241-3/+27
| | | | | | | | property cannot be synthesized because its backing ivar does not support weak references. // rdar://13676793 llvm-svn: 180211
* Removing example-dynarray.cpp test since it's of no value.Jyotsna Verma2013-04-241-178/+0
| | | | llvm-svn: 180208
* [driver] Test that last option wins between -Ofast and -O2.Chad Rosier2013-04-241-0/+8
| | | | | | Part of rdar://13622687 llvm-svn: 180207
* [driver] Put -fvectorize under the -Ofast umbrella flag.Chad Rosier2013-04-241-0/+11
| | | | | | Part of rdar://13622687 llvm-svn: 180206
* [driver] Improve the implementation of the -Ofast option.Chad Rosier2013-04-241-0/+20
| | | | | | | | | | | | Specifically, allow the flags that fall under this umbrella (i.e., -O3, -ffast-math, and -fstrict-aliasing) to be overridden/disabled with the individual -O[0|1|2|s|z]/-fno- flags. This also fixes the handling of various floating point optimization flags that are modified by -ffast-math (and thus -Ofast as well). Part of rdar://13622687 llvm-svn: 180204
* Objective-C: When reporting on missing property accessor implementation inFariborz Jahanian2013-04-242-3/+71
| | | | | | | | categories, do not report when they are declared in primary class, class's protocol, or one of it super classes. This is because, its class is going to implement them. // rdar://13713098 llvm-svn: 180198
* clang-format support for multiple input files.Alexander Kornienko2013-04-243-0/+21
| | | | | | | | | | | | | | | | | | | Summary: Added support for multiple input files, that can be used both with and without in-place edit (-i) option. Added checks for -offset and -length options: don't allow them on multiple files, check that they don't fall outside input file, made both options unsigned, so that there's no need to check for negative values. Removed "-1 can be used for end-of-file" from -length description. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D719 llvm-svn: 180185
* Add test case for -Wdeprecated-objc-pointer-introspection, andTed Kremenek2013-04-241-0/+8
| | | | | | tweak warning to suggest that it is just a bad thing to do. llvm-svn: 180175
* [analyzer] IvarInvalidation: correctly handle cases where only partial ↵Anna Zaks2013-04-241-0/+41
| | | | | | | | | | | | invalidators exist - If only partial invalidators exist and there are no full invalidators in @implementation, report every ivar that has not been invalidated. (Previously, we reported the first Ivar in the list, which could actually have been invalidated by a partial invalidator. The code assumed you cannot have only partial invalidators.) - Do not report missing invalidation method declaration if a partial invalidation method declaration exists. llvm-svn: 180170
OpenPOWER on IntegriCloud