summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash in libclang if code completion is used with unknown flags.Manuel Klimek2013-07-181-0/+3
| | | | | | | Use CaptureDroppedDiagnostics to make sure that there is a diagnostic client installed when warning flags are parsed. llvm-svn: 186582
* Removed a parameter from handleAttrWithMessage to make it more consistent ↵Aaron Ballman2013-07-182-1/+6
| | | | | | with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case. llvm-svn: 186578
* Fix volatile _Complex alignment test on platforms where 64-bit floating ↵JF Bastien2013-07-181-6/+14
| | | | | | | | point isn't 64-bit aligned Add x86-64 triple, and check its datalayout. Also add some comments, and use the new CHECK-LABEL. llvm-svn: 186564
* Don't generate bogus line table entries for __copy_helper_block_ andAdrian Prantl2013-07-181-3/+17
| | | | | | __destroy_helper_block_, but do generate scope information. llvm-svn: 186553
* Reinstate r186040, with additional fixes and more test coverage (reverted inRichard Smith2013-07-172-5/+134
| | | | | | | | | | | | | r186331). Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186546
* MS wide bitfield error check in SemaReid Kleckner2013-07-171-0/+9
| | | | | | | | | | | | | cl.exe treats wide bitfields as an error. This patch causes them to be an error if IsMsStruct is true, as it is in straight C. Patch by Warren Hunt! Reviewers: eli.friedman Differential Revision: http://llvm-reviews.chandlerc.com/D1125 llvm-svn: 186536
* Improve idiomatic-parentheses by checking method family instead of relying ↵Jean-Daniel Dupas2013-07-171-0/+7
| | | | | | on the selector name. llvm-svn: 186524
* [analyzer] Handle C++11 member initializer expressions.Jordan Rose2013-07-171-0/+34
| | | | | | | | | Previously, we would simply abort the path when we saw a default member initialization; now, we actually attempt to evaluate it. Like default arguments, the contents of these expressions are not actually part of the current function, so we fall back to constant evaluation. llvm-svn: 186521
* [analyzer] Handle C string default values for const char * arguments.Jordan Rose2013-07-171-0/+9
| | | | | | | | | | Previously, SValBuilder knew how to evaluate StringLiterals, but couldn't handle an array-to-pointer decay for constant values. Additionally, RegionStore was being too strict about loading from an array, refusing to return a 'char' value from a 'const char' array. Both of these have been fixed. llvm-svn: 186520
* [analyzer] Treat std::initializer_list as opaque rather than aborting.Jordan Rose2013-07-173-1/+54
| | | | | | | | | | | | | | Previously, the use of a std::initializer_list (actually, a CXXStdInitializerListExpr) would cause the analyzer to give up on the rest of the path. Now, it just uses an opaque symbolic value for the initializer_list and continues on. At some point in the future we can add proper support for initializer_list, with access to the elements in the InitListExpr. <rdar://problem/14340207> llvm-svn: 186519
* Replace TEST* with CHECK-DAG in vbtable testsTimur Iskhodzhanov2013-07-171-185/+161
| | | | llvm-svn: 186502
* [analyzer] Add very limited support for temporary destructorsPavel Labath2013-07-174-2/+68
| | | | | | | | | | | | | | | | | Summary: This patch enables ExprEndgine to reason about temporary object destructors. However, these destructor calls are never inlined, since this feature is still broken. Still, this is sufficient to properly handle noreturn temporary destructors and close bug #15599. I have also enabled the cfg-temporary-dtors analyzer option by default. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1131 llvm-svn: 186498
* clang/test/CodeGen/volatile-complex.c: Loosen CHECKs for -Asserts.NAKAMURA Takumi2013-07-171-8/+4
| | | | llvm-svn: 186492
* Propagate alignment for _ComplexJF Bastien2013-07-173-28/+91
| | | | | | | | _Complex load/store didn't have their alignment set properly, which was visible when GCC's torture tests use volatile _Complex. Update some existing tests to check for alignment, and add a new test which also has over-aligned volatile _Complex (since the imaginary part shouldn't be overaligned, only the real part). llvm-svn: 186490
* ObjectiveC migrator: When adding conforming protocol,Fariborz Jahanian2013-07-172-0/+32
| | | | | | | only add outer-most conforming protocols as adding others are redundant. llvm-svn: 186473
* Make Expr::isConstantInitializer match IRGen.Eli Friedman2013-07-162-0/+9
| | | | | | | | | | Sema needs to be able to accurately determine what will be emitted as a constant initializer and what will not, so we get accurate errors in C and accurate -Wglobal-constructors warnings in C++. This makes Expr::isConstantInitializer match CGExprConstant as closely as possible. llvm-svn: 186464
* ObjectiveC migrator. If a class implements a protocol'sFariborz Jahanian2013-07-162-0/+30
| | | | | | properties, then class conforms to that protocol. llvm-svn: 186460
* Fix crash on complex constant zero.Eli Friedman2013-07-161-0/+3
| | | | | | Fixes <rdar://problem/14442543>. llvm-svn: 186452
* ObjectiveC migration: complete migrating classFariborz Jahanian2013-07-162-0/+96
| | | | | | | declaration to include list of protocols class conforms to. llvm-svn: 186443
* FileCheckize test/Driver/immediate-options.cHans Wennborg2013-07-161-6/+14
| | | | llvm-svn: 186438
* Fix test on release builds.Tim Northover2013-07-161-2/+1
| | | | | | | | Unfortunately I don't think there's a good way to validate branch targets on release builds. Fortunately it's a minor part of this test (and based on generic code) so I don't mind dropping it. llvm-svn: 186398
* ARM: implement low-level intrinsics for the atomic exclusive operations.Tim Northover2013-07-163-5/+179
| | | | | | | | | | | | This adds three overloaded intrinsics to Clang: T __builtin_arm_ldrex(const volatile T *addr) int __builtin_arm_strex(T val, volatile T *addr) void __builtin_arm_clrex() The intent is that these do what users would expect when given most sensible types. Currently, "sensible" translates to ints, floats and pointers. llvm-svn: 186394
* Limit number of bits in size representation so that bit size fit 64 bits.Serge Pavlov2013-07-162-3/+8
| | | | | | This fixes PR8256 and some others. llvm-svn: 186385
* Merge attributes on typedef decls.Eli Friedman2013-07-161-0/+4
| | | | | | | | | Not completely sure this is right, but it's clearly better than what we did before this commit (effectively dropping the attribute). <rdar://problem/14413117> llvm-svn: 186373
* Fix alignment of class derived from empty class.Eli Friedman2013-07-161-0/+41
| | | | | | | | | The record layout code didn't properly take into account that an empty class at offset 0 can have an alignment greater than 1. Patch by Andrea Di Biagio. llvm-svn: 186370
* Fix member refs with using decl + anonymous union.Eli Friedman2013-07-161-0/+9
| | | | | | | | | | Make sure we call BuildFieldReferenceExpr with the appropriate decl when a member of an anonymous union is made public with a using decl. Also, fix a crash on invalid field access into an anonymous union. Fixes PR16630. llvm-svn: 186367
* Test case for r18266 (serialization support for ↵David Blaikie2013-07-152-0/+12
| | | | | | TagDecl:IsCompleteDefinitionRequired) llvm-svn: 186351
* Fix a typo in the diagnostic note added in r186342.Kaelyn Uhrain2013-07-151-2/+2
| | | | llvm-svn: 186348
* Move the "->" to "." fixit from r186128 into a separate note sinceKaelyn Uhrain2013-07-152-13/+15
| | | | | | | | recovery is not attempted with the fixit. Also move the associated test case from FixIt/fixit.cpp to SemaCXX/member-expr.cpp since the fixit is no longer automatically applied. llvm-svn: 186342
* Re-revert r86040, which was un-reverted in r186199.Chandler Carruth2013-07-152-32/+4
| | | | | | | | | | | | | | | This breaks the build of basic patterns with repeated friend declarations. See the added test case in SemaCXX/friend.cpp or the test case reported to the original commit log. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186331
* Fix to PR12262 - assertion when substituting explicit template argumentsSerge Pavlov2013-07-151-0/+177
| | | | | | | | does not substitute a sizeof-pack expression. The solution is proposed by Richard Smith. Differential Revision: http://llvm-reviews.chandlerc.com/D869 llvm-svn: 186306
* Make these tests more robust against IRgen choosing to emit more named metadata.Richard Smith2013-07-146-93/+92
| | | | llvm-svn: 186279
* Delete a test that is checking badly for a point bug that Clang never had ↵Richard Smith2013-07-141-12/+0
| | | | | | (and that spuriously fails with modules enabled). llvm-svn: 186278
* If an unimported submodule of an imported module contains a declaration of aRichard Smith2013-07-144-0/+22
| | | | | | | global allocation or deallocation function, that should not cause that global allocation or deallocation function to become unavailable. llvm-svn: 186270
* PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to ↵David Blaikie2013-07-131-6/+22
| | | | | | | | | | | | | | | emit the full definition of a type in -flimit-debug-info This simplifies the core benefit of -flimit-debug-info by taking a more systematic approach to avoid emitting debug info definitions for types that only require declarations. The previous ad-hoc approach (3 cases removed in this patch) had many holes. The general approach (adding a bit to TagDecl and callback through ASTConsumer) has been discussed with Richard Smith - though always open to revision. llvm-svn: 186262
* Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENTDavid Blaikie2013-07-131-0/+4
| | | | | | | | | | | Test coverage for non-dependent pack expansions doesn't demonstrate a failure prior to this patch (a follow-up commit improving debug info will cover this commit specifically) but covers a related hole in our test coverage. Reviewed by Richard Smith & Eli Friedman. llvm-svn: 186261
* C++ modules: Don't call DeclContext::lookup when half-way through deserializingRichard Smith2013-07-132-0/+25
| | | | | | | decls. That can reenter deserialization and explode horribly by trying to merge a declaration that we've not got very far through deserializing yet. llvm-svn: 186236
* [ms-cxxabi] Don't consider function templates for name backrefsReid Kleckner2013-07-132-1/+34
| | | | | | | | | | | | | | They don't seem to be used for back references, presumably because a function template is unlikely to reoccur, while a class template name may reoccur as a type. This fixes a mangling issue for llvm::hash_combine() in Hashing.h. Reviewers: timurrrr Differential Revision: http://llvm-reviews.chandlerc.com/D1078 llvm-svn: 186233
* Changes so that a few tests do not fail when running under guarded malloc.Argyrios Kyrtzidis2013-07-124-8/+8
| | | | | | | Guarded malloc emits some messages at the beginning in stderr when enabled. These messages caused a few tests to fail. llvm-svn: 186219
* Compute 'this' correctly for block in lambda.Eli Friedman2013-07-121-0/+18
| | | | | | | | | Using CurFuncDecl is both correct and simple compared to crawling the DeclContexts of the block. Fixes <rdar://problem/14415072>. llvm-svn: 186210
* Provide a better diagnostic and a fixit for a '.' or '->' before the left parenKaelyn Uhrain2013-07-121-0/+14
| | | | | | | | of a function call. This fixes PR5898 and means we now have a better diagnostic here than GCC. llvm-svn: 186208
* Unrevert r186040, reverted in r186185, with fix for PR16597.Richard Smith2013-07-122-0/+41
| | | | | | | | | | | Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186199
* Revert r186040 to fix PR16597 while Richard investigates what the bestChandler Carruth2013-07-122-29/+0
| | | | | | | | | | | | | fix is. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. llvm-svn: 186185
* [analyzer] Treat nullPtrType as a location type.Anna Zaks2013-07-121-0/+6
| | | | | | Fixes PR16584 (radar://14415223). llvm-svn: 186172
* Objective-C: Produce gcc compatible encoding ofFariborz Jahanian2013-07-121-0/+18
| | | | | | | ivar type in meta-data while preventing recursive encoding in a corner case. // rdar://14408244 llvm-svn: 186169
* [analyzer] Add support for __builtin_addressof.Jordan Rose2013-07-121-0/+7
| | | | | | ...so we don't regress on std::addressof. llvm-svn: 186140
* Fix crash on zero-argument assignment operator.Eli Friedman2013-07-111-1/+5
| | | | | | | Make sure we don't crash when checking whether an assignment operator without any arguments is a special member. <rdar://problem/14397774>. llvm-svn: 186137
* Add the ability to use guarded malloc when running clang's lit tests.David Dean2013-07-111-0/+20
| | | | llvm-svn: 186135
* Provide a fixit hint for changing '->' to '.' if there is no operator->Kaelyn Uhrain2013-07-111-0/+12
| | | | | | defined for a class. llvm-svn: 186128
* Make CXXBaseSpecifier::getType return unqual type.Eli Friedman2013-07-111-0/+10
| | | | | | | | | | | Various pieces of code, like base initialization in Sema and RTTI IRGen, don't properly ignore qualifiers on base classes. Instead of auditing the whole codebase, just strip them off in the getter. (The type as written is still available in the TypeSourceInfo for code that cares.) Fixes PR16596. llvm-svn: 186125
OpenPOWER on IntegriCloud