summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the intrinsic __builtin_convertvectorHal Finkel2013-09-181-0/+4
| | | | | | | | | | | | | | | | | | LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. llvm-svn: 190915
* Don't eagerly load all conversion operators when loading a class declarationRichard Smith2013-08-301-4/+11
| | | | | | from a PCH/module. llvm-svn: 189646
* Be lazier when loading KeyFunctions from PCH/modules. We don't need to loadRichard Smith2013-08-291-6/+13
| | | | | | | | | | | | | | these in eagerly if we're not actually processing a translation unit. The added laziness here also avoids us loading in parts of a CXXRecordDecl earlier than an upcoming class template specialization merging patch would like. Ideally, we should mark the vtable as used when we see a definition for the key function, rather than having a separate pass over dynamic classes at the end of the TU. The existing approach is pretty bad for PCH/modules, since it forcibly loads the declarations of all key functions in all imported modules, whether or not those key functions are defined. llvm-svn: 189627
* Adjust clang for change to APFloat::toString.Eli Friedman2013-08-292-5/+5
| | | | | | | | I changed the diagnostic printing code because it's probably better to cut off a digit from DBL_MAX than to print something like 1.300000001 when the user wrote 1.3. llvm-svn: 189625
* Bug fix: disallow a variable template to be redeclared as a non-templated ↵Larisse Voufo2013-08-141-1/+0
| | | | | | variable llvm-svn: 188350
* Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3:Richard Smith2013-08-132-6/+25
| | | | | | | | | | | | | When a local extern declaration redeclares some other entity, the type of that entity is merged with the prior type if the prior declaration is visible (in C) or is declared in the same scope (in C++). - Make LookupRedeclarationWithLinkage actually work in C++, use it in the right set of cases, and make it track whether it found a shadowed declaration. - Track whether we found a declaration in the same scope (for C++) including across serialization and template instantiation. llvm-svn: 188307
* variable templates updated for PCH serialization... Still working on test ↵Larisse Voufo2013-08-131-0/+172
| | | | | | cases... llvm-svn: 188249
* Fix FileCheck --check-prefix lines.Tim Northover2013-08-125-12/+12
| | | | | | | | | | Various tests had sprung up over the years which had --check-prefix=ABC on the RUN line, but "CHECK-ABC:" later on. This happened to work before, but was strictly incorrect. FileCheck is getting stricter soon though. Patch by Ron Ofir. llvm-svn: 188174
* PR9992: Serialize and deserialize the token sequence for a function template inRichard Smith2013-08-071-0/+5
| | | | | | -fdelayed-template-parsing mode. Patch by Will Wilson! llvm-svn: 187916
* Avoid crashing if a directory has no pch files.Rafael Espindola2013-07-281-1/+1
| | | | | | Should fix some of the bots that have assertions disabled. llvm-svn: 187329
* Don't pass %s twice to clang -cc1.Rafael Espindola2013-07-251-1/+1
| | | | | | | | The reason this clang invocation was failing is that it had two %s. We would close stdout after the first one and report a fatal error when trying to print the second. llvm-svn: 187122
* Test case for r18266 (serialization support for ↵David Blaikie2013-07-152-0/+12
| | | | | | TagDecl:IsCompleteDefinitionRequired) llvm-svn: 186351
* 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
* Use the new --crash option in commands that are expected to crash.Rafael Espindola2013-07-051-1/+1
| | | | llvm-svn: 185679
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-0410-16/+16
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
* Replace 'grep foo | count 0' with 'not grep foo'.Rafael Espindola2013-07-041-1/+1
| | | | | | This avoids depending on pipefail not being used. llvm-svn: 185648
* Lazily deserialize function template specializations. This fixes a cycle inRichard Smith2013-06-281-0/+5
| | | | | | module deserialization / merging, and more laziness here is general goodness. llvm-svn: 185132
* Lazily deserialize the "first' friend declaration when deserializing a classRichard Smith2013-06-262-1/+32
| | | | | | | declaration. This PCH a little lazier, and breaks a deserialization cycle that causes crashes with modules enabled. llvm-svn: 184904
* Fix PCH bug with member templates of local classes in nontemplate functions. Faisal Vali2013-06-262-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | As noted by Richard in the post: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130624/082605.html, the following code should not add an entry into PendingLocalImplicitInstantiations, since local instantiations should only occur within the context of other instantiations: int foo(double y) { struct Lambda { template<class T> T operator()(T t) const { return t; }; } lambda; return lambda(y); } Hence the attached code does the following: 1) In MarkFunctionReferenced, check if ActiveInstantiations.size() is non-zero before adding to PendingLocalImplicitInstantiations. 2) In InstantiateFunctionDefinition, we swap out/in PendingLocalImplicitInstantiations so that only those pending local instantiations that are added during the instantiation of the current function are instantiated recursively. llvm-svn: 184903
* When setting the external visible declarations for a decl context, checkRichard Smith2013-06-242-1/+17
| | | | | | | whether they replace any existing lookups in the context, rather than accumulating a bunch of lookup results referring to the same entity. llvm-svn: 184679
* Add test coverage for serialization of dependent function template ↵Eli Friedman2013-06-192-0/+11
| | | | | | specializations. llvm-svn: 184275
* When declaring an ObjC interface decl with a @compatibility_alias alias ↵Argyrios Kyrtzidis2013-06-182-0/+26
| | | | | | | | | | | | | | | | | | name, change the class name to the "real" one. If we have something like @class NewImage; @compatibility_alias OldImage NewImage; @class OldImage; the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage"). In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"), instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants. Fixes crash of rdar://14112291. llvm-svn: 184238
* [PCH] Fix crash with valid code, related to anonymous field initializers.Argyrios Kyrtzidis2013-05-301-0/+14
| | | | | | | | | In a certain code-path we were not deserializing an anonymous field initializer correctly, leading to a crash when trying to IRGen it. This is a simpler version of a patch by Yunzhong Gao! llvm-svn: 182974
* Objective-C: Implements gcc's -Wselector optionFariborz Jahanian2013-05-301-1/+1
| | | | | | | | which diagnoses type mismatches of identical selectors declared in classes throughout. // rdar://14007194 llvm-svn: 182964
* Objective-C [qoi]: Improve on diagnostic when a method usedFariborz Jahanian2013-05-281-3/+3
| | | | | | | in an @selector expression has no implementation. // rdar://14002507 llvm-svn: 182812
* Fix bitcode desynchronization when loading a PCH containing a class templateRichard Smith2013-05-232-0/+4
| | | | | | | | | | | specialization with modules enabled. Just don't merge them at all for now; we'll revisit this when support for template merging is added. In passing, make Decl::dump() a little safer to use with PCH/modules, by making it not deserialize any additional declarations. From a debugger you can call decls_begin() or similar first if you want to dump all child decls. llvm-svn: 182544
* First pass of semantic analysis for init-captures: check the initializer, buildRichard Smith2013-05-161-0/+9
| | | | | | | | | | | | | a FieldDecl from it, and propagate both into the closure type and the LambdaExpr. You can't do much useful with them yet -- you can't use them within the body of the lambda, because we don't have a representation for "the this of the lambda, not the this of the enclosing context". We also don't have support or a representation for a nested capture of an init-capture yet, which was intended to work despite not being allowed by the current standard wording. llvm-svn: 181985
* improve of note message and minor refactoring of my lastFariborz Jahanian2013-05-151-1/+1
| | | | | | patch (r181847). llvm-svn: 181896
* Objective-C [diagnostics] [QOI], when method is notFariborz Jahanian2013-05-141-0/+1
| | | | | | | | found for a receiver, note where receiver class is declaraed (this is most common when receiver is a forward class). // rdar://3258331 llvm-svn: 181847
* C++1y deduced return types: when we deduce a return type for a function whichRichard Smith2013-05-111-0/+34
| | | | | | | we loaded from PCH, if we're building another PCH, create an update record to patch the return type of the earlier declaration. llvm-svn: 181659
* Serialization for captured statementsBen Langmuir2013-05-031-0/+42
| | | | | | | | | | | Add serialization for captured statements and captured decls. Also add a const_capture_iterator to CapturedStmt. Test contributed by Wei Pan Differential Revision: http://llvm-reviews.chandlerc.com/D727 llvm-svn: 181048
* Implement C++1y decltype(auto).Richard Smith2013-04-261-0/+24
| | | | llvm-svn: 180610
* Add another test I forgot to svn add.Richard Smith2013-04-201-0/+30
| | | | llvm-svn: 179959
* Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.Andy Gibbs2013-04-179-35/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VerifyDiagnosticConsumer previously would not check that the diagnostic and its matching directive referenced the same source file. Common practice was to create directives that referenced other files but only by line number, and this led to problems such as when the file containing the directive didn't have enough lines to match the location of the diagnostic in the other file, leading to bizarre file formatting and other oddities. This patch causes VerifyDiagnosticConsumer to match source files as well as line numbers. Therefore, a new syntax is made available for directives, for example: // expected-error@file:line {{diagnostic message}} This extends the @line feature where "file" is the file where the diagnostic is generated. The @line syntax is still available and uses the current file for the diagnostic. "file" can be specified either as a relative or absolute path - although the latter has less usefulness, I think! The #include search paths will be used to locate the file and if it is not found an error will be generated. The new check is not optional: if the directive is in a different file to the diagnostic, the file must be specified. Therefore, a number of test-cases have been updated with regard to this. This closes out PR15613. llvm-svn: 179677
* Remove XFAIL now that the test is standalone.Rafael Espindola2013-04-151-1/+0
| | | | llvm-svn: 179538
* [PCH/test] Make test/PCH/cxx-typeid.cpp self-contained by including the ↵Argyrios Kyrtzidis2013-04-152-4/+45
| | | | | | | | relevant standard library declarations instead of depending on a system header inclusion. llvm-svn: 179537
* Add triples to these tests since they're now using TLS, which isn't ↵Richard Smith2013-04-151-2/+2
| | | | | | available on all targets. llvm-svn: 179514
* Annotate flavor of TLS variable (statically or dynamically initialized) onto ↵Richard Smith2013-04-131-0/+20
| | | | | | the AST. llvm-svn: 179447
* Disable following tests for Hexagon:Jyotsna Verma2013-04-121-0/+1
| | | | | | | | 1) Driver/output-file-is-dir.c - Checks for object file which can't be created for Hexagon since assembler is unavailable. 2) PCH/cxx-typeid.cpp - 'typeinfo' include file is unavailable for Hexagon. llvm-svn: 179385
* [PCH] Change test/PCH/headersearch.cpp to use -emit-llvm-only instead of ↵Argyrios Kyrtzidis2013-04-111-3/+3
| | | | | | -emit-obj llvm-svn: 179301
* Fix 41 of the 61 tests which fail with modules enabled: we were computing andRichard Smith2013-04-042-0/+5
| | | | | | | | | caching the linkage for a declaration before we set up its redeclaration chain, when determining whether a declaration could be a redeclaration of something from an unimported submodule. We actually want to look at the declaration as if it were not a redeclaration here, so compute the linkage but don't cache it. llvm-svn: 178733
* Don't eagerly deserialize every templated function (and every static dataRichard Smith2013-04-012-1/+11
| | | | | | member inside a class template) when loading a PCH file or module. llvm-svn: 178496
* [PCH] Fix assertion hit related to enum decls inside templated funtions.Argyrios Kyrtzidis2013-03-181-0/+13
| | | | | | | Report and suggested fix by Tom Honermann! http://llvm.org/bugs/show_bug.cgi?id=13020 llvm-svn: 177330
* [PCH] When complaining that a header from the PCH was modified, also mentionArgyrios Kyrtzidis2013-03-081-1/+1
| | | | | | the filename of the PCH file. llvm-svn: 176717
* Add a test case, to make sure there is no crash on IRGen when using PCHArgyrios Kyrtzidis2013-02-281-0/+39
| | | | | | Related to rdar://13114142 llvm-svn: 176227
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-201-1/+4
| | | | | | function attributes. llvm-svn: 175606
* [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
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-072-0/+7
| | | | | | restrictions. llvm-svn: 174601
* [frontend] Don't put a PCH/PTH filename into the set of includes in the ↵Argyrios Kyrtzidis2013-02-051-0/+18
| | | | | | | | | | | | | preprocessor options; since only one of them is allowed in command-line, process them separately. Otherwise, if more than one is specified in the command-line, one is processed normally and the others are going to be treated and included as header files. Related to radar://13140508 llvm-svn: 174385
* Preserve Sema::UndefinedInternals across PCH boundaries. FixesNick Lewycky2013-01-261-0/+15
| | | | | | -Wundefined-internal warnings with PCH. llvm-svn: 173538
OpenPOWER on IntegriCloud