summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Add regression test to check if -Wenum-conversion is a subgroup of -Wconversion.Ted Kremenek2012-10-081-0/+8
| | | | llvm-svn: 165459
* In VarDecl::getSourceRange() make sure to check that the source locationArgyrios Kyrtzidis2012-10-081-1/+20
| | | | | | | | | | of the initializer is valid before using it. Fixes rdar://12455002&12449015 where local variables of objc objects in ARC mode were not annotated because of the ImplicitValueInitExpr initializer having invalid source range, resulting in the SourceRange of the VarDecl having invalid end location. llvm-svn: 165456
* Make Bitrig's clang understand -stdlib= correctly.Chandler Carruth2012-10-081-0/+14
| | | | | | | | | With this patch Bitrig can use a different c++ library without pain and within the normal commandline parameters. Original patch by David Hill, with lots of fixes and cleanup by me. llvm-svn: 165430
* Use a single note diagnostic for all the precedent/parentheses warnings.David Blaikie2012-10-081-3/+3
| | | | llvm-svn: 165384
* Use getArch instead of getArchName.Rafael Espindola2012-10-071-0/+8
| | | | | | | | | | | | The darwin change should be a nop since Triple::getArchTypeForDarwinArchName doesn't know about amd64. If things like amd64-mingw32 are to be rejected, we should print a error earlier on instead of silently using the wrong abi. Remove old comment that looks out of place, this is "in clang". llvm-svn: 165368
* Expose __builtin_bswap16.Benjamin Kramer2012-10-063-4/+7
| | | | | | | GCC has always supported this on PowerPC and 4.8 supports it on all platforms, so it's a good idea to expose it in clang too. LLVM supports this on all targets. llvm-svn: 165362
* [analyzer] Tweak test to run the retain-count checker even on non-Darwin.Jordan Rose2012-10-061-1/+1
| | | | | | This should fix the bots. llvm-svn: 165358
* ParentMap: Restore the ability to update an existing map.Jordan Rose2012-10-061-0/+1206
| | | | | | | | | | | | | | | | | | | | | | | | | | The Clang ASTs are a DAG, not a pure tree. However, ParentMap has to choose a single parent for each object. In the main (only?) cases in which the AST forms a DAG, it protects from multiple traversal by using OpaqueValueExprs. Previously, ParentMap would just unconditionally look through all OpaqueValueExprs when building its map. In order to make this behavior better for the analyzer's diagnostics, ParentMap was changed to not set a statement's parent if there already was one in the map. However, ParentMap is supposed to allow updating existing mappings by calling addStmt once again. This change makes the "transparency" of OpaqueValueExprs explicit, and disables it when it is not desired, rather than checking the current contents of the map. This new code seems like a big change, but it should actually have essentially the same performance as before. Only OpaqueValueExprs and their users (PseudoObjectExpr and BinaryConditionalOperator) will have any different behavior. There should be no user-visible functionality change, though a test has been added for the current behavior of BinaryConditionalOperator source locations and accompanying Xcode arrows (which are not so great...). llvm-svn: 165355
* [analyzer] Handle implicit statements used for end-of-path nodes' source locs.Jordan Rose2012-10-061-34/+265
| | | | | | | | | | | Some implicit statements, such as the implicit 'self' inserted for "free" Objective-C ivar access, have invalid source locations. If one of these statements is the location where an issue is reported, we'll now look at the enclosing statements for a valid source location. <rdar://problem/12446776> llvm-svn: 165354
* Fix another spot where this test varied for a Release build.Alex Rosenberg2012-10-051-2/+2
| | | | llvm-svn: 165347
* Make test resilient to Release build temp names.Alex Rosenberg2012-10-051-2/+2
| | | | llvm-svn: 165345
* Propagate calling convention for aliases and weakrefs.Alex Rosenberg2012-10-051-7/+23
| | | | llvm-svn: 165343
* FileCheckize testAlex Rosenberg2012-10-051-15/+13
| | | | llvm-svn: 165342
* Thread-safety analysis: allow attributes on constructors to refer to 'this'.DeLesley Hutchins2012-10-051-16/+34
| | | | llvm-svn: 165339
* Changing line endings from Windows to Unix. No functional changes.Aaron Ballman2012-10-053-65/+65
| | | | llvm-svn: 165329
* Add intrinsic of MULX in BMI2 headerMichael Liao2012-10-051-0/+17
| | | | llvm-svn: 165325
* Make sure to generate the right kind of MDNode for enum forward declarations.Eli Friedman2012-10-052-2/+16
| | | | | | PR14029, clang part. llvm-svn: 165289
* Implement -Wshift-op-parentheses for: a << b + cDavid Blaikie2012-10-051-0/+12
| | | | | | | | | | | | This appears to be consistent with GCC's implementation of the same warning under -Wparentheses. Suppressing a << b + c for cases where 'a' is a user defined type for compatibility with C++ stream IO. Otherwise suggest parentheses around the addition or subtraction subexpression. (this came up when MSVC was complaining (incorrectly, so far as I can tell) about a perceived violation of this within the LLVM codebase, PR14001) llvm-svn: 165283
* Test case for r165275.Chad Rosier2012-10-041-0/+9
| | | | llvm-svn: 165276
* If we flow off the end of a value-returning function:Richard Smith2012-10-043-0/+20
| | | | | | | | - outside C++, return undef (behavior is not undefined unless the value is used) - in C++, with -fcatch-undefined-behavior, perform an appropriate trap - in C++, produce an 'unreachable' (behavior is undefined immediately) llvm-svn: 165273
* Egriegious hack to support libstdc++4.6's broken <atomic> header, which definesRichard Smith2012-10-042-2/+37
| | | | | | | | a non-inline namespace, then reopens it as inline to try to add its symbols to the surrounding namespace. In this one special case, permit the namespace to be reopened as inline, and patch up the name lookup tables to match. llvm-svn: 165263
* Fix the CodeGen/ppc64-varargs-struct.c test case to tolerate release builds.Bill Schmidt2012-10-041-3/+3
| | | | llvm-svn: 165247
* Add a test case for r156143, which enabled general varargs support for theBill Schmidt2012-10-041-0/+32
| | | | | | | | | 64-bit PPC SVR4 ABI. The test verifies passing of structures, items with 16-byte alignment, and small items that are passed right-justified in the parameter save area slot. llvm-svn: 165245
* Driver: Link crtfastmath.o if it's available and -ffast-math is specified.Benjamin Kramer2012-10-042-0/+21
| | | | | | | | | | | | crtfastmath.o contains routines to set the floating point flags to a faster, unsafe mode. Linking it in speeds up code dealing with denormals significantly (PR14024). For now this is only enabled on linux where I can test it and crtfastmath.o is widely available. We may want to provide a similar file with compiler-rt eventually and/or enable it on other platforms too. llvm-svn: 165240
* Revert 165129Preston Gurd2012-10-041-32/+0
| | | | llvm-svn: 165231
* Test file-scoped FP_CONTRACT pragma.Lang Hames2012-10-041-0/+17
| | | | llvm-svn: 165196
* Permanently end the whole "pragma got handled by the parser too early"Eli Friedman2012-10-043-2/+24
| | | | | | | mess by handling all pragmas which the parser touches uniformly. <rdar://problem/12248901>, etc. llvm-svn: 165195
* use ';' instead of '-' in the note part of my last patch.Fariborz Jahanian2012-10-031-1/+1
| | | | llvm-svn: 165177
* Update test case for r165174.Chad Rosier2012-10-031-3/+3
| | | | llvm-svn: 165175
* Fix a typo in my last patch reported by Erik Schwiebert.Fariborz Jahanian2012-10-031-1/+1
| | | | llvm-svn: 165142
* objective-C arc: Warn under arc about a use of an ivar inside a blockFariborz Jahanian2012-10-033-1/+39
| | | | | | | that doesn't have a 'self' as this implicitly captures 'self' and could create retain cycles. Provide fixit. // rdar://11194874 llvm-svn: 165133
* Implement Adnroid MIPS toolchain support:Simon Atanasyan2012-10-0315-0/+67
| | | | | | | | | | 1. Add mipsel-linux-android to the list of valid MIPS target triples. 2. Add <gcc install path>/mips-r2 to the list of toolchain specific path prefixes if target is mipsel-linux-android. The patch reviewed by Logan Chien. llvm-svn: 165131
* Fix failure of newly added test, by using %clang instead of %clang_cc1Preston Gurd2012-10-031-1/+1
| | | | | | and by specifying a target. llvm-svn: 165130
* Adds a test to verify that Clang does the optimization to use aPreston Gurd2012-10-031-0/+32
| | | | | | | | | | fast div/rem instruction (for Intel Atom). Test case for llvm commit 165126. Patch by Tyler Nowicki. llvm-svn: 165129
* Revert "InlineObjCInstanceMethod.m: Remove lines introduced in r165079."Jordan Rose2012-10-031-1/+26
| | | | | | | | | ...and fix the run line so that the expected warnings are the same on all platforms. This reverts r165088 / d09074f0ca06626914108f1c0d4e70adeb851e01. llvm-svn: 165124
* Matching block names with FileCheck requires asserts.Benjamin Kramer2012-10-031-0/+1
| | | | llvm-svn: 165118
* CodeGen: Fix a silly typo when emitting subs of block addresses.Benjamin Kramer2012-10-031-1/+13
| | | | | | Part of PR14005. llvm-svn: 165117
* When mangling an APSInt with the ms abi, make sure to look at all nibbles.Nico Weber2012-10-031-0/+9
| | | | | | Currently, it's ignored if the number of set bits isn't divisible by 4. llvm-svn: 165116
* Comment to XML conversion: escape XML special chars correctly; use correctDmitri Gribenko2012-10-033-19/+44
| | | | | | regex for version tuples. llvm-svn: 165104
* InlineObjCInstanceMethod.m: Remove lines introduced in r165079. It broke ↵NAKAMURA Takumi2012-10-031-25/+0
| | | | | | | | | | some builds, on FreeBSD, Linux and Windows. error: 'warning' diagnostics expected but not seen: Line 94: types are incompatible 1 error generated. llvm-svn: 165088
* Improve C++11 attribute parsing.Michael Han2012-10-035-37/+82
| | | | | | | | - General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST. - Add support to parse arguments of attributes that in 'gnu' namespace. - Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic. llvm-svn: 165082
* [analyzer] Adjust the return type of an inlined devirtualized method call.Jordan Rose2012-10-032-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | In C++, overriding virtual methods are allowed to specify a covariant return type -- that is, if the return type of the base method is an object pointer type (or reference type), the overriding method's return type can be a pointer to a subclass of the original type. The analyzer was failing to take this into account when devirtualizing a method call, and anything that relied on the return value having the proper type later would crash. In Objective-C, overriding methods are allowed to specify ANY return type, meaning we can NEVER be sure that devirtualizing will give us a "safe" return value. Of course, a program that does this will most likely crash at runtime, but the analyzer at least shouldn't crash. The solution is to check and see if the function/method being inlined is the function that static binding would have picked. If not, check that the return value has the same type. If the types don't match, see if we can fix it with a derived-to-base cast (the C++ case). If we can't, return UnknownVal to avoid crashing later. <rdar://problem/12409977> llvm-svn: 165079
* Change how the SelfReferenceChecker handles MemberExpr. Instead of treatingRichard Trieu2012-10-031-0/+63
| | | | | | | each one separately, process a stack of MemberExpr's as a single unit so that static calls and member access will not be warned on. llvm-svn: 165074
* Added a test for C++11 statement attributes serialization.Alexander Kornienko2012-10-022-0/+26
| | | | | | | | | | | | | | Summary: Uses [[clang::fallthrough]] attribute in a template function, and -Wimplicit-fallthrough to check the attribute presence in an instantiation. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D55 llvm-svn: 165068
* [Doc parse]: SUpport for message in deprecated/unavailableFariborz Jahanian2012-10-023-5/+6
| | | | | | attribute going iinto XML document. llvm-svn: 165066
* [ms-inline asm] Fixup test case to be valid ms-style asm. Fix whitespace.Chad Rosier2012-10-021-2/+4
| | | | llvm-svn: 165045
* Tweak AnalyzerOptions::getOptionAsInteger() to populate the stringTed Kremenek2012-10-022-2/+4
| | | | | | | | | table, making it printable with the ConfigDump checker. Along the way, fix a really serious bug where the value was getting parsed from the string in code that was in an assert() call. This means in a Release-Asserts build this code wouldn't work as expected. llvm-svn: 165041
* Change AnalyzerOptions::mayInlineCXXMemberFunction to default populateTed Kremenek2012-10-021-0/+20
| | | | | | | the config string table. Also setup a test for dumping the analyzer configuration for C++. llvm-svn: 165040
* [Doc parsing]: Add available and deprecated attribute infoFariborz Jahanian2012-10-024-0/+31
| | | | | | to XML output. // rdar://12378879 llvm-svn: 165039
* Fix test for r165028. It only generates that flag for source files now.Bill Wendling2012-10-021-1/+1
| | | | | | <rdar://problem/12401423> llvm-svn: 165029
OpenPOWER on IntegriCloud