summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add the missing 'static' keyword to the testTimur Iskhodzhanov2013-02-191-2/+2
| | | | llvm-svn: 175502
* Add support for -fvisibility-ms-compat.John McCall2013-02-192-0/+146
| | | | | | | | | | | | | | | We treat this as an alternative to -fvisibility=<?> which changes the default value visibility to "hidden" and the default type visibility to "default". Expose a -cc1 option for changing the default type visibility, repurposing -fvisibility as the default value visibility option (also setting type visibility from it in the absence of a specific option). rdar://13079314 llvm-svn: 175480
* Use the actual class visibility for the ObjC EHTYPE global,John McCall2013-02-191-0/+27
| | | | | | | | not the global visibility mode. Noticed by inspection. llvm-svn: 175479
* Test for my last patch. // rdar://13178483Fariborz Jahanian2013-02-181-0/+29
| | | | llvm-svn: 175453
* CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.Douglas Gregor2013-02-181-1/+13
| | | | llvm-svn: 175448
* Ensure that the identifier chains have the most recent declaration after ↵Douglas Gregor2013-02-184-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | module deserialization. This commit introduces a set of related changes to ensure that the declaration that shows up in the identifier chain after deserializing declarations with a given identifier is, in fact, the most recent declaration. The primary change involves waiting until after we deserialize and wire up redeclaration chains before updating the identifier chains. There is a minor optimization in here to avoid recursively deserializing names as part of looking to see whether top-level declarations for a given name exist. A related change that became suddenly more urgent is to property record a merged declaration when an entity first declared in the current translation unit is later deserialized from a module (that had not been loaded at the time of the original declaration). Since we key off the canonical declaration (which is parsed, not from an AST file) for emitted redeclarations, we simply record this as a merged declaration during AST writing and let the readers merge them. Re-fixes <rdar://problem/13189985>, presumably for good this time. llvm-svn: 175447
* AArch64: add atomic support parameters to TargetInfoTim Northover2013-02-181-0/+5
| | | | | | | | This allows Clang to detect and deal wih __atomic_* operations properly on AArch64. Previously we produced an error when encountering them at high optimisation levels. llvm-svn: 175438
* Update test cases to account for DIBuilder type changes.David Blaikie2013-02-182-2/+2
| | | | | | Paired commit with LLVM, may produce temporary build breakage. llvm-svn: 175427
* Disable dead stores checker for template instantations. Fixes ↵Ted Kremenek2013-02-181-0/+18
| | | | | | <rdar://problem/13213575>. llvm-svn: 175425
* Test ivar-invariant.m: use a more idiomatic RUN line and tighten the testDmitri Gribenko2013-02-171-1/+4
| | | | | | by matching the function name first llvm-svn: 175395
* Remove block names from test case to unbreak release builds.Lang Hames2013-02-171-2/+0
| | | | | | Thanks Chandler. :) llvm-svn: 175392
* Re-apply r174919 - smarter copy/move assignment/construction, with fixes forLang Hames2013-02-174-10/+227
| | | | | | | | | | | bitfield related issues. The original commit broke Takumi's builder. The bug was caused by bitfield sizes being determined by their underlying type, rather than the field info. A similar issue with bitfield alignments showed up on closer testing. Both have been fixed in this patch. llvm-svn: 175389
* [clang] fix test execution commandSaleem Abdulrasool2013-02-171-1/+1
| | | | | Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175387
* [CodeGen] tighten objc ivar invariant.load attributionSaleem Abdulrasool2013-02-171-0/+53
| | | | | | | | | | | | | | | | | An ivar ofset cannot be marked as invariant load in all cases. The ivar offset is a lazily initialised constant, which is dependent on an objc_msgSend invocation to perform a fixup of the offset. If the load is being performed on a method implemented by the class then this load can safely be marked as an inviarant because a message must have been passed to the class at some point, forcing the ivar offset to be resolved. An additional heuristic that can be used to identify an invariant load would be if the ivar offset base is a parameter to an objc method. However, without the parameters available at hand, this is currently not possible. Reviewed-by: John McCall <rjmccall@apple.com> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175386
* Fix for ARM: functions don't have extra attributes there, so {{.*}} is ""Dmitri Gribenko2013-02-171-3/+7
| | | | | | While there, explicitly declare functions to remove warnings. llvm-svn: 175384
* libAnalysis: Add a case for TypeAliasDecl in CFGRecStmtDeclVisitor.Jordan Rose2013-02-161-2/+9
| | | | | | | | | | | Neither of the current clients of CFGRecStmtDeclVisitor are doing anything with typedefs, so I assume type aliases (C++11 "using") can be safely ignored. This was causing assertion failures in the analyzer. <rdar://problem/13228440> llvm-svn: 175335
* Don't warn on conversion from NULL to nullptr_tDavid Blaikie2013-02-161-2/+8
| | | | llvm-svn: 175331
* Emit vtables for an extern template class as available_externally, not asRichard Smith2013-02-161-0/+26
| | | | | | | linkonce_odr. Emit construction vtables as internal in this case, since the ABI does not guarantee that they will be availble externally. llvm-svn: 175330
* [PCH] Deserializing the DeclContext of a template parameter is not safeArgyrios Kyrtzidis2013-02-162-0/+32
| | | | | | | | | | | until recursive loading is finished. Otherwise we may end up with a template trying to deserialize a template parameter that is in the process of getting loaded. rdar://13135282 llvm-svn: 175329
* Rework the visibility computation algorithm in preparationJohn McCall2013-02-161-15/+29
| | | | | | | | | | | | | | | | for distinguishing type vs. value visibility. The changes to the visibility of explicit specializations are intentional. The change to the "ugly" test case is a consequence of a sensible implementation, and I am happy to argue that this is better behavior. Other changes may or may not be intended; it is quite difficult to divine intent from some of the code I altered. I've left behind a comment which I hope explains the philosophy behind visibility computation. llvm-svn: 175326
* Add test case for r175312.Chad Rosier2013-02-151-0/+6
| | | | llvm-svn: 175313
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-1518-85/+85
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* libclang: add clang_getTypeSpelling(CXType CT)Dmitri Gribenko2013-02-156-44/+110
| | | | | | | | | Adds a function clang_getTypeSpelling(CXType CT) that returns a CXString containing the underlying type. Patch by Ben Gertzfield. llvm-svn: 175299
* objective-C: Fixes a compiler crash when encodingFariborz Jahanian2013-02-151-0/+18
| | | | | | | an ivar of type pointer to a typedef'ed object. // rdar://13190095 llvm-svn: 175298
* Fixed diagnostic nondeterministic order bug (pr14901).Enea Zaffanella2013-02-151-0/+13
| | | | llvm-svn: 175289
* Fix crash-on-invalid where a ParenListExpr shows up as a message receiverArgyrios Kyrtzidis2013-02-151-0/+8
| | | | | | | | while trying to do error recovery. rdar://13207886 llvm-svn: 175282
* When a statement is dropped from the AST because it was invalid, make sureArgyrios Kyrtzidis2013-02-151-0/+12
| | | | | | | we don't do the scope checks otherwise we are going to hit assertion checks since a label may not have been actually added. llvm-svn: 175281
* Sema: Unnest early exit and remove an unnecessary bad cast.Benjamin Kramer2013-02-151-0/+3
| | | | | | | cast<ObjCObjectPointerType> doesn't look through sugar, getAs does. Fixes PR15257. llvm-svn: 175272
* Abstract out emitting the vdtor calls and do it properly when using -cxx-abi ↵Timur Iskhodzhanov2013-02-152-11/+25
| | | | | | microsoft; also fix vdtor calls for the ARM ABI llvm-svn: 175271
* Update testcases due to Attribute sorting improvements.Bill Wendling2013-02-1514-72/+72
| | | | llvm-svn: 175253
* [analyzer] Don't assert when mixing reinterpret_cast and derived-to-base casts.Jordan Rose2013-02-151-0/+28
| | | | | | | | | | | | | | | This just adds a very simple check that if a DerivedToBase CastExpr is operating on a value with known C++ object type, and that type is not the base type specified in the AST, then the cast is invalid and we should return UnknownVal. In the future, perhaps we can have a checker that specifies that this is illegal, but we still shouldn't assert even if the user turns that checker off. PR14872 llvm-svn: 175239
* Re-apply "[analyzer] Model trivial copy/move ctors with an aggregate bind."Jordan Rose2013-02-152-3/+103
| | | | | | | | | | | | | | ...after a host of optimizations related to the use of LazyCompoundVals (our implementation of aggregate binds). Originally applied in r173951. Reverted in r174069 because it was causing hangs. Re-applied in r174212. Reverted in r174265 because it was /still/ causing hangs. If this needs to be reverted again it will be punted to far in the future. llvm-svn: 175234
* Make this test determinstic for my last patch.Fariborz Jahanian2013-02-141-18/+18
| | | | | | // rdar://13192366 llvm-svn: 175217
* objective-C: When implementing custom accessor method forFariborz Jahanian2013-02-141-1/+23
| | | | | | | | a property, the -Wdirect-ivar-access should not warn when accessing the property's synthesized instance variable. // rdar://13142820 llvm-svn: 175195
* [analyzer] Try constant-evaluation for all variables, not just globals.Jordan Rose2013-02-141-0/+27
| | | | | | | | | | | | | | | | | | | | | In C++, constants captured by lambdas (and blocks) are not actually stored in the closure object, since they can be expanded at compile time. In this case, they will have no binding when we go to look them up. Previously, RegionStore thought they were uninitialized stack variables; now, it checks to see if they are a constant we know how to evaluate, using the same logic as r175026. This particular code path is only for scalar variables. Constant arrays and structs are still unfortunately unhandled; we'll need a stronger solution for those. This may have a small performance impact, but only for truly-undefined local variables, captures in a non-inlined block, and non-constant globals. Even then, in the non-constant case we're only doing a quick type check. <rdar://problem/13105553> llvm-svn: 175194
* [arcmt] Make sure the function has an associated parameter for the argumentArgyrios Kyrtzidis2013-02-141-0/+9
| | | | | | | | before checking for its attributes. rdar://13192395 llvm-svn: 175184
* Mangle extern "C" functions whose names are not simple identifiers.Rafael Espindola2013-02-141-0/+7
| | | | llvm-svn: 175166
* Partially revert r175117 so that we don't break assumptions about howRafael Espindola2013-02-142-9/+7
| | | | | | | static functions in extern "C" contexts are mangled. Should fix the bootstrap. llvm-svn: 175132
* merge hasCLanguageLinkage and isExternC. Keep the shorter name.Rafael Espindola2013-02-141-0/+19
| | | | | | | | | | I added hasCLanguageLinkage while fixing some language linkage bugs some time ago so that I wouldn't have to check all users of isExternC. It turned out to be a much longer detour than expected, but this patch finally merges the two again. The isExternC function now implements just the standard notion of having C language linkage. llvm-svn: 175119
* Add a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fixRafael Espindola2013-02-143-4/+62
| | | | | | | | | | | | | | | some cases where functions with no language linkage were being treated as having C language linkage. In particular, don't warn in extern "C" { static NonPod foo(); } Since getLanguageLinkage checks the language linkage, the linkage computation cannot use the language linkage. Break the loop by checking just the context in the linkage computation. llvm-svn: 175117
* When marking derived classes' virtual methods ODR-used in order to triggerNick Lewycky2013-02-141-0/+17
| | | | | | | instantiation in order to permit devirtualization later in codegen, skip over pure functions since those can't be devirtualization targets. llvm-svn: 175116
* objective-C: Make order of ivars which are synthesizedFariborz Jahanian2013-02-131-0/+58
| | | | | | | | in the course of property synthesis deterministic (ordered by their type size), instead of having hashtable order (as it is currently). // rdar://13192366 llvm-svn: 175100
* [ms-inline asm] Add test case for r175083.Chad Rosier2013-02-131-0/+12
| | | | llvm-svn: 175084
* ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,Richard Smith2013-02-131-0/+46
| | | | | | | base-to-derived casts have undefined behavior if the object is not actually an instance of the derived type. llvm-svn: 175078
* [libclang] Fix annotation of a range where the begin or end locationArgyrios Kyrtzidis2013-02-131-0/+64
| | | | | | | | | is inside a macro argument. Previously we would give up and not annotate anything in the range. rdar://11891550 llvm-svn: 175062
* ... and now fix the +Asserts buildTimur Iskhodzhanov2013-02-131-2/+2
| | | | llvm-svn: 175054
* Fix the microsoft-abi-structors test expectations to match both Release and ↵Timur Iskhodzhanov2013-02-131-8/+14
| | | | | | Release+Asserts builds llvm-svn: 175053
* Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058Timur Iskhodzhanov2013-02-132-11/+62
| | | | llvm-svn: 175045
* Change this comment to helpfully explain why it's there.Nick Lewycky2013-02-131-1/+2
| | | | llvm-svn: 175027
* [analyzer] Use Clang's evaluation for global constants and default arguments.Jordan Rose2013-02-132-12/+50
| | | | | | | | | | | Previously, we were handling only simple integer constants for globals and the smattering of implicitly-valued expressions handled by Environment for default arguments. Now, we can use any integer constant expression that Clang can evaluate, in addition to everything we handled before. PR15094 / <rdar://problem/12830437> llvm-svn: 175026
OpenPOWER on IntegriCloud